Skip to content

Instantly share code, notes, and snippets.

@ishitcno1
Created March 17, 2015 08:26
Show Gist options
  • Save ishitcno1/777901de94c63ad10f5b to your computer and use it in GitHub Desktop.
Save ishitcno1/777901de94c63ad10f5b to your computer and use it in GitHub Desktop.
android get installed app info
private void getIntalledAppInfo() {
List<PackageInfo> infos = getPackageManager().getInstalledPackages(0);
for (PackageInfo info : infos) {
String packageName = info.packageName;
int versionCode = info.versionCode;
String versionName = info.versionName;
long firstInstallTime = info.firstInstallTime;
String appName = info.applicationInfo.loadLabel(getPackageManager()).toString();
Drawable icon = info.applicationInfo.loadIcon(getPackageManager());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment