List<ApplicationInfo> packages;
PackageManager pm;
pm = getPackageManager();
packages = pm.getInstalledApplications(0);
for (ApplicationInfo packageInfo : packages) {
str = packageInfo.packageName;
Toast.makeText(getApplicationContext(),
"package Name :- " + str, Toast.LENGTH_SHORT).show();
Log.e("", "package Name :- " + str);
str = packageInfo.dataDir;
Log.e("", "package Data Dir :- " + str);
Toast.makeText(getApplicationContext(),
"Package Data Dir :- " + str, Toast.LENGTH_SHORT)
.show();
}
PackageManager pm;
pm = getPackageManager();
packages = pm.getInstalledApplications(0);
for (ApplicationInfo packageInfo : packages) {
str = packageInfo.packageName;
Toast.makeText(getApplicationContext(),
"package Name :- " + str, Toast.LENGTH_SHORT).show();
Log.e("", "package Name :- " + str);
str = packageInfo.dataDir;
Log.e("", "package Data Dir :- " + str);
Toast.makeText(getApplicationContext(),
"Package Data Dir :- " + str, Toast.LENGTH_SHORT)
.show();
}