Android camera preview tutorial -


i have litte problem tutorial follow. want make android application camera preview, until haven't found tutorial show how it. here link the tutorial i'm not quite shure if can use "camera intent" insted of "camera preveiew" ? do.

thanks :)

below tutorials you.

http://www.vogella.com/articles/androidcamera/article.html

http://developer.android.com/resources/samples/apidemos/src/com/example/android/apis/graphics/camerapreview.html

call inbuilt camera intent have picture.

public class demo extends activity {  button buttonclick; int camera_pic_request = 1337;    @override public void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     setcontentview(r.layout.main);      buttonclick =(button) findviewbyid(r.id.camera);     buttonclick.setonclicklistener(new onclicklistener (){         @override         public void onclick(view view)         {             intent cameraintent = new intent(android.provider.mediastore.action_image_capture);             // request code              startactivityforresult(cameraintent, camera_pic_request);          }     });  }  @override protected void onactivityresult(int requestcode, int resultcode, intent data)  {     if( requestcode == 1337)     {     //  data.getextras()         bitmap thumbnail = (bitmap) data.getextras().get("data");            have received bitmap..you can pass bitmap other activity           , play in activity or pass bitmap other activity           , upload server.     }     else      {         toast.maketext(demo.this, "picture not taken", toast.length_long);     }     super.onactivityresult(requestcode, resultcode, data); } } 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -