WrathChaos / MediaPickerLib

Kotlin based media picker library, to pick multiple images and/or vidoes from built-in gallery. Easy to implement and use :)
https://www.freakycoder.com
MIT License
49 stars 16 forks source link

Crases after including your library - because I used the ACTION_IMAGE_CAPTURE intent elsewhere #4

Closed nordfalk closed 5 years ago

nordfalk commented 6 years ago

Hi, thanks for providing this library.

However I want to say that, after including your library, my app was crashing in other places in my app where I used the camera:

'java.lang.SecurityException: Permission Denial: starting Intent { act=android.media.action.IMAGE_CAPTURE ...

This is because your library includes the ACTION_IMAGE_CAPTURE permission. This might not really be a bug, but its a pitfall which have cost me a lot of time as it was added to my manifest without notice

https://developer.android.com/reference/android/provider/MediaStore.html#ACTION_IMAGE_CAPTURE

If you app targets M and above and declares as using the CAMERA permission which is not granted, then atempting to use this action will result in a SecurityException

nordfalk commented 6 years ago

I want to add to others with this problem that I, as a workaround have included <uses-permission android:name="android.permission.CAMERA" tools:node="remove" /> in my manifest to delete the permission - as I am not using this library to activate the camera anyway.

Yours, Jacob