Installed app package name?

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

  1. Philleh

    Philleh Member
    5

    Oct 16, 2010
    7
    0
    5
    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!
     

    Advertisement

  2. BookLover

    BookLover Well-Known Member
    113

    Oct 11, 2010
    977
    114
    113
    USA
    Menu > Settings > Applications > Running Services
     
    Philleh likes this.
  3. Philleh

    Philleh Member
    5

    Oct 16, 2010
    7
    0
    5
    Cool thanks, but app I have running isnt listed :thinking:
     
  4. Szadzik

    Szadzik Well-Known Member
    223

    Feb 15, 2010
    5,413
    715
    223
    Male
    FAS Admin
    Maybe make sure you start it right before you go to see the services.
     
  5. BookLover

    BookLover Well-Known Member
    113

    Oct 11, 2010
    977
    114
    113
    USA
    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
    36

    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 Member
    5

    Oct 16, 2010
    7
    0
    5
    Yes, it's running, can check advanced task killer after I check running services and it's there.
     
  8. Philleh

    Philleh Member
    5

    Oct 16, 2010
    7
    0
    5
    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 Well-Known Member
    113

    Oct 11, 2010
    977
    114
    113
    USA
    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.

Share This Page

Loading...