Android 10 runtime permission problem in sample code

Corona Version 2019.3523

Android device:  Google Pixel 2 (Android 10)

Compile sample project “Camera” from Corona simulator to generate the apk.

Then download the apk to device for running. When trigger the camera function, following error coming out from the screen:

 

09-12 10:24:08.708 18690 18714 I Corona  : Lacking camera permission!

09-12 10:24:08.710 18690 18690 I Corona  : ERROR: Camera tried to request access to a permission group without having any permissions from that group in build.settings/AndroidManifest.xml!

09-12 10:24:08.710 18690 18690 I Corona  :

09-12 10:24:08.710 18690 18690 I Corona  : Before requesting access, please add a permission from the android.permission-group.CAMERA permission group!

 

The same apk can be runned in Google Pixel 2 (Android 9), but not Android 10.

Hi Corona teams,

Is there any update which can fix this problem in Android 10?

Running into the same issue with Corona Native. I set the usesPermission in build.settings, but still get the warning. Anyone?

At least for me, the usesPermission strings are not getting copied over from build.settings to the androidmanifest. Was this maybe a bug introduced in a daily build?

I would suggest that you look at the sample apps that we ship with Corona in SampleCode/Media/Camera is the example code for requesting permissions.

Rob

Hi Rob,

Can you confirm the example code is working at Android 10 device? 

If yes, then I will solve this problem by myself.

P.S.  I already tried the example code,  the apk file generated by example code is only  working at Android 9 or below device , but it will prompt the error in Android 10.

We will look into it.

Rob

Sorry it took so long. Next daily build should fix this issue (2019.3552)

Yes, this build solve Android 10 issue in when compiling the android app through Corona simulator.

But the latest version cause error in latest Android native build through Android studio.

Please see my post in

https://forums.coronalabs.com/topic/76700-corona-3552-project-templates-app-android-build-error-missing-licensing-googlejar/

Sam149,

I looked into it further and figured out that build.settings uses permissions no longer get processed and put into the manifest for Native. I had to manually add them. This was not the case before, but they must have made some changes recently and the documents support this. This was my issue Rob, thanks.

https://docs.coronalabs.com/guide/distribution/buildSettings/index.html

For Corona Native builds on Android, the build.settings file is ignored entirely