I’m working a little app always to improve my react (and expo) skills
But I need to get permissions for “camera” and “reading files” and getting no errors, but camera is not working if I build my APK with those permissions, it’s not working (I tried almost all one by one…long test…)
So I decided to remove the permissions field, as the doc mentioned it, and now it’s working but I know on google store it will be for suuuuure rejected if I let all permissions requested (even not good for rating
Any idea which permissions I have to set ? Do I’m wrong with my permissions field’s array ?
Without permissions, app is working, but with field permissions, it’s not. What can I see it’s when I set CAMERA in permissions fields, only camera permissions is requested, not the media access.
Yes, so the first time the app crashed with the function _lazycallable() undefined function. And then when i said camera is not working, it’s actually, the permissions is requested for camera but not the one to access to media/photo. Then you click on button and nothing happened, the camera is not opened.
I can see the difference btw permissions because on my development environment, both permissions are requested, camera and media/files. I tried many builds with differents permissions and each time, it’s the same behavior, only one permissions requested for the camera, not for the files.
Yesterday I made a build without permissions field, and everything is working fine.
This is the log from my real device after accepted the camera permission and clicking on button to open the camera:
07-31 17:25:18.059 2125 2499 I BroadcastQueue: am_broadcast_finished: [background,1,Intent { act=com.google.android.gms.measurement.UPLOAD flg=0x10 }]
07-31 17:25:18.262 2125 3102 I ActivityManager: START u0 {act=android.content.pm.action.REQUEST_PERMISSIONS pkg=com.android.packageinstaller cmp=com.android.packageinstaller/.permission.ui.GrantPerm
issionsActivity (has extras)} from uid 10335 on display 0
07-31 17:25:18.269 2125 3102 D ActivityTrigger: ActivityTrigger activityPauseTrigger
07-31 17:25:18.276 15026 15026 D j : WARNING: getPackageName called on ScopedContext
07-31 17:25:18.284 15026 15026 D j : WARNING: getPackageName called on ScopedContext
07-31 17:25:18.286 15026 15191 D j : WARNING: getPackageName called on ScopedContext
07-31 17:25:18.286 2125 3186 I MediaFocusControl: AudioFocus abandonAudioFocus() from uid/pid 10335/15026 clientId=android.media.AudioManager@94be5b1abi19_0_0.host.exp.exponent.modules.api.av.AVMo
dule@d32ea96
07-31 17:25:18.301 15026 15209 D j : WARNING: getPackageName called on ScopedContext
07-31 17:25:18.333 2125 3156 D ActivityTrigger: ActivityTrigger activityPauseTrigger
07-31 17:25:18.334 2125 11424 W InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@933dd01 attribute=null, token = andr
oid.os.BinderProxy@77bde5b
07-31 17:25:18.364 2125 3102 I BroadcastQueue: am_broadcast_enqueue: [background,0,Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x4000010 (has extras) },1]
07-31 17:25:18.364 2125 2155 I BroadcastQueue: am_broadcast_finished: [background,0,Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x4000010 (has extras) }]
07-31 17:25:18.368 15026 15026 E ag : java.lang.ClassNotFoundException: abi19_0_0.com.facebook.soloader.SoLoader
07-31 17:25:18.369 15026 15026 E ag : Runtime exception in RNObject: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.reflect.Method[] java.lang.Class.getMethods()' on
a null object reference
07-31 17:25:18.386 15026 15276 I RegistrationIntentService: GCM Registration Token: epgQ9PSDw7E:APA91bH-KggQvLR0z211aUS8d8x57b3NOCxBgOO9HabKspPaexAYkP1roOrxPVZoAUtAc6blQgm1gmVsAZptqzG_9SllFleGBO-EeY2R
mptRGKgv5hEZL_xe6fYLVq9ezEPe7vCiYE21
07-31 17:25:18.391 15026 15026 I Timeline: Timeline: Activity_idle id: android.os.BinderProxy@969d91 time:63253388
07-31 17:25:21.142 15278 15278 W qcom-system-dae: type=1400 audit(0.0:34121): avc: denied { read write } for name="diag" dev="tmpfs" ino=1978 scontext=u:r:qcomsysd:s0 tcontext=u:object_r:diag_device:s
0 tclass=chr_file permissive=0 ppid=1 pcomm="init" pgid=1 pgcomm="init"
I actually did it the logcat and I can see some missing permissions but even if I add them, it’ still the same issue. It doesn’t request the access to media/files.
Because in my logcat, I can see error from expo:
MediaFocusControl: AudioFocus abandonAudioFocus() from uid/pid 10335/15026 clientId=android.media.AudioManager@94be5b1abi19_0_0.host.exp.exponent.modules.api.av.AVMo
dule@d32ea96