Hello All,
I’ve hit a problem that seems to be plaguing my poor little Nexus S. I was attempting to capture an image via the built-in Android Camera application using the latest daily build (2012.846) but it seems that the camera app never correctly returns back to my application.
I am using storyboard, but even the sample camera application doesn’t work for me:
[lua]local sessionComplete = function(event)
local image = event.target
print( "Camera ", ( image and “returned an image” ) or “session was cancelled” )
print( "event name: " … event.name )
print( "target: " … tostring( image ) )
if image then
– center image on screen
image.x = display.contentWidth/2
image.y = display.contentHeight/2
local w = image.width
local h = image.height
print( “w,h = “… w …”,” … h )
end
end
local listener = function( event )
if media.hasSource( media.Camera ) then
media.show( media.Camera, sessionComplete )
else
native.showAlert(“Corona”, “Camera not found.”)
end
return true
end
bkgd:addEventListener( “tap”, listener )[/lua]
This will correctly open the Camera app and allow me take a picture. I then accept the preview but it just returns to the application with no response. No image displayed (in the sample) and in my actual application it doesn’t even trigger the equivalent sessionComplete listener.
I’m wondering if it is something to do with support for application suspension and the return back to the Corona activity. Nothing strange seems to be coming out of ADB either, so I’m at a loss without a chance to browse further debug messages. [import]uid: 122384 topic_id: 28479 reply_id: 328479[/import]