Currently I have a pretty standard ACTION_SEND intent to share information from inside my app. Code is similar to what is below:
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, subject);
intent.putExtra(Intent.EXTRA_TEXT, text);
context.startActivity(Intent.createChooser(intent, title));
Now, if the user has the Facebook app installed on their phone then Facebook shows up as an option for the intent chooser. However, I want to intercept the user’s click on “Facebook” and use the Facebook SDK to carry out the task instead of the Facebook application already on the users phone. Is there a way to intercept the onClick for the Facebook option? Thanks!
Here is a link to my blog post with a detailed solution, including code and screen shots.
http://clickclickclack.wordpress.com/2012/01/03/intercepting-androids-action_send-intents/
As quoted from that article: