Android: Corona camera activity returns just a blank white image

Hello!

I am using the internal Corona camera activity in my app. There is a reason why I do not use the native camera app, which is described here:

http://forums.coronalabs.com/topic/33462-android-camera-causes-application-to-restart/

I have got the following problem on the Samsung Galaxy Express with Android 4.1.2.

The issue did not arise on other Android phones I tested with.

I am using daily build 1235, but the problem did also occur in earlier versions:

When I shoot a picture using the internal Corona camera activity, it delivers just a blank, white image.

There is nothing to see on the picture but plain white (but the dimensions of the image are correct I think).

I would be very glad if you could help me with this issue!

Thx!

Hi @EleXX,

Does this occur on any other devices, if you have them to test with? Can you show your basic code for how you queue up the camera, and also your basic Android build permissions in build.settings?

Thanks,

Brent

Hi!

It does not happen on any other devices I tested with yet, which includes HTC Desire S, iPhone 4, Samsung Galaxy S3, Acer Iconia Tablet, and probably some others I don’t know about anymore.

As far as I know, the problem occured only on Samsung Galaxy Express.

The parts of the code that take the picture look as follows:

local function onButtonRelease( event ) local btn = event.target if(btn.id == "takePictureButton") then if media.hasSource( media.Camera ) then media.show( media.Camera, pictureTaken, {baseDir = system.TemporaryDirectory, filename = nextImageFileName, type = "image"} ) else native.showAlert( appTools.translate("app\_title"), appTools.translate("message\_no\_camera"), { appTools.translate("label\_ok") } ) end ... ... ...

The build.settings for Android:

android = { usesPermissions = { "android.permission.CAMERA", "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.READ\_PHONE\_STATE", "android.permission.VIBRATE", "com.android.vending.BILLING", }, usesFeatures = { { name = "android.hardware.camera", required = true }, { name = "android.hardware.camera.front", required = false }, }, },

Thank you for any help!

The problem does not occur with Public Build 1202, so I guess it was introduced in some later build.

Hi @EleXX,

Does this occur on any other devices, if you have them to test with? Can you show your basic code for how you queue up the camera, and also your basic Android build permissions in build.settings?

Thanks,

Brent

Hi!

It does not happen on any other devices I tested with yet, which includes HTC Desire S, iPhone 4, Samsung Galaxy S3, Acer Iconia Tablet, and probably some others I don’t know about anymore.

As far as I know, the problem occured only on Samsung Galaxy Express.

The parts of the code that take the picture look as follows:

local function onButtonRelease( event ) local btn = event.target if(btn.id == "takePictureButton") then if media.hasSource( media.Camera ) then media.show( media.Camera, pictureTaken, {baseDir = system.TemporaryDirectory, filename = nextImageFileName, type = "image"} ) else native.showAlert( appTools.translate("app\_title"), appTools.translate("message\_no\_camera"), { appTools.translate("label\_ok") } ) end ... ... ...

The build.settings for Android:

android = { usesPermissions = { "android.permission.CAMERA", "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.READ\_PHONE\_STATE", "android.permission.VIBRATE", "com.android.vending.BILLING", }, usesFeatures = { { name = "android.hardware.camera", required = true }, { name = "android.hardware.camera.front", required = false }, }, },

Thank you for any help!

The problem does not occur with Public Build 1202, so I guess it was introduced in some later build.

I just tested with build 1260, where the problem still exists.

Hi EleXX,

Can I please request testing of this using the latest Graphics 2.0 build, #2076, or even a more recent daily?

Thanks,

Brent

Yes, I will test that once our app has been migrated to Graphics 2.0, which has not been done yet.

I just tested with build 1260, where the problem still exists.

Hi EleXX,

Can I please request testing of this using the latest Graphics 2.0 build, #2076, or even a more recent daily?

Thanks,

Brent

Yes, I will test that once our app has been migrated to Graphics 2.0, which has not been done yet.