I have included \'share via myApp\' option. I inserted following code in the receiving activity class.
// Get the intent that started this activity
I
Please prefer this link.
This is what you are looking for How to get Bitmap from an Uri?
Try this it works for me:
public static Bitmap getBitmapFromURL(String src) {
try {
System.out.printf("src", src);
URL url = new URL(src);
HttpURLConnection connection = (HttpURLConnection) url
.openConnection();
connection.setDoInput(true);
connection.connect();
InputStream input = connection.getInputStream();
Bitmap myBitmap = BitmapFactory.decodeStream(input);
System.out.printf("Bitmap", "returned");
myBitmap = Bitmap.createScaledBitmap(myBitmap, 100, 100, false);//This is only if u want to set the image size.
return myBitmap;
} catch (IOException e) {
e.printStackTrace();
System.out.printf("Exception", e.getMessage());
return null;
}