TedImagePicker
TedImagePicker copied to clipboard
Permission denial when trying to capture photo
You've done a great job but it seems you forgot to check for camera permission. Also, the camera tile does not show if there are no photos in the photo library even though showCameraTile(true) is set.
TedImagePicker use Intent(MediaStore.ACTION_IMAGE_CAPTURE)
So we don't need check camera permission
Please read this link
https://developer.android.com/training/permissions/usage-notes#perms_vs_intents
But there are special case. If you use camera permission for other activity, you have to check camera permission. This is very strange.
TedImagePicker use
Intent(MediaStore.ACTION_IMAGE_CAPTURE)
So we don't need check camera permission Please read this link https://developer.android.com/training/permissions/usage-notes#perms_vs_intentsBut there are special case. If you use camera permission for other activity, you have to check camera permission. This is very strange.
I don't know why you closed this issue when you've not resolved the problem at hand. There are 2 issues reported entirely.
- That the app crashes when you tap on the camera tile. I experienced this on Api 29, could have be a bug then. Yet to confirm that though
- That the camera tile does not show when you have no images on your device.
@superakabo Can you show me sample code or project? I will check your code
@superakabo Can you show me sample code or project? I will check your code
OK sure.
For now you can use
android:requestLegacyExternalStorage="true"
in your manifest file.
for more info-https://developer.android.com/training/data-storage/compatibility
TedImagePicker use
Intent(MediaStore.ACTION_IMAGE_CAPTURE)
So we don't need check camera permission Please read this link https://developer.android.com/training/permissions/usage-notes#perms_vs_intents But there are special case. If you use camera permission for other activity, you have to check camera permission. This is very strange.I don't know why you closed this issue when you've not resolved the problem at hand. There are 2 issues reported entirely.
- That the app crashes when you tap on the camera tile. I experienced this on Api 29, could have be a bug then. Yet to confirm that though
- That the camera tile does not show when you have no images on your device.
Hi, I think the issue continues. I am targeting Api 30, when I click camera tile, I am getting the following error log:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.accenture.oneapp/com.gun0912.tedonactivityresult.ProxyActivity}: java.lang.SecurityException: Permission Denial: starting Intent { act=android.media.action.IMAGE_CAPTURE flg=0x3 cmp=android/com.android.internal.app.ResolverActivity clip={text/uri-list U:content://media/external/images/media/468142} (has extras) } from ProcessRecord{a32aca8 16557:com.accenture.oneapp/u0a1040} (pid=16557, uid=11040) with revoked permission android.permission.CAMERA
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3323)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3462)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2063)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7615)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
Caused by: java.lang.SecurityException: Permission Denial: starting Intent { act=android.media.action.IMAGE_CAPTURE flg=0x3 cmp=android/com.android.internal.app.ResolverActivity clip={text/uri-list U:content://media/external/images/media/468142} (has extras) } from ProcessRecord{a32aca8 16557:com.accenture.oneapp/u0a1040} (pid=16557, uid=11040) with revoked permission android.permission.CAMERA