1. Are you ready for the Galaxy S20? Here is everything we know so far!

Installed app package name?

Discussion in 'Android Apps & Games' started by Philleh, Nov 1, 2010.

  1. Philleh

    Philleh Lurker
    Thread Starter

    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!
     



    1. Download the Forums for Android™ app!


      Download

       
  2. BookLover

    BookLover Android Expert

    Menu > Settings > Applications > Running Services
     
    Philleh likes this.
  3. Philleh

    Philleh Lurker
    Thread Starter

    Cool thanks, but app I have running isnt listed :thinking:
     
  4. Szadzik

    Szadzik Extreme Android User

    Maybe make sure you start it right before you go to see the services.
     
  5. BookLover

    BookLover Android Expert

    Are you sure it's running? Open the app you want to check before you go into the menu.
     
    Philleh likes this.
  6. Brinkley1988

    Brinkley1988 Well-Known Member

    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);
     
    Philleh likes this.
  7. Philleh

    Philleh Lurker
    Thread Starter

    Yes, it's running, can check advanced task killer after I check running services and it's there.
     
  8. Philleh

    Philleh Lurker
    Thread Starter

    Sorry, double post :eek:

    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
     
  9. BookLover

    BookLover Android Expert

    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.
     
    Philleh likes this.
Loading...

Share This Page

Loading...