• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Installed app package name?

Philleh

Lurker
Hi, does anyone know how you can find the package name for a particular app already installed on your handset? They usually go like: com.example.prototype

(Where the folder prototype cotains the runnable files)

Trying to use the intent function to launch an app within an app.

Was told putting this code in the onclicklistener method for the button would allow this, yet to test it successfully. I reckon it works, just need to figure out package name of the app I wanna launch.

Intent i = new Intent(Intent.ACTION_MAIN);
i.addCategory(Intent.CATEGORY_LAUNCHER);
i.setPackage("com.otherapp.package");
startActivity(i);

Want to press a button, to launch the "com.otherapp.package"


Thanks!
 
I think you want to find an app that not must running, but just installed. The Running Services just list the running apps.

I think if you want to list all apps in your app, maybe you could try this:

final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
final List pkgAppsList = context.getPackageManager().queryIntentActivities( mainIntent, 0);
 
I think you want to find an app that not must running, but just installed. The Running Services just list the running apps.

I think if you want to list all apps in your app, maybe you could try this:

final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
final List pkgAppsList = context.getPackageManager().queryIntentActivities( mainIntent, 0);

Sorry, double post :o

Hi, I don' want my app to list running services, I just need to know the package name of an app, so I can use the code I posted to run it from within that app? Maybe I'm unsure what your code does, but I don't think I need it
 
Try:
Menu > Settings > Applications > Manage Applications > Menu > Filter > All

Then scroll to see if your app shows up with the com.XXX prefix. Some do, *most* don't.
 
Back
Top Bottom