OK, therefore, regardless of the first ActionBarSherlock test, to make sure you created your intent correctly, ABS uses the same code as the general selector, so see if the application you are looking for appears when you run this code.
Intent I= new Intent(Intent.ACTION_SEND); I.setType("text/plain"); I.putExtra(android.content.Intent.EXTRA_TEXT, "My Test Text"); startActivity(Intent.createChooser(I,"Share using ..."));
All this application that processes plain text will be displayed, if facebook or what you expect does not exist, then this application does not support the ACTION_SEND intent for the type you registered (plain / text). (Facebook does, but more about that in a minute)
The ABS has a pattern for using a stock provider, but it is trying to send a photo, not a text message (status update) that you should use - it's something like this
@Override public boolean onCreateOptionsMenu(Menu menu) {
And here is the intention that will be used to map the application and list it from the sample
private Intent createShareIntent() { Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.setType("image/plain"); Uri uri = Uri.fromFile(getFileStreamPath("shared.png")); shareIntent.putExtra(Intent.EXTRA_STREAM, uri); shareIntent.putExtra(Intent.EXTRA_TITLE, "This is an android icon"); return shareIntent; }
but you want him to be
private Intent createShareIntent() { Intent I= new Intent(Intent.ACTION_SEND); I.setType("text/plain"); I.putExtra(android.content.Intent.EXTRA_SUBJECT, "TEST - Disregard"); I.putExtra(android.content.Intent.EXTRA_TEXT, Uri.parse("http://noplace.com")); }
This should give you the same list in ABS as in the little test stub I showed with the selection above.
Now about the bad news. The Facebook application does not really work, it will open the user update page, but the text will not be filled. It's turned on again, broken again, but I tried it last night and it failed. This is a reported and accepted error with the facebook application. You can post photos, although although the signature cannot be set, see How many times will Facebook break / fix it?