see wiki and CropImage.getCameraIntent method.
hi, i saw wiki but still no idea how to restrict the user to use only camera or only gallery
For those who are looking for the same.
You need to call getCameraIntent which will simply give you an intent with action android.media.action.IMAGE_CAPTURE then on the result obtain you can call :
public static ActivityBuilder activity(@Nullable Uri uri) {
return new ActivityBuilder(uri);
}
e.g. CropImage.activity(uri).start(this)
The uri used in example is from MediaStore.EXTRA_OUTPUT that you used when passing to camera intent
can u more explain it...i not able to use it...plz
Intent intent = CropImage.getCameraIntent(this,null);
CropImage.activity().start(this);
but not worked...
@rmeph13 "intent" is an unused variable in your code sample.
Most helpful comment
hi, i saw wiki but still no idea how to restrict the user to use only camera or only gallery