1. Introducing Channels - a new way to chat with other Android users!
    Dismiss Notice

Installed app package name?


Last Updated:

  1. Philleh

    Philleh Member This Topic's Starter

    Joined:
    Oct 16, 2010
    Messages:
    7
    Likes Received:
    0
    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

    Joined:
    Oct 11, 2010
    Messages:
    977
    Likes Received:
    114
    Menu > Settings > Applications > Running Services
     
    Philleh likes this.
  3. Philleh

    Philleh Member This Topic's Starter

    Joined:
    Oct 16, 2010
    Messages:
    7
    Likes Received:
    0
    Cool thanks, but app I have running isnt listed :confused:
     
  4. Szadzik

    Szadzik Well-Known Member

    Joined:
    Feb 15, 2010
    Messages:
    5,413
    Likes Received:
    715
    Maybe make sure you start it right before you go to see the services.
     
  5. BookLover

    BookLover Well-Known Member

    Joined:
    Oct 11, 2010
    Messages:
    977
    Likes Received:
    114
    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

    Joined:
    Apr 29, 2010
    Messages:
    183
    Likes Received:
    5
    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 This Topic's Starter

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

    Philleh Member This Topic's Starter

    Joined:
    Oct 16, 2010
    Messages:
    7
    Likes Received:
    0
    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

    Joined:
    Oct 11, 2010
    Messages:
    977
    Likes Received:
    114
    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...