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 6767041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:54:15+00:00 2026-05-26T14:54:15+00:00

For licensing purposes, I need to know my users’ Android Market account, which I

  • 0

For licensing purposes, I need to know my users’ Android Market account, which I believe is the same as the primary account on their device. I can’t find a method that does exactly this so instead I query the user’s list of google accounts and use the first one:

    AccountManager manager = AccountManager.get(context);
    Account[] accounts = manager.getAccountsByType("com.google");
    String account = "";

    if (accounts != null && accounts.length > 0)
        account = accounts[0].name;

    return account;

This approach seems to work but my question is: is the first account in the array returned by AccountManager.getAccountsByType("com.google") guaranteed to always be the same as their Android Market account, or are there any (non-trivial) exceptions?

Thanks in advance…

  • 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-26T14:54:15+00:00Added an answer on May 26, 2026 at 2:54 pm

    It used to be the case that the first com.google account registered on a phone was the primary account, and accordingly the account used by Android Market.

    Newer versions of Android have done away with the concept of a primary account, and newer versions of Android Market also support multiple accounts.

    In summary, there’s no longer any difference between the accounts on a phone. All of them may be in use by Android Market simultaneously, and an app may be owned by any one of those accounts (and possibly even several, if the user has bought the app multiple times).

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

Sidebar

Related Questions

I'm installing Android Licensing in my app, and I would like to know what
I was reading this about using google market licensing: http://developer.android.com/guide/publishing/licensing.html It says in part
I'm using AESObfuscator in the ServerManagedPolicy for android licensing. Until now, I've created the
I am trying to (more or less) uniquely identify a system for licensing purposes.
Does anyone know how licensing work for Visual Studio 2010 from MSDN? I noticed
Working on trying out the market licensing service, and I'm running into a few
I'm implementing licensing in my Android application, and there is an array of 20
Does anyone know the MSDN licensing rules around upgrade from visual studio 2008 to
Implimenting the licensing features for the Android Marketplace, and have run into a problem/question.
Does Google Play Licensing require permission android.permission.INTERNET? My app does not require INTERNET permissions.

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.