Android How to preview an image, using its file path from SDcard, from my application
File is present in sdcard/image.jpg
Need some help.
you can create an Intent with proper uri and mimetype for this.
Intent i = new Intent(Intent.ACTION_VIEW);
i.setDataAndType(Uri.parse("file:///sdcard/image.jpg"), "image/jpeg");
startActivity(i);
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
photoPickerIntent.setType("image/*");
startActivityForResult(photoPickerIntent, 1);
This code use for display all images from your SD card
精彩评论