Hello,
Indeed, that’s exactly the same problem I am having now. Hopefully we or others can come up with a solution soon. 
I will come back to this post as long as I found a way out to this problem.
Have a good day all!
Hello,
Indeed, that’s exactly the same problem I am having now. Hopefully we or others can come up with a solution soon. 
I will come back to this post as long as I found a way out to this problem.
Have a good day all!
Ok. I’ve finally got it to work on iOS (iPad2 and iPhone5). I took a different approach this time and did not pass in baseDir and filename as it did not work for me on the device, although it works on simulator. Instead I use the api plain and simple which actually works on the device as it transfers the image to the app, as it turns out, then I save it to my documents folder. Here’s the full main.lua code below I used to try this out. I just load the previously captured image then put a touch listener on the image to dismiss it so I can take another picture and save it – it shows up automatically within this test app after taking the pic but it will also load it when the program is run again (needs to be killed each time.) Sorry, very simple test app, like I said. My real app has better functionality, of course, and I’m working on it. Now I need to figure out how to get it to work in android (nexus).
local img
local onComplete = function(event)
local img = event.target
if img then
img:setReferencePoint(display.CenterLeftReferencePoint)
img.x=display.contentWidth/2-img.width/2
img.y=display.contentCenterY
display.save(img,‘camera.jpg’,system.DocumentsDirectory)
end
end
local function ontouch()
if img then
img:removeSelf()
img=nil
end
media.show(media.Camera,onComplete)
end
local img=display.newImage(‘camera.jpg’,system.DocumentsDirectory)
if img then
img:setReferencePoint(display.CenterLeftReferencePoint)
img.x=display.contentWidth/2-img.width/2
img.y=display.contentCenterY
img:addEventListener(‘touch’,ontouch)
else
media.show(media.Camera,onComplete)
end
Hi msantos, Have u got it worked on Android? I still cannot have it worked on Samsung Galaxy NoteII. 
Hello! I had the same, or very similar issue: I was attempting to use the media.camera service with Storyboard. The Camera sample app worked just fine in the Corona simulator (it doesn’t use Storyboard). So, there seems to be a conflict between Storyboard and the media.camera service.
Specifically it looks like a scoping issue: If you look at the sample Camera app you will notice that both the “launchCameraListener” and “sessionComplete” functions are defined as “local”. In my code (with Storyboard) I removed “local” and now my app and the media.camera service work as expected!
I hope this helps.
Good luck.
I’m having exactly the same problem now. have you found the solution? if yes, please kindly share.
I believe that it was a problem with compatibility between the “widget” class and “director” class. I’ve switched to the storyboard class (instead of the director class), which seems to have solved the problem. The director class was created by a corona user, but not corona labs itself, so that may have been part of the issue.
I have been using Storyboard API so far. Nevertheless, I ended up in that same problem.
However, recently, I have just noticed that the camera sample app which is found in Corona SDK also doesn’t work on my android Galaxy Note II. The problem is that I can only open Camera, but then the picture didn’t display on screen at all. I have used logcat to see error logs on device. What I have noticed is that function call media.show(media.Camera, sessionComplete) doesn’t really go to sessionComplete after Camera opened. I noticed that by trying to print some messages in sessionComplete function, yet, I never got those messages printed out.
So, i think it’s a problem of Camera API itself. What do you think then? Thank for sharing idea with me here.
Perhaps there is a phone setting that allows/disallows applications to access native phone features?
Native phone features? I will try to look for it then. If you can think of other possible causes, please kindly let me know. thank. 
Hi @malypoeur,
Did you grant access to the device’s camera in “build.settings”? That is described in the documentation for “media.show”:
http://docs.coronalabs.com/api/library/media/show.html
and also here, more generally:
http://docs.coronalabs.com/guide/distribution/buildSettings/index.html#androidsettings
Hope this helps,
Brent
Hello Brent,
Yes, I really did. I have no clues now why it still doesn’t work. 
Thanks Brent,
Malypoeur
Hello Brent,
I have tested Camera sample app on different device HTC android, and it works. That same build does not work on Samsung Galaxy Note II and Samsung Galaxy S3. And that same build just happen to crash on android 2.3 (another phone of my friend).
Any suggestion idea would be appreciated. thank
Malypoeur
Hi malypoeur. I have not been able to get it to work on android yet. It is not a priority for me right now as I’m working on different parts of my app. I also had a business trip last week. I was hoping someone else could help me out with getting the camera to work on android (and, most importantly, to actually save the pictures taken to the app’s sandbox document folder.) Both methods I tried as suggested by the documentation failed on android. Only one of them worked on iOS but both should’ve worked. Anyone reading this and willing to help, please see my previous posts to this discussion which includes the code.
I’ve been having almost the same issue with media.Camera.
…
local onComplete = function(event)
local photo = event.target
print(‘±--------------------------------------------------’)
print(’| back from camera with photo: '…tostring(photo))
print(‘±--------------------------------------------------’)
if photo then
…
end
…
media.show(media.Camera,
{listener=onComplete},
{baseDir=system.DocumentsDirectory,filename=‘captured.jpg’,type=‘image’})
…
It works beautifully, as per documentation and example, on the Corona simulator on my rMBP. I am even able to take pictures on my rMBP (it automatically uses the facetime camera) and each picture gets transferred nicely into the app via the listener (onComplete). The file is saved automatically on the documents folder. However, after building my app and deploying it to iPad2, iPhone5 and Asus Nexus (android,) it does *not* work in the end (the most important step, which is saving the picture taken and/or passing it into the app.) The camera shows up and I can take the picture on all devices, however, the picture does not get transferred to the app. I put a print statement in the listener to see it but it simply comes back from the camera as *nil* (seen in xcode device console.) Note that the same print statement on the simulator shows a nice table memory address pointer as it should. It just does not work on any of my devices. I am using corona’s storyboard and have set the camera permissions for android, which is not required for iPhone, by the way. I can also rule out writing permission issues and such as I was able to save and load an asset image (bundled with the app) to and from within system.DocumentsDirectory on all devices with no problems. I’ll continue looking for a solution and post if I find it, but I would appreciate if someone could post their solution.
Hello,
Indeed, that’s exactly the same problem I am having now. Hopefully we or others can come up with a solution soon. 
I will come back to this post as long as I found a way out to this problem.
Have a good day all!
Ok. I’ve finally got it to work on iOS (iPad2 and iPhone5). I took a different approach this time and did not pass in baseDir and filename as it did not work for me on the device, although it works on simulator. Instead I use the api plain and simple which actually works on the device as it transfers the image to the app, as it turns out, then I save it to my documents folder. Here’s the full main.lua code below I used to try this out. I just load the previously captured image then put a touch listener on the image to dismiss it so I can take another picture and save it – it shows up automatically within this test app after taking the pic but it will also load it when the program is run again (needs to be killed each time.) Sorry, very simple test app, like I said. My real app has better functionality, of course, and I’m working on it. Now I need to figure out how to get it to work in android (nexus).
local img
local onComplete = function(event)
local img = event.target
if img then
img:setReferencePoint(display.CenterLeftReferencePoint)
img.x=display.contentWidth/2-img.width/2
img.y=display.contentCenterY
display.save(img,‘camera.jpg’,system.DocumentsDirectory)
end
end
local function ontouch()
if img then
img:removeSelf()
img=nil
end
media.show(media.Camera,onComplete)
end
local img=display.newImage(‘camera.jpg’,system.DocumentsDirectory)
if img then
img:setReferencePoint(display.CenterLeftReferencePoint)
img.x=display.contentWidth/2-img.width/2
img.y=display.contentCenterY
img:addEventListener(‘touch’,ontouch)
else
media.show(media.Camera,onComplete)
end
antkmk,
I saw your post but did not have time to react to it so I almost ignored it. I apologize. I will try your solution soon and update. Crossing my fingers.
Thanks!
Hi msantos, Have u got it worked on Android? I still cannot have it worked on Samsung Galaxy NoteII. 
Hello! I had the same, or very similar issue: I was attempting to use the media.camera service with Storyboard. The Camera sample app worked just fine in the Corona simulator (it doesn’t use Storyboard). So, there seems to be a conflict between Storyboard and the media.camera service.
Specifically it looks like a scoping issue: If you look at the sample Camera app you will notice that both the “launchCameraListener” and “sessionComplete” functions are defined as “local”. In my code (with Storyboard) I removed “local” and now my app and the media.camera service work as expected!
I hope this helps.
Good luck.
Hi malypoeur. I have not been able to get it to work on android yet. It is not a priority for me right now as I’m working on different parts of my app. I also had a business trip last week. I was hoping someone else could help me out with getting the camera to work on android (and, most importantly, to actually save the pictures taken to the app’s sandbox document folder.) Both methods I tried as suggested by the documentation failed on android. Only one of them worked on iOS but both should’ve worked. Anyone reading this and willing to help, please see my previous posts to this discussion which includes the code.