简体   繁体   中英

How to get the Image location from URI string in terms of integer

What i have programmed : I am using camera which selects the image from camera or gallery and returns an Uri on onActivityREsult


I have a Uri location which i retrieved from the camera

String mUri="------------------";

Now using mUri how can i find the image location(place where the URI is pointing to) in terms of int .

Should i need to create a file with it ?, why to create a file since the image is already created ?

With the help of Commonsware in one of the comments. I resolved this issue by converting back a string to URI object.


Uri.fromFile(new File("/sdcard/cats.jpg"))

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