Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Android: Corona camera activity returns just a blank white image
Started by EleXX Oct 17 2013 02:18 AM

6 replies to this topic
android; samsung; corona camera activity; camera;
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

EleXX

[GLOBAL: userInfoPane.html]
EleXX
  • Enthusiast

  • 44 posts
  • Corona SDK

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!



[TOPIC: post.html]
#2

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

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



[TOPIC: post.html]
#3

EleXX

[GLOBAL: userInfoPane.html]
EleXX
  • Enthusiast

  • 44 posts
  • Corona SDK

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!



[TOPIC: post.html]
#4

EleXX

[GLOBAL: userInfoPane.html]
EleXX
  • Enthusiast

  • 44 posts
  • Corona SDK

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



[TOPIC: post.html]
#5

EleXX

[GLOBAL: userInfoPane.html]
EleXX
  • Enthusiast

  • 44 posts
  • Corona SDK

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



[TOPIC: post.html]
#6

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

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



[TOPIC: post.html]
#7

EleXX

[GLOBAL: userInfoPane.html]
EleXX
  • Enthusiast

  • 44 posts
  • Corona SDK

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.




[topic_controls]
[/topic_controls]