Suraw, I think you should download a picture before sharing it. You can do it manually , or maybe you can use a library like this . You can find easy documentation in the library repository on how to configure and use it.
Once you have uploaded the image, you can follow this method:
private Intent shareIntent(String bookmark_url, String imagePath){ sharingIntent = new Intent(android.content.Intent.ACTION_SEND); sharingIntent.setType("*/*"); sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, "I am reading this publication, check it out here: "+bookmark_url); sharingIntent.putExtra(android.content.Intent.EXTRA_STREAM, Uri.fromFile(new File(imagePath))); return sharingIntent; }
If you just want to simulate Image Analysis on the fly, delete it after sharing.
Hope this helps you!
user2528167
source share