[英]How to get the Image location from URI string in terms of integer
我編程的內容 :我正在使用相機從相機或圖庫中選擇圖像並返回onActivityREsult
上的Uri
我有一個Uri位置,我從相機檢索
String mUri="------------------";
現在,使用mUri
我怎么能找到圖像的位置(地方,URI指向)來講int
。
我是否需要使用它創建文件?,為什么要創建文件,因為圖像已經創建?
在Commonsware的幫助下,其中一條評論。 我通過將字符串轉換回URI對象來解決此問題。
Uri.fromFile(new File("/sdcard/cats.jpg"))
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.