String imageInSD = Environment.getExternalStorageDirectory()+"/DCIM/Soovy/2089.jpg";
Bitmap bitmap = BitmapFactory.decodeFile(imageInSD);
if(bitmap == null){
Log.v("combine image", "null");
}else{
Log.v("combine image", "not null");
}
更新:使用Environment.getExternalStorageDirectory()感謝您的信息BitmapFactory.decodeFile()返回null,當我試圖讓圖像
所以你得到它的工作? – 2013-02-22 07:47:18
嘗試:'String imageInSD = Environment.getExternalStorageDirectory()。getAbsolutePath()+ File.separator +「DCIM/Soovy/2089.jpg」;' – Akash 2013-02-22 07:48:00
yes got is working and as aasasasia mentioned should use Environment.getExternalStorageDirectory() – jhdj 2013-02-22 09:38:17