简体   繁体   中英

camera takes picture where it temporary save picture in android?

im working on project and requirements of the project is to do some action if camera takes any picture any suggestions on how can i do this......

this issue is solvable but it need your help so please give any suggestions http://developer.android.com/reference/android/hardware/Camera.html#ACTION_NEW_PICTURE this link is not have any help about my question

use

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, pathToSave);
startActivityForResult(intent, TAKE_PIC);

and

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {

    switch (requestCode) {
    case TAKE_PIC:
            //Do with the "pathToSave" what you want

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM