setting picture captured by built-in camera into an ImageView

Posted by MAkS on Stack Overflow See other posts from Stack Overflow or by MAkS
Published on 2010-03-09T13:27:29Z Indexed on 2010/03/14 1:45 UTC
Read the original article Hit count: 496

Filed under:
|
|

in my app i m calling built in camera for capturing picture but i want to set that picture into an image view following is the code . so what code should i add to it to set the picture into imageview.

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
    startActivityForResult(intent, 0);


}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == Activity.RESULT_OK && requestCode == 0) {
String result = data.toURI();
// ...
}
}

Thanks in advance

© Stack Overflow or respective owner

Related posts about android

Related posts about camera