I want to use camera on Android 4.3.
I tried Nexus 7 and XPERIA SO01F .
I set “usesPermissions” as below on build.settings.
android = { usesPermissions = { "android.permission.INTERNET", "android.permission.CAMERA", "android.permission.WRITE\_EXTERNAL\_STORAGE", }, },
I wrote codes as below.
if media.hasSource( media.Camera ) then media.capturePhoto( { listener = sessionComplete , destination = { baseDir=system.TemporaryDirectory, filename="sc.jpg", type="image" } } ) else native.showAlert("Corona", "Camera not found.") end
When this code is executed, the camera is activated.
When I take a picture, the camera automatically closes.
But “onComplete” was not called.
Is it bug ?