For all the installed apps on a phone, I need to access the:
- name
- icon
- google play url from where the app can be installed
I've looked at ApplicationInfo but that doesn't seem to provide this information to me. I've heard of PackageInfo and ResolveInfo, however I am quite confused what is the difference between them and which one should be used where? Lastly, what can I use to find the above three details about the installed apps ?
For package names, I get things like com.something.some
This is the code I am using to get apps:
final PackageManager pm = getPackageManager();
ArrayList<ApplicationData> listAppData = new ArrayList<ApplicationData>();
//get a list of installed apps.
List<ApplicationInfo> packages = pm.getInstalledApplications(PackageManager.GET_META_DATA);
for (ApplicationInfo packageInfo : packages) {
listAppData.add(new ApplicationData(packageInfo));
}
ApplicationData is my own class where I extract information from packageInfo
from ApplicationInfo Vs PackageInfo vs ResolveInfo
No comments:
Post a Comment