Skip to content

Latest commit

 

History

History
83 lines (73 loc) · 4.49 KB

README.md

File metadata and controls

83 lines (73 loc) · 4.49 KB


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