How Camera starts in Android -


i understanding code flow of android camera available in android source code. can please tell me method in camera activity responsible invoke camera hardware when switch on camera home activity?

i checked in camera.java(first activity called when user starts camera home) did not find suitable path.

any appreciated.

create intent launch camera application:

private static final int camera_pic_request = 9999; // can intent cameraintent = new intent(android.provider.mediastore.action_image_capture);  startactivityforresult(cameraintent, camera_pic_request);  

handle result got camera:

protected void onactivityresult(int requestcode, int resultcode, intent data) {       if (requestcode == camera_pic_request) {           bitmap thumbnail = (bitmap) data.getextras().get("data"); // picture taken       }   } 

to use camera in application need request special permission well. put manifest file:

<uses-feature android:name="android.hardware.camera"></uses-feature>  

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 -