Mostrando postagens com marcador Class. Mostrar todas as postagens
Mostrando postagens com marcador Class. Mostrar todas as postagens

terça-feira, 31 de março de 2015

CommonSDK

CommonSDK


Este projeto contém Biblioteca de métodos comumente utilizados e é exemplos.

Biblioteca contém maneira fácil de implementar social, ou seja SDK: Facebook, Twitter, Google+, LinkedIn.

Este projeto inclui as seguintes características comuns.


EditText empty validation.
Check network available or not (Internet or Wifi).
Email address validation.
Get current date in String format.
Get device id of from your device.
Set Preferences and get Preferences. Like String, int, long, Boolean, Float.
Remove all preferences. 
Get current location.
Pinch Zoom on image.
Get application Icon drawable.
Send local notification.
Disable sleep mode on while using application.
Enable sleep mode on while using application.
Open image from selected directory path.
Open video from selected directory path.
Open URL to mobile browser.
Shows address location on map.
Create folder or directory.
Download image from URL.
Show date picker.
Show time picker.
Get number of file counts.
Calculate date difference.
Convert date from string to date format.
Get device height.
Get device width.
Get random number.
Add postfix to numbers.
Convert comma separated string to array list.
Convert arrayList to comma separated string.
Play background music.
Stop background music.
Apply blur effect on image.
Convert drawable to bitmap.
Convert bitmap to drawable.
Get device volume for application for sound.
Set bitmap image to preferences.
Get bitmap image form preference.
Get application version code.
Set vertical text-view (left & right).
Check Whether Sd card is available on Device.
Show Share Dialog.
Change Device Profile (Silent or Vibrate or Normal).
Change bitmap to Rounded Cornered.
Show Alert Dialog or Toast.
Preventing double click.
Capture Image.
Pick Image.
Preview Captured Image.
Record Video.
Pick Video.
Preview Captured Video.
Get path of picked image or video (for all versions).
Integrating Social Platforms.
Adding Ripple Effect.
Check Website url is valid or not.
Get all contacts that have email address.
Get bitmap of view (ScreenShot).
Pick Color from ImageView.
Get File Size.
Download File.
Link para Download da Libray (Link)
Link para o Projeto (Link) 

segunda-feira, 30 de março de 2015

RxParse

RxParse

rxparse.png

Usage

find

<T extends ParseObject> Observable<T> ParseObservable.find(ParseQuery<T>);

Before:

ParseUser.getQuery().findInBackground(new FindCallback() {
    @Override
    public done(ParseUser user, ParseException e) {
        if (e == null) System.out.println(user));
    }
});

After:

Observable<ParseUser> users = ParseObservable.find(ParseUser.getQuery());
users.subscribe(user -> System.out.println(user.getObjectId()));

Observable<ParseUser> users = ParseObservable.find(ParseUser.getQuery().setLimit(1000));

count


Before:

ParseUser.getQuery().countInBackground(new CountCallback() {
    @Override
    public done(int count, ParseException e) {
        if (e == null) System.out.println(count));
    }
});

After:

Observable<Integer> count = ParseObservable.from(ParseUser.class).count();
count.subscirbe(c -> System.out.println(c));

loginWithFacebook


Observable<ParseUser> loginUser = ParseObservable.loginWithFacebook(activity);

fetchIfNeeded


Before:

ParseUser.getQuery().fetchIfNeededInBackground(new GetCallback() {
    @Override
    public done(ParseUser user, ParseException e) {
        if (e == null) System.out.println(user));
    }
});

After:

ParseObservable.fetchIfNeeded(user)
    .subscribe(user -> System.out.println(user));

pin


Before:

user.pinInBackground(new SaveCallback() {
    @Override
    public done(ParseException e) {
        // ...
    }
});

After:

ParseObservable.pin(user)
    .subscribe(user -> System.out.println(user));

pin List


Before:

ParseObject.pinAllInBackground(users, new SaveCallback() {
    @Override
    public done(ParseException e) {
        // ...
    }
});

After:

ParseObservable.pin(users)
    .subscribe(user -> System.out.println(user));

save


Before:

user.saveInBackground(new SaveCallback() {
    @Override
    public done(ParseException e) {
        // ...
    }
});

After:

ParseObservable.save(user)
    .subscribe(user -> System.out.println(user));

Instalação


via jcenter

repositories {
    jcenter()
}

dependencies {
    compile 'com.infstory:rxparse:1.0.0'
}

Or via jitpack.io

repositories {
    maven {
        url "https://jitpack.io"
    }
}

dependencies {
    compile 'com.github.yongjhih:rxparse:1.0.0'
}

Network Connection Class

Network Connection Class

Classe Connection etwork é uma biblioteca Android que permite descobrir a qualidade da conexão de internet do usuário atual. A conexão é classificada em vários "Classes de conexão", que tornam mais fácil para desenvolver contra. A biblioteca faz isso ouvindo o tráfego de internet existente feito pelo seu app e notificá-lo quando as mudanças de qualidade de conexão do usuário. Os desenvolvedores podem usar essas informações sobre Classe Connection e ajustar o comportamento do aplicativo (solicitar imagens de baixa qualidade ou vídeo, acelerador de digitação antecipada, etc).

Conexão Classe Rede atualmente só mede a largura de banda a jusante do usuário. Latência também é um fator importante, mas em nossos testes, descobrimos que a largura de banda é uma boa proxy para ambos.


 
A biblioteca de classes de conexão de rede se encarrega de espigas usando uma média móvel das
amostras recebidas:
 
Bandwidth Averaging