android - How to get the shortcut menu name of Intent? -
i can use following code packagename , activityinfo.name of intent.
hope shortcut menu name such "add dropbox" image below, how can ? thanks!
private void getshare() { intent share = new intent(android.content.intent.action_send); share.settype("image/*"); list<resolveinfo> resinfo = getpackagemanager().queryintentactivities(share, 0); if (!resinfo.isempty()){ (resolveinfo info : resinfo) { toast.maketext(getapplicationcontext(),info.activityinfo.packagename.tolowercase() +" cw " +info.activityinfo.name.tolowercase() ,toast.length_long).show(); } } }
you can activityinfo.labelres
edit: returns int referencing string res id. still have package's res map correct string.
Comments
Post a Comment