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're 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 ..."));
, , , facebook , , , ACTION_SEND (plain/text). (Facebook , )
, , ( ), , - -
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getSupportMenuInflater().inflate(R.menu.share_action_provider, menu);
MenuItem item = menu.findItem(R.id.menu_item_share_action_provider_action_bar);
ShareActionProvider provider = (ShareActionProvider) item.getActionProvider();
provider.setShareHistoryFileName(ShareActionProvider.DEFAULT_SHARE_HISTORY_FILE_NAME);
provider.setShareIntent(createShareIntent());
return true
}
,
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;
}
,
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"));
}
ABS, , .