how to use media.camera?

I want to use the camera. I run the sample code on my iPhone and it takes a picture, I press ‘Use’ then nothing - just button no longer works and picture on screen. When I close the app the output from the prints in the listener appear in the console log.

Can someone tell me, before I pull out all of my remaining hair, how/where you code stuff to continue with your app i.e. get the screen back to something under your control. Some sample (working) code that does this would be really nice. [import]uid: 39538 topic_id: 17878 reply_id: 317878[/import]

Hey there,

What version of Corona are you using? (Camera sample code has had updates since release of .591.)

I just tested using a recent daily build and the image I chose to use shows on screen, plus tapping still launches the camera. (As the code tells it to.)

Peach :slight_smile: [import]uid: 52491 topic_id: 17878 reply_id: 68334[/import]

Hi Peach,

I’m on version 678.

It all works great on the simulator where you pick a photo. When I add my code to the listener it also runs correctly…in the simulator :slight_smile:

On the iPhone my code doesn’t seem to ever get run - just the photo gets taken, I press Use, the Retake/Use buttons go dimmer and it just sits there with the photo image on the screen.

If I run the unchanged sample code on the phone the same happens and I don’t see the output from the prints in the Xcode console immediately but when I press the home button on the phone to close it the output is written to the console.

I’m guessing that if you want to use the camera in an app you do something more than what’s in the sample code? People have obviously got this working so I was hoping someone could post some enhanced sample code that actually takes you back into your custom code after you take the photo.

Are you saying that on the phone you take a photo and click Use and then you can tap the screen again and take another photo? That definitely doesn’t work for me.
[import]uid: 39538 topic_id: 17878 reply_id: 68430[/import]

Woohoo! Working now.

It was a build problem. Fixed in #694.

Now what was it I was going to do with the camera? :slight_smile: [import]uid: 39538 topic_id: 17878 reply_id: 69900[/import]

Make a totally awesome app then stick a “Made with Corona” sticker on it? :wink: [import]uid: 52491 topic_id: 17878 reply_id: 69975[/import]