美文网首页
android如何打印app信息

android如何打印app信息

作者: 学习不断 | 来源:发表于2017-11-29 09:40 被阅读27次

以下方法可打印APP信息,用作debug

Set debuggableApps =newHashSet();

List apps = getPackageManager().getInstalledApplications(PackageManager.GET_META_DATA);

for(ApplicationInfo app : apps) {

String appName = app.packageName;

if((app.flags& ApplicationInfo.FLAG_DEBUGGABLE) == ApplicationInfo.FLAG_DEBUGGABLE) {

debuggableApps.add(appName);

System.out.println("---------this is debuggable app------ ");

System.out.println(app.sourceDir);

System.out.println(appName);

}

}

相关文章

网友评论

      本文标题:android如何打印app信息

      本文链接:https://www.haomeiwen.com/subject/ihxubxtx.html