5
, bir dosya var: Bu benim sınıfta doğrudan bildirilmişBitmapFactory.decodeFile(); Benim uygulamada
private File TEMP_PHOTO_FILE = new File(Environment.getExternalStorageDirectory(), "temp_photo.jpg");
ve orada tüm yöntemlere görülebilir
Bunu kullanmak istiyorum.
Bitmap thePhoto = BitmapFactory.decodeFile(Uri.fromFile(TEMP_PHOTO_FILE).toString());
Bu neden çalışmıyor: "///mnt/sdcard/temp_photo.jpg dosyası:"
Uri.fromFile (TEMP_PHOTO_FILE) .ToString() dize oluşturur? Bir dosya ile uğraştığımız için, bir URI'yi girdi olarak kabul eden bir decodeFile() yöntemi kullanılmalıdır. Buna izin vermemek, tutarsızlıktan dolayı çok sinir bozucu.