Take Picture

All your problems with Audio, Video and Images.

Take Picture

Postby doubleslash » Fri Mar 06, 2009 2:00 am

Hi,
I'm wondering what issues are absolutely needed to be addressed after taking a picture. I draw camera preview onto a surfaceview as instructed in the google sample code. When a picture is taken by calling
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. camera.takePicture(new shutter(), null, new jpgCallback())
Parsed in 0.030 seconds, using GeSHi 1.0.8.4

I get a runtime error if I leave those implemented methods blank. So, my questions are:
1. Inside shutter callback and picturecallback, what do I need to do?
2. What happens to the surfaceview used for drawing preview? Is it destroyed, paused?

Thanks for looking. Any help is appreciated
doubleslash
Developer
Developer
 
Posts: 30
Joined: Fri Feb 13, 2009 6:05 am

Top

Postby doubleslash » Fri Mar 06, 2009 6:50 am

Here's a little more info. I followed the google sample camera preview code almost identically except that I added the functionality of taking a picture upon keydown. I ran the app on an actual device instead of the emulator's fake camera. One of the messages I found from the debug logcat's output is something like "faled to initialize raw data heap". Could this be because I don't have a memory card? BUt the native camera app can take pics just fine and save them to the Pictures folder. A bit confused...
doubleslash
Developer
Developer
 
Posts: 30
Joined: Fri Feb 13, 2009 6:05 am

Postby Haibane » Fri Mar 06, 2009 2:36 pm

I guess you need an sdcard to use the camera
User avatar
Haibane
Junior Developer
Junior Developer
 
Posts: 17
Joined: Fri Feb 13, 2009 10:05 am
Location: Klagenfurt, Austria

Postby doubleslash » Fri Mar 06, 2009 8:11 pm

I was able to confirm that my phone has an sdcard though. I still get gerror message raw data heap failed to initilize. How can I take a picture and save it? Apparently, saving a pic is a big pain too. Can someone help?
Thanks
doubleslash
Developer
Developer
 
Posts: 30
Joined: Fri Feb 13, 2009 6:05 am

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 17 guests