0

I have a surface view, 3 buttons one each for capture, use(invisible) and retake(invisible). I am using the Camera to take a picture. On image capture, use and retake buttons become visible and capture goes invisible. How to save the image in SD card on clicking the use button. Can anyone help with any example code. ??

Inshort I dont want to skip retake and skip option after capturing a pic in android !!! No use of intents !! only using android camera

How to skip 'retake and use' option after captureing photo from camera

Community
  • 1
  • 1
Anonymous
  • 55
  • 7

1 Answers1

0

Here is a nice tutorial on taking picture in Android: http://www.vogella.com/tutorials/AndroidCamera/article.html

In the nutshell, after you call Camera.takePicture(), a onPictureTaken() callback is called with jpeg image in byte[]. You convert this image to bitmap (preferably scaled down) for display, and you can write this byte[] as is to a .jpg file if the user likes it.

Alex Cohn
  • 56,089
  • 9
  • 113
  • 307
  • I want to make the image viewable on the surface once I click on the capture... any idea about this on how can this be done? – Anonymous Feb 23 '14 at 20:54
  • You can use the canvas to draw, but the conventional approach is to display a simple ImageView on top of the surface. In terms of UX it is just the same as drawing on the surface. – Alex Cohn Feb 23 '14 at 21:52
  • Can you post some example code for the same..?? I am still confused about it – Anonymous Feb 24 '14 at 02:23