ResolveInfo



                        PackageManager pManager = MessageSendActivity.this.getPackageManager();

                  

                   /*********************查询手机内所有支持分享的应用*********************/

                   List<ResolveInfo> resolveList  = Utils.getShareApps(MessageSendActivity.this);

                  

                   for(int i=0;i<resolveList.size();i++) {

                   ResolveInfo resolve = resolveList.get(i);

                   ShareItemInfo shareItem = new ShareItemInfo();

                   //set Icon

                  shareItem.setIcon(resolve.loadIcon(pManager));

                   //set Application Name

                   shareItem.setLabel(resolve.loadLabel(pManager).toString());

                   //set Package Name

                   shareItem.setPackageName(resolve.activityInfo.packageName);

                  

                   }

你可能感兴趣的:(info)