Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 读取并返回设备上安装的应用程序_Android - Fatal编程技术网

Android 读取并返回设备上安装的应用程序

Android 读取并返回设备上安装的应用程序,android,Android,我是android的新开发人员,正在努力开发我的应用程序,因为我需要一个函数或其他东西来读取并返回安装在设备上的应用程序,如果有人能帮助我,我感谢你//获取安装的标签名称 //getting label name which is install PackageManager p = mContext.getPackageManager(); List<ApplicationInfo> info = p.getInstalledApp

我是android的新开发人员,正在努力开发我的应用程序,因为我需要一个函数或其他东西来读取并返回安装在设备上的应用程序,如果有人能帮助我,我感谢你

//获取安装的标签名称
//getting label name which is install
            PackageManager p = mContext.getPackageManager(); 
            List<ApplicationInfo> info = p.getInstalledApplications(0);
            for(int i=0;i<info.size();i++){
                String label = p.getApplicationLabel(info.get(i)).toString();
                System.out.println("LABEL:"+label);
            }
PackageManager p=mContext.getPackageManager(); 列表信息=p.GetInstalledApplication(0); 对于(int i=0;i