public static void getAppInfo(Context context) {
if (context == null) {
return;
}
try {
PackageManager packageManager = context.getPackageManager();
PackageInfo info = packageManager.getPackageInfo(context.getPackageName(), 0);
//获取包名
String packName= info.packageName;
//当前版本号
String versionName=info.versionName;
//UID
String uid = info.sharedUserId;
//获取游戏名
String gameName =String.valueOf(packageManager.getApplicationLabel(context.getApplicationInfo()));
} catch (Throwable e) {
}
}
获取安卓app的常用信息
最新推荐文章于 2024-05-14 17:35:43 发布