I am building a simple app to select an image or take one from camera and crop it. However, it is throwing me this error
java.lang.SecurityException: Uid 100
Try this out:
Android Manifest:
<uses-permission android:name="android.permission.MANAGE_DOCUMENTS" />
Get image by URI
i = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(i, CHOOSE_IMAGE);
This forces the older gallery to open.
Now you can get the result on your onActivityResult
with:
Uri selectedImageURI = data.getData();