根据包名获取应用程序基本信息

/**

* 获取应用程序基本信息

* @throws NameNotFoundException 

*/

private void getPackaName(String packname) throws NameNotFoundException {

PackageManager pm = getPackageManager();

ApplicationInfo info = pm.getApplicationInfo(packname, 0);

icon = info.loadIcon(pm);

appname = (String) info.loadLabel(pm);

}

    原文作者:CleanCup
    原文地址: https://blog.csdn.net/yushanfenghailin/article/details/20282787
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞