I am trying to open a jpg image file in gallery. This gives a error. I am using the code below
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse("/mnt/sdcard/image123.jpg"),"image/jpeg");
startActivityForResult(intent, 900);
This gives a option to open file in gallery. I select Gallery from the list. But it does not open up. I use ASTRO file manager and open the same image f开发者_JAVA百科ile. It opens up fine now. Please let me know if something is wrong.
Where do you got /mnt/sdcard
. Try Environment.getExternalStorageDirectory().getAbsolutePath() instead.
Specified Image Path? You can't.
Please Refer My Question as How to access different File Manager specific path. Refer this link and then you got a answer.
精彩评论