TedImagePicker icon indicating copy to clipboard operation
TedImagePicker copied to clipboard

Permission denial when trying to capture photo

Open superakabo opened this issue 5 years ago • 6 comments

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.

superakabo avatar Jul 27 '19 06:07 superakabo

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.

ParkSangGwon avatar Sep 05 '19 15:09 ParkSangGwon

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.

  1. 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
  2. That the camera tile does not show when you have no images on your device.

superakabo avatar Sep 05 '19 16:09 superakabo

@superakabo Can you show me sample code or project? I will check your code

ParkSangGwon avatar Sep 10 '19 10:09 ParkSangGwon

@superakabo Can you show me sample code or project? I will check your code

OK sure.

superakabo avatar Sep 16 '19 10:09 superakabo

For now you can use android:requestLegacyExternalStorage="true" in your manifest file. for more info-https://developer.android.com/training/data-storage/compatibility

SandeepDevrari avatar Apr 01 '20 09:04 SandeepDevrari

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.

  1. 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
  2. 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

titanwalking avatar Sep 21 '20 14:09 titanwalking