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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:48:44+00:00 2026-05-26T03:48:44+00:00

I am writing a GMail client for Android. I want to list all GMail

  • 0

I am writing a GMail client for Android. I want to list all GMail accounts in a ListView. When the user clicks one item, I want the program to retrieve the password of the corresponding account.

However, I get a SecurityException:

java.lang.SecurityException: caller uid 10107 is different than the authenticator's uid

This is my code:

AccountManager accountManager = AccountManager.get(context);

this.username = account.name;
this.password = accountManager.getPassword(account); //this is where I get the exception

I have all these permissions in AndroidManifest.xml:

<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"></uses-permission>
<uses-permission android:name="android.permission.GET_ACCOUNTS"></uses-permission>
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS"></uses-permission>
<uses-permission android:name="android.permission.USE_CREDENTIALS"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>

According to Android reference, the only permission needed should be MANAGE_ACCOUNTS.

What is the problem of my code?

  • 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-26T03:48:44+00:00Added an answer on May 26, 2026 at 3:48 am

    You can get an authtoken, but you can’t get the users actual credentials. The actually creditials are only accessible by the application that created them. From the documentation of the getPassword method (emphasis mine):

    This method requires the caller to hold the permission AUTHENTICATE_ACCOUNTS and to have the same UID as the account’s authenticator.

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

Sidebar

Related Questions

I am writing an Android GMail client application. When it creates a message, I
I am writing a Python program that requires a user to input their gmail
I have an application I am writing with a GMail type checkmark selection list.
I'm writing an Android app that contains a contact list. The design required me
I'm writing my first web application (still!), and have a problem activating user accounts.
I am writing an app that allows the user to select from a list
I'm writing an app that would look like gmail. In fact I want to
I'm writing a C# program that monitors a dedicated Gmail account using POP3 for
Writing some test scripts in IronPython, I want to verify whether a window is
Writing the code for the user authentication portion of a web site (including account

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.