Questions tagged [android-account]

Android Account refers to the object public class Account as part of the mobile operating system Android that acts as a Value type that represents an Account in the AccountManager public class. Use this tag for questions related to this public class.

Android Account refers to the object public class Account as part of the mobile operating system Android that acts as a Value type that represents an Account in the AccountManager public class. Use this tag for questions related to this public class.

Documentation: https://developer.android.com/reference/android/accounts/package-summary

106 questions
2
votes
0 answers

Retrieving Details of connected accounts of a contact in android

I am making a contact app in android. I am able to retrieve contact name,number, Emailid of a contact using "Cursor". When i click on contact it shows name,phone number and email id of that contact but i also want to show all connected accounts for…
Kunal
  • 432
  • 1
  • 4
  • 14
2
votes
0 answers

Get account email of the current android and GooglePlay user account

I have seen in other question how to get the device emails, but I need to get the email of the current user I'm implementing in-App billing and need to know what is the email of the user for security check, so the email that I must get must be the…
AndreaF
  • 11,975
  • 27
  • 102
  • 168
2
votes
0 answers

How to add a Gmail Account to a android device through java code?

I want to add a gmail account in to a android device using my application. in my application having 2 Edit Text, Username(for getting username like user1@gmail.com) n Password(for getting password like *********) and have a button AddAccount(for…
Mohanraj S K
  • 657
  • 4
  • 16
2
votes
2 answers

How to cancel a periodic sync when an app gets his data reset? And how do I remove the related account when that app is uninstalled?

I just realized that the periodic sync continues to be triggered when my application data is reset from the setting, and I do not want that to happen. Looking to solve this, I noticed the AccountManager.removeAccount() method but I am not sure about…
doplumi
  • 2,938
  • 4
  • 29
  • 45
2
votes
1 answer

How to generate correct auth tokens

I am trying to use the Android account manager for creating my app's own account, so I have studied the example provided in the SDK. However, I have a little problem understanding how I have to manage the authentication token on the server. From…
Romain Guidoux
  • 2,943
  • 4
  • 28
  • 48
2
votes
0 answers

Accounts from Email application not listed

I have a method in my application which populates an array with account information. The problem is I can't get the account details stored in Email application (POP3/IMAP). Is there any way to list the accounts that are created with Email…
JiTHiN
  • 6,548
  • 5
  • 43
  • 69
1
vote
0 answers

How to get all available accounts (including multi-SIM cards) that a contact can be saved on?

Background I'm working on an app that on one of its screens, it lets the user to save a contact into any account the user wishes, just like on Google's Contacts app and on various built-in Contacts apps of various manufacturers. I've checked on…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
1
vote
0 answers

Android multi-user: get current user info

Strangely there isn't a question on SO regarding this topic. At least I couldn't find one. Like Windows & Linux, Android too allows us to have multiple user accounts on the same device/computer: Each user is the FIRST (or primary) Google account…
1
vote
1 answer

Enable auto sync programmatically

I want to enable auto sync in account settings in my app programmatically. I've set up the SyncAdapter, declared it in manifest, I added account and after this action I tried: ContentResolver.setSyncAutomatically(account, authority,…
1
vote
0 answers

Android Accounts

During an implementation of android account authentication I came along this sample(which is very helpful if anyone wants to learn the process). Here is some of the relevant code and I have 2 questions at the end. public class MainActivity extends…
Sina
  • 2,683
  • 1
  • 13
  • 25
1
vote
0 answers

PWA authentication using Android account

I have written SPA web app, where users logs in using AAD single-sign-on (open-id-connect), so that request to backend's REST API are authenticated using a cookie header. I would like to turn the app to PWA. Is it possible to use accounts…
Liero
  • 25,216
  • 29
  • 151
  • 297
1
vote
0 answers

Get accounts configured count in android device

I want to get configured accounts count without any user intervention. I was using AccountManager.getAccounts() function before API level 26 and was working fine. But as GET_ACCOUNTS permission behavior has been changed in API 26, it will prompt…
1
vote
1 answer

(AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE) vs Accountmanager.get(context)

What's the difference between - AccountManager accountManager = (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE); and AccountManager accountManager =Accountmanager.get(context) What should i use when- 1.Retrieving list of already…
varmashrivastava
  • 432
  • 2
  • 6
  • 21
1
vote
0 answers

Android (Marshmallow) with sdcard fornatted as internal storage, Android profiles are dropped after reboot

I'm really would like to find out if the following problem is a bug in some specific apps, some of them open source, in Android AOSP, or in my cell phone's manufacturer's changes to AOSP Cell phone is a Lenovo C2 (K10a40) with Android 6.0, latest…
MichaelOF
  • 11
  • 2
1
vote
1 answer

Getting user's name in Android

I would like to get the user's name in my app so that it can provide a personalized message during it's first run like, Hey %user's name, .. Since the app will be paid and primarily available on Google Play Store, i would have all the information…
Nissim R
  • 542
  • 11
  • 29