获取手机上安装的应用信息

  public Map getAppInfoMap(String paramString)
  {
    try
    {
      HashMap localHashMap = new HashMap();
      PackageManager localPackageManager = this.b.getPackageManager();
      Intent localIntent = new Intent("android.intent.action.MAIN", null);
      localIntent.addCategory("android.intent.category.LAUNCHER");
      List localList = localPackageManager.queryIntentActivities(localIntent, 1);
      for (int j = 0; j < localList.size(); j++)
      {
        ResolveInfo localResolveInfo = (ResolveInfo)localList.get(j);
        if (localResolveInfo.activityInfo.packageName.equals(paramString))
        {
          String str1 = localResolveInfo.loadLabel(localPackageManager).toString();
          int k = localResolveInfo.activityInfo.applicationInfo.icon;
          String str2 = localResolveInfo.activityInfo.name;
          if ((str2 != null) && (!"".equals(str2.trim())))
          {
            localHashMap.put("appName", str1);
            localHashMap.put("appIcon", Integer.valueOf(k));
            localHashMap.put("activityName", str2);
            return localHashMap;
          }
        }
      }
    }
    catch (Exception localException)
    {
    }
    return null;
  }

获取手机上安装的应用信息,,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。