The file is present in sdcard/image.jpgI would like to create my own application (activity). When a button is pressed, the image stored on the SD card should be displayed using the integrated image viewer. When I click the back button in the image viewer, it should return to my running application.
sdcard/image.jpg
Help is needed.
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK); photoPickerIntent.setType("image/*"); startActivityForResult(photoPickerIntent, 1);
This code is used to display all the images from your SD card.
You can create an intent with the 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);