Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

HELP! - Corona Camera Activity does not save photos anymore!
Started by EleXX Oct 25 2013 03:18 AM

5 replies to this topic
corona camera activity; camera; android;
[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

Please help!

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/
 

 

Everything was working (more or less) fine, but with the latest daily builds, the camera activity does not seem to save any photo files anymore!

This is quite an emergency now for our team, because we rely on the photo activity to take pictures of the players, and intended to realease our app by the end of October!

 

I am using daily build 1243, but I think the problem also existed a few builds before.

 

I could only test on Android yet, (on HTC Desire S and Samsung Galaxy Express), where I had files of the photos before, but now do not have any in the temporary directory (where I save the taken pictures).

 

I can see a LUA error in the log, but it does not seem to be from my own code, at least it does not point to anywhere I know:

10-25 13:05:13.379: I/Corona(7897): Runtime error
10-25 13:05:13.379: I/Corona(7897): attempt to call a nil value
10-25 13:05:13.379: I/Corona(7897): stack traceback:
10-25 13:05:13.379: I/Corona(7897): 	[C]: ?

 

Please help, the photo feature is crucial for our app!

 

Thank you!

 

 

PS: I must admit that I am not quite happy with Corona's camera support yet. I just use it for a very simple task: Take a picture, save it to a directory, show it on screen.

But we already ran into so many problems with the camera.... I know that this is a very hardware dependent feature, but I would wish for more stability in this area. Thanx!



[TOPIC: post.html]
#2

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

Hi @EleXX,

Based on the other thread you cite, is this a symptom only of the 2 Android devices you mention? If you roll back to Public Build 1202, does it change any behavior, or stop showing the Runtime error?

 

Thanks,

Brent



[TOPIC: post.html]
#3

dchan

[GLOBAL: userInfoPane.html]
dchan
  • Contributor

  • 360 posts
  • Corona Staff

Hi,

Do you have some sample code?  Also if you are using media.show() can you trying using the following functions to see if those work for you?  Thanks.

 

http://docs.coronalabs.com/daily/api/library/media/selectPhoto.html

http://docs.coronalabs.com/daily/api/library/media/capturePhoto.html



[TOPIC: post.html]
#4

EleXX

[GLOBAL: userInfoPane.html]
EleXX
  • Enthusiast

  • 44 posts
  • Corona SDK

Hi!

 

Thx for your suggestions.

 

Hi @EleXX,

Based on the other thread you cite, is this a symptom only of the 2 Android devices you mention? If you roll back to Public Build 1202, does it change any behavior, or stop showing the Runtime error?

 

Thanks,

Brent

 

I could only test with those 2 Android devices yet, but I had photo files before on the same devices.

I reverted back to Build 1202, and the problem did NOT occur anymore. So it was introduced somewhere in later builds. The runtime error was also not shown anymore.

 

 

Hi,

Do you have some sample code?  Also if you are using media.show() can you trying using the following functions to see if those work for you?  Thanks.

 

http://docs.coronalabs.com/daily/api/library/media/selectPhoto.html

http://docs.coronalabs.com/daily/api/library/media/capturePhoto.html

 

You can find some sample code in this thread, which handles a different problem, but at the same point in code:

http://forums.coronalabs.com/topic/40507-android-corona-camera-activity-returns-just-a-blank-white-image/

 

I tried the media.selectPhoto and media.capturePhoto functions and both worked (in the latest daily build).

That is good but I would like to stay within one activity due to the reasons mentioned in my first post here.

 

I think I will stick with build 1202 for our own release for now. Funnily enough, this also seemed to solve another problem, which I described in this thread:

http://forums.coronalabs.com/topic/40507-android-corona-camera-activity-returns-just-a-blank-white-image/

 

 

PS: I really do not like the fact that the usage of the corona internal camera activity or a native camera activity is just defined by a permission setting. I would much more like to specify that in the function call. What if I ever need the "WRITE_EXTERNAL_STORAGE" permission, but want to stick with corona's (undocumented) internal camera activity? As far as I know, that would not be possible at the moment.



[TOPIC: post.html]
#5

dchan

[GLOBAL: userInfoPane.html]
dchan
  • Contributor

  • 360 posts
  • Corona Staff

Hi,

This issue has been resolved and will be in build 2013.1249.



[TOPIC: post.html]
#6

EleXX

[GLOBAL: userInfoPane.html]
EleXX
  • Enthusiast

  • 44 posts
  • Corona SDK

Hi,

This issue has been resolved and will be in build 2013.1249.

 

Ok, thank you very much!




[topic_controls]
[/topic_controls]