Skip to content

Simplify the way to handling the gallery or camera intent without rambling πŸ˜„.

Notifications You must be signed in to change notification settings

kredibel-id/Picker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


Picker

Support API Level

minsdk targetsdk

Getting started

Setup

1. Add kredibel repository.

maven{url 'https://repo.repsy.io/mvn/kredibel/sdk'}

2. Add this dependency to gradle script on app module. πŸ‘‰ [Latest release]

dependencies {
    implementation 'io.kredibel:picker:0.0.1' // Please check ☝️ latest version
}

Using Picker

Initialize Picker object on your Activity or Fragment

java

Picker picker = new Picker(this);

kotlin

var picker = Picker(this)

Pick image from Gallery

java

picker.pickGallery(new PickerListener() {
    @Override
    public void onPicked(Uri uri, File file, Bitmap bitmap) {
        //do something
    }
});

kotlin

picker.pickGallery { uri, file, bitmap ->
    //do something
}

Pick from Camera

java

picker.pickCamera(new PickerListener() {
    @Override
    public void onPicked(Uri uri, File file, Bitmap bitmap) {
        //do something
    }
});

kotlin

picker.pickCamera { uri, file, bitmap ->
    //do something
}

With lambda (JDK 1.8+)

java

picker.pickCamera((uri, file, bitmap) -> {
    //do something;
});



Sample Project