android - Only Four Options For ShareActionProvider With ActionBarSherlock -
i trying share plain text while using share action provider via actionbarsherlock , there 4 options share , no "see all..." option.
why that?
this looks like:

and want like:

ok regardless of actionbarsherlock first test see if creating intent correctly, abs uses same code generic chooser see if app's looking show when execute 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 of app's handle plain text show up, if facebook, or whatever expecting not there app's don't support action_send intent type have registered (plain/text). (facebook does, more in minute)
abs has sample using share action provider try's send photo, not text message (status update) setup should using
@override public boolean oncreateoptionsmenu(menu menu) { // inflate menu. getsupportmenuinflater().inflate(r.menu.share_action_provider, menu); // set file share history provider , set share intent. 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); // note can set/change intent time, // when user has selected image. provider.setshareintent(createshareintent()); return true } and here intent used match app's , list them out 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 android icon"); return shareintent; } but want
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 same list in abs @ did in small test stub showed chooser above.
now bad news. facebook app doesn't work, bring users update page, won't fill in text. on again, off again breakage, tried last night , failing. it's reported , accepted bug facebook app. can post photo's though, although caption can't set see how many times facebook break/fix this?
Comments
Post a Comment