local function getImages(event) fName = os.time(os.date("!\*t")) local hasAccessToCamera, hasCamera local hasAccessToCamera, hasCamera = media.hasSource( media.Camera ) if ( hasAccessToCamera == true ) then -- There is access to the camera media.capturePhoto( { listener = onComplete } ) elseif ( hasCamera == true and native.canShowPopup( "requestAppPermission" ) ) then local function appPermissionsListener( event ) for k,v in pairs( event.grantedAppPermissions ) do if ( v == "Camera" ) then print("we got camera") timer.performWithDelay(300, getImages,1) return end end timer.performWithDelay(300, backArrowListener, 1) end local options = { appPermission = "Camera", urgency = "Critical", listener = appPermissionsListener, rationaleTitle = "Camera access required", rationaleDescription = "Camera access is required to take photos. Re-request now?", -- settingsRedirectTitle = "Alert", -- settingsRedirectDescription = "Without the ability to take photos, this app cannot properly function. Please grant camera access within Settings." } native.showPopup( "requestAppPermission", options ) end we dont crash on it, below is from logcat my print: 02-24 15:55:11.225 10235 10252 I Corona : applicationExit or applicationSuspend: db closed your print: 02-24 15:55:13.215 10235 10235 D Corona : Execute the lua listener task your print: 02-24 15:55:13.215 10235 10235 I Corona : ERROR: CoronaActivity.DefaultRequestPermissiosnResultHandler.forwardRequestPermissionsResultToLua():Cannot forward results to Lua as no registry ID was found! my print: 02-24 15:55:13.265 10235 10252 I Corona : db opened my print: 02-24 15:55:13.265 10235 10252 I Corona : db reopened