Skip to content Skip to sidebar Skip to footer

Open Instagram App From Another Android App And Send An Image With A Caption

What I basically looking for is to open Instagram app from another app and send an Image with a caption. There is some useful documentation to do this in iOS. (iPhone-hooks) Do Ins

Solution 1:

Looking at this question, and in particular to this answer by Chriskot, it looks that since July 2014 Instagram lets you do this.

Long story short

Intentinstagram=newIntent(android.content.Intent.ACTION_SEND);  
instagram.setType("image/*");
instagram.putExtra(Intent.EXTRA_STREAM, [URI of photo]);
instagram.putExtra(Intent.EXTRA_TEXT, [Text of caption]);
instagram.setPackage(instagramPackageName);   
startActivity(instagram);

Solution 2:

Short answer, No.

Instagram doesn't have an Android equivalent to iPhone-hooks.

They do support the ACTION_SEND but only take into account the Intent.EXTRA_STREAM on their end.

Unless something changed in the past 4 months (I doubt it) that this guy took a stub on their code, from their AndroidManifest.xml you can assume, by looking in their intent catcher Activity that they only care for android.intent.extra.STREAM.

So for now, you can't send any other data than the actual image.

Post a Comment for "Open Instagram App From Another Android App And Send An Image With A Caption"