I had a bad experience with the camera application, though i have
successfully do it. The problem here most of the device htc returns the uri
where as in samsung and nextil it was returning the intent data.  it all
about adding conditions and all.


Warm Regards,
*Mukesh Kumar*,
Android Consultant/Freelancer,
India,Hyderabad.

On Thu, Dec 29, 2011 at 7:07 PM, Lidia <[email protected]> wrote:

> 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 [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-developers?hl=en
>



-- 
Warm Regards,
*Mukesh Kumar*,
Android Consultant/Freelancer,
India,Hyderabad.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en

Reply via email to