Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Instagram custom URL scheme for Android

I need to run the Instagram Application, using the HTML link. For iPhone I use iPhone Hooks(Instagram iPhone Hooks).

How can I do the same for Android?

like image 545
Atwo Omich Avatar asked Feb 25 '13 09:02

Atwo Omich


1 Answers

There's a thread on this subject in the Instagram API Developers group on Google Groups.

According to Mike Krieger, who is one of the Instagram developers, you can already achieve Document Interaction on Android using Intents. If that is what you need, you should look at the Android document on sharing with intents.

The basic code for sharing an image (which should popup Instagram as one of your sharing options) would look like this:

Intent intent = new Intent(Intent.ACTION_SEND);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
intent.setType("image/*");
Uri uri = Uri.fromFile(getFileStreamPath(pathToImage));
intent.putExtra(Intent.EXTRA_STREAM, uri);
startActivity(Intent.createChooser(intent, "How do you want to share?"));

pathToImage is obviously the filename of the image you want to share.

Unfortunately there doesn't appear to be support for any of the custom URL functionality at this point. So if that is what you're after, I would suggest you provide feedback in that Google Groups thread saying specifically which functionality you need.

like image 109
James Holderness Avatar answered Sep 22 '22 05:09

James Holderness