Hi,
how can start taking picture with camera and in dialog result get uri
for that picture.

I did following:

... for audio
Intent intent = new Intent
("android.provider.MediaStore.RECORD_SOUND");
startActivityForResult(intent, 2);

... for picture
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, 3);
...
@Override
    protected void onActivityResult(int requestCode, int resultCode,
Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        String result = "";
        switch (requestCode){
        case 2:
            if (resultCode == Activity.RESULT_OK){
                result = data.toURI();
                // FOR AUDIO I DID GET CONTENT URI AND IT EXISTS ON
SDCARD
            }
            break;
        case 3:
            if (resultCode == Activity.RESULT_OK){
                 // HERE I WOULD LIKE TO GET CONTENT URI FOR PICTURE
AND I CAN'T FIND IT ANYWHERE
            }
            break;
        }
    }

I have noticed that in extras there is some Parcel object but I don't
know how to use it?

With
[
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File
(Environment.getExternalStorageDirectory(), path)));
]
before starting activity I can get picture but I need to set path and
I don't know how to find what is its content uri ?!

Can anybody help ?

Thanks, MATijA.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to