Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6702357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:02:41+00:00 2026-05-26T07:02:41+00:00

I was working on TrafficStats Api and used the following code to get information

  • 0

I was working on TrafficStats Api and used the following code to get information about All Android Applications

for (ApplicationInfo info : packageManager.getInstalledApplications(0)) {
int uid = info.uid;
CharSequence AppName = packageManager.getApplicationLabel(info);
String packageManager = packageManager.packageManager.getNameForUid(uid).split(":")[0];              }

But when i logged the three variables. It gives confusing result. None of them are unique. For same Uid, many applications are there and in same package name, many Applications are there.See the below log output

 AppName is:Phone   UID:1001 package: android.uid.phone
 AppName is:DM Command Service UID:1001 package: android.uid.phone
 AppName is:Dialer Storage  UID:1001 package: android.uid.phone
 AppName is:SIM Toolkit UID:1001 package: android.uid.phone

Then, how to identify the Applications.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:02:41+00:00Added an answer on May 26, 2026 at 7:02 am

    Android uses the package name to uniquely identify apps. You’re printing out the userId name instead of the package name. If you print out the package name you should see a difference. Try this:

    String packageName = info.packageName;

    As for what you’re seeing, Android apps can be configured to share the same signature and userId. All of these settings are set in the AndroidManifest.xml.

    For example, the Phone app has this setting

    package="com.android.phone"
    android:sharedUserId="android.uid.phone"
    

    And the Telephony provider has this setting

    package="com.android.providers.telephony"
    android:sharedUserId="android.uid.phone"
    

    Notice that they share the same sharedUserId.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working SQL The following code works as expected, returning two columns of data (a
Working with the Box2djs plugin here: http://www.crackin.com/dev/mms/physics/ ... and all I'm trying to do
Working in Xcode on Mac OS X Leopard in C++: I have the following
Working with MVC 2 ad with the help of some friends I thought all
Working with COM interop, I can call a managed function from within unmanaged code.
Working with an API that can handle multiple connections (i.e. sessions), each of these
Working in C#, I need to find all local peaks in a List of
working on an old translation sample code for windows phone 7. Recently, I have
Working with an API where I need to send a value over in an
Working with Json, how can I NSlog only the title in this code: NSDictionary

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.