ورود

View Full Version : file type nost supported



master9712
دوشنبه 10 شهریور 1393, 17:03 عصر
[LTR_INLINE]سلام
من از این کد برای ذخیره ی عکس توی جاوا ایکیلیپس استفاده کردم .

String iconsStoragePath = Environment.getExternalStorageDirectory() + "/myAppDir/myImages_";
File sdIconStorageDir = new File(iconsStoragePath);

sdIconStorageDir.mkdirs();



try {
String filePath = sdIconStorageDir.toString() +filename;


FileOutputStream OutputStream = new FileOutputStream(filePath);


BufferedOutputStream bos = new BufferedOutputStream(OutputStream);


//choose another format if PNG doesn't suit you
imageData.compress(CompressFormat.JPEG, 100, bos);

bos.flush();
bos.close();
} catch (FileNotFoundException e) {
Log.w("TAG", "Error saving image file: " + e.getMessage());
return false;
} catch (IOException e) {
Log.w("TAG", "Error saving image file: " + e.getMessage());
return false;
}

یه پوشه ایجاد میشه

ولی اجازه ی خوندن نداره و تو گوشی میگه file type not supported
کسی میدونه مشکلش چیه؟!

saeed_g21
دوشنبه 10 شهریور 1393, 17:18 عصر
خودت میگی "اجازه ی خوندن نداره " مجوز دسترسی رو براش تعریف کردی در مانیفیست ؟

master9712
دوشنبه 10 شهریور 1393, 22:14 عصر
اره حتی وقتی میزنم
canread , canexcute
true ست.