This article is an example of how the Android implementation returns the image feature of the shot. Share to everyone for your reference. Specifically as follows:
First step:
try { Intent Intent = new Intent (mediastore.action_image_capture); Startactivityforresult (Intent, 0);
} catch (Activitynotfoundexception e) {/Do No to now
}
Step Two:
@Override
protected void onactivityresult (int requestcode, int resultcode, Intent data) {
try {
if ( Requestcode!= 0) {return
;
}
Super.onactivityresult (Requestcode, ResultCode, data);
Bundle extras = Data.getextras ();
Bitmap B = (Bitmap) extras.get ("Data");
//
ImageView a = (ImageView) Findviewbyid (r.id.imageview1);
A.setimagebitmap (b);
* * Get pictures to deal with
pictures ...
/* catch (Exception e) {
//Todo:handle Exception
System.out.println (E.getmessage ());
}
I hope this article will help you with your Android program.