Get a list of posible app to share content on android -
when use intent.actionsend , android shows dialog, of posibles places send content.
i know if posible take list of applications ,where can share, , have like:
list<string> shareoptions --> {com.facebook, com.gmail, com.whatever...}
thank much.
you can this:
list<resolveinfo> rinfo = getactivity().getpackagemanager().queryintentactivities(createshareintent(),0); private intent createshareintent() { intent shareintent = new intent(intent.action_send); shareintent.putextra(intent.extra_text,"text share"); shareintent.settype("text/plain"); return shareintent; } list<string> shareoptions = new arraylist<string> ();
to list of package name:
for(resolveinfo r:rinfo){ string packagename = r.activityinfo.packagename; // whatever want here. populate own list view shareoptions.add(packagename); }
Comments
Post a Comment