Each app has a display name in Settings-App
.
String getApplicationDisplayName(Context ctx, String packageName) throws PackageManager.NameNotFoundException {
PackageManager pm = ctx.getPackageManager();
ApplicationInfo info = pm.getApplicationInfo(packageName, 0);
String displayName = info.loadLabel(pm).toString();
Log.v(TAG, "GetApplicationDisplayName: Application display name is: " + displayName);
return displayName;
}
Outputs:
GetApplicationDisplayName: Application display name is: AnTuTu Benchmark
网友评论