I saved a bitmap image into android internal storage. Now i want to retrieve this image that is /myphoto.jpg and share it using shareIntent. how can i read my myphoto.jpg from internal storage memory. Ideally I expect to get a file path.
ByteArrayOutputStream outputBuffer = new ByteArrayOutputStream();
bm.compress(Bitmap.CompressFormat.JPEG, 100, outputBuffer);
byte[] byteImage1=outputBuffer.toByteArray();
//save file to internal storage
FileOutputStream outputStream;
try {
outputStream = context.openFileOutput("myphoto.jpg", Context.MODE_PRIVATE);
outputStream.write(byteImage1);
outputStream.close();
} catch (Exception e) {
e.printStackTrace();
}