RESOLVED: Retrieve list of applications

Put your problem here if it does not fit any of the other categories.

RESOLVED: Retrieve list of applications

Postby aljochimera » Fri Jul 03, 2009 3:21 am

Hey guys....

I have a problem... I wan't to retrieve the list of applications
installed in the device.. I was able to retrieve it using
PackageManager class and using the getInstalledApplications(int flags)
method.. But I can only retrieve the application's process names and
package names.. I can't retrieve their Application names (the name
found in it's icon in the Application list tab).. Is there a problem
with this code???

ArrayList<String> app = new ArrayList<String>();
PackageManager appInfo = this.getPackageManager();
List<ApplicationInfo> list = appInfo.getInstalledApplications(0);

for (int i=0; i<list.size(); i++) {
ApplicationInfo content = list.get(i);
app.add(content.packageName);
}

this.setListAdapter(new ArrayAdapter<String>(this,
android.R.layout.simple_dropdown_item_1line, app));
Last edited by aljochimera on Fri Jul 03, 2009 4:40 am, edited 1 time in total.
aljochimera
Freshman
Freshman
 
Posts: 3
Joined: Wed Mar 11, 2009 3:09 pm

Top

Postby aljochimera » Fri Jul 03, 2009 4:14 am

I found it...

getApplicationLabel (ApplicationInfo info)....

I guess it was just there all along....
aljochimera
Freshman
Freshman
 
Posts: 3
Joined: Wed Mar 11, 2009 3:09 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 23 guests