Adobe-Runtime-Support
Adobe-Runtime-Support copied to clipboard
Flash CS5.5 camera.requestPermission crash on Androids pixel 2,4 & 6 - (AIR 50.2.3.4 & 50.2.4.4)
Android build crashes when initially requestingPermission, then works fine on restart. Obvs, GooglePlay are rejecting it for that. The permission pop-up does appear on initial launch.
Steps to Reproduce
Build the swf in FlashCS5.5 - replacing the new SDK where necessary in the Adobe/Flash air2.6 folder. Build from the command line from my bat file. Apk created fine. Code as below. Tested on pixels 2,4, & 6. No known workarounds :(
-- this is what traces out in android studio logcat--
/data/misc/iorapd/air.com.mbe.mathMeDroid/2000011/air.com.mbe.mathMeDroid.AppEntry/compiled_traces/compiled_trace.pb doesn't exist 03-30 01:06:07.733 1381-1434/? I/ActivityTaskManager: Displayed air.com.mbe.mathMeDroid/.AppEntry: +227ms 03-30 01:06:07.792 678-678/? D/[email protected]: LAUNCH: 0 03-30 01:06:07.794 1187-1187/? W/adbd: timeout expired while flushing socket, closing 03-30 01:06:07.995 2045-2045/? I/WallpaperService: engine paused 03-30 01:06:08.009 679-679/? E/Layer: [Surface(name=Task=50763)/@0xe7afe44 - animation-leash#0] No local sync point found 03-30 01:06:08.009 679-679/? E/Layer: [Surface(name=Task=1)/@0xe8c9c5f - animation-leash#0] No local sync point found 03-30 01:06:08.018 948-1039/? D/CHRE: @ 57036.579: -: id 10, otherClientPresent 0, mode 3 03-30 01:06:08.019 948-1039/? D/CHRE: @ 57036.579: [ImuCal] Dynamic sensor configuration: stand-by. 03-30 01:06:08.019 948-1039/? D/CHRE: @ 57036.579: sensorType 10 allowed 1: mergedMode 3, otherClientPresent 1 03-30 01:06:08.019 948-1039/? D/CHRE: @ 57036.580: sensorType 13 allowed 1: mergedMode 3, otherClientPresent 1 03-30 01:06:08.022 16803-23202/? I/PBSessionCacheImpl: Deleted sessionId[73902087283110077] from persistence. 03-30 01:06:08.024 948-1039/? D/CHRE: @ 57036.585: sensorType 15 allowed 0: mergedMode 3, otherClientPresent 0 03-30 01:06:08.033 16803-16866/? W/SearchServiceCore: Abort, client detached. 03-30 01:06:08.034 16803-16866/? I/MicroDetectionState: Should stop hotword detection immediately - true 03-30 01:06:08.158 3389-3412/? I/PeriodicStatsRunner: PeriodicStatsRunner.call():180 call() 03-30 01:06:08.158 3389-3412/? I/PeriodicStatsRunner: PeriodicStatsRunner.call():184 No submit PeriodicStats since input started. 03-30 01:06:09.181 24077-24077/? I/AIR RUNTIME: Version 50,2,3,4 - platform Android-ARM64 03-30 01:06:09.181 24077-24077/? I/AIR RUNTIME: Starting in synchronous mode 03-30 01:06:09.209 1082-27522/? W/ServiceManager: Permission failure: android.permission.SYSTEM_CAMERA from uid=10824 pid=24077 03-30 01:06:09.481 1082-27522/? W/ServiceManager: Permission failure: android.permission.SYSTEM_CAMERA from uid=10824 pid=24077 03-30 01:06:09.482 1082-27522/? I/CameraService: CameraService::connect call (PID -1 "air.com.mbe.mathMeDroid", camera ID 0) for HAL version default and Camera API version 1 03-30 01:06:09.482 1082-27522/? W/ServiceManager: Permission failure: android.permission.CAMERA from uid=10824 pid=24077 03-30 01:06:09.482 1082-27522/? E/CameraService: Permission Denial: can't use the camera pid=24077, uid=10824 03-30 01:06:09.482 24077-24077/? W/CameraBase: An error occurred while connecting to camera 0: Status(-8, EX_SERVICE_SPECIFIC): '1: validateClientPermissionsLocked:1165: Caller "air.com.mbe.mathMeDroid" (PID 10824, UID 24077) cannot open camera "0" without camera permission' 03-30 01:06:09.483 1082-27522/? W/ServiceManager: Permission failure: android.permission.SYSTEM_CAMERA from uid=10824 pid=24077 03-30 01:06:09.483 1082-27522/? I/CameraService: CameraService::connect call (PID -1 "air.com.mbe.mathMeDroid", camera ID 1) for HAL version default and Camera API version 1 03-30 01:06:09.484 1082-27522/? W/ServiceManager: Permission failure: android.permission.CAMERA from uid=10824 pid=24077 03-30 01:06:09.484 1082-27522/? E/CameraService: Permission Denial: can't use the camera pid=24077, uid=10824 03-30 01:06:09.484 24077-24077/? W/CameraBase: An error occurred while connecting to camera 1: Status(-8, EX_SERVICE_SPECIFIC): '1: validateClientPermissionsLocked:1165: Caller "air.com.mbe.mathMeDroid" (PID 10824, UID 24077) cannot open camera "1" without camera permission' 03-30 01:06:09.490 1381-1966/? I/ActivityTaskManager: START u0 {act=android.content.pm.action.REQUEST_PERMISSIONS pkg=com.google.android.permissioncontroller
if (Camera.isSupported)
{
cam = Camera.getCamera();
if (Camera.permissionStatus != PermissionStatus.GRANTED)
`` {
cam.addEventListener(PermissionEvent.PERMISSION_STATUS,
function(e:PermissionEvent):void {
if (e.status == PermissionStatus.GRANTED)
{
checkCamera(camInt);
}
else
{
// permission denied
}
});
try {
cam.requestPermission(); //------- CRASHES HERE after putting up request dialogue.
} catch(e:Error)
{
// another request is in progress
}
}