2016-03-07 103 views
0

我能夠使用來自URI方法getUnlockedImageUriImageManager顯示成就圖像,但由於某些原因,我需要找到圖像的本地路徑,因爲我不想使用ImageView和I需要將圖像的實際文件路徑查找本地路徑getUnlockedImageUri

谷歌的URI玩遊戲的成績看起來是這樣的content://com.google.android.gms.games.background/images/d2bbfba4/61,我是希望能夠將其轉換爲一個File對象象下面這樣:

File myFile = new File(ach.getUnlockedImageUri().getPath()); 
Log.i(ExConsts.TAG, "myFile.exists() = " + myFile.exists()); 
// returns false! 

但是,不起作用!任何想法爲什麼?或者我應該嘗試什麼?或者甚至告訴我是否有可能?

回答