Hello developers,

Does anyone knows a smart/short solution for the following situation?

I used the following code to get the path for just created photo with
camera capture.


startActivityForResult( new Intent(
android.provider.MediaStore.ACTION_IMAGE_CAPTURE),
                        MY_ACTION_UPLOAD_IMAGE);


and

@Override
public void onActivityResult(int requestCode, int resultCode,final
Intent data) {
                super.onActivityResult(requestCode, resultCode, data);

                if ( requestCode == MY_ACTION_UPLOAD_IMAGE && resultCode ==
Activity.RESULT_OK) {
                        final Uri picUri = data.getData();
                        //and then something like
                        getRealPathFromURI(picUri );
                }
        }




But happens that not on all devices this method is working , sometimes
the data.getdata() is null instead of returning a path like "/mnt/
sdcard/DCIM/100MEDIA/IMAG0219.jpg"

On  HTC desire (2.2) and LG univa or optimus hub 510  (2.2.2) is
working good
and on  Sumsung galaxy S (2.3.3); alcatel move (2.2.2) and samsung
galaxy mini is not working

Is this an android issue?

Also
Bitmap photo = (Bitmap) data.getExtras().get("data");
is working on all devices, a valid bitmap object is returned.

But this is not a good solutions for me, i do not whant to save by
myself a returned bitmap and duplicate files, as there already exists
this image, i just need to get its path.


Thanks in Advance
Lidy

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to