accountmanager

AccountManager IllegalArgumentException: key is null

有些话、适合烂在心里 提交于 2019-12-24 21:33:48
问题 Ok, I'm getting an IllegalArgumentException at a point where it shouldn't. I have a custom extension of Account that is saved using the AccountManager: // Method inside a custom extension of Account public boolean save(AccountManager manager) { removeAll(manager); boolean result = manager.addAccountExplicitly(this, null, toBundle()); manager.setUserData(this, KEY_1, value1); manager.setUserData(this, KEY_2, value2); manager.setUserData(this, KEY_3, value3); return result; } The keys are

Android: How to Twitter oAuth Through Account Manager

旧巷老猫 提交于 2019-12-24 02:59:10
问题 In my application, I want to use oAuth protocol during login processes for several sites like Twitter, Facebook and more. I've some issues about Twitter oAuth. I used those lines to access token and secret datas: AccountManager am = AccountManager.get(MyActivity.this); Account[] accounts = am.getAccountsByType("com.twitter.android.auth.login"); if(accounts.length > 0) { Account acct = accounts[0]; am.getAuthToken(acct, "com.twitter.android.oauth.token", null, MyActivity.this, new

Launch Intent from account-authenticator accountPreferences screen?

一世执手 提交于 2019-12-23 02:32:21
问题 I have included the AccountManager code in my app to enable the user to create and manage their account from inside their Settings application. I linked in the "accountPreferences" preferences file inside my account-authenticator definition, and the options show properly in the Settings > Accounts > My App screen. When I tap on one of them, instead of getting the activity I linked in, I get: 01-14 14:47:27.304: ERROR/AndroidRuntime(27708): FATAL EXCEPTION: main android.util

Android - struggling to style Account Picker

大城市里の小女人 提交于 2019-12-22 10:45:43
问题 I'm trying to implement an AccountPicker in my game, and I've tried using all three versions of newChooseAccountIntent , 2 coming from AccountManager and one from AccountPicker . my code looks like this if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) { intent = AccountManager.newChooseAccountIntent(null, null, new String[]{GoogleAuthUtil.GOOGLE_ACCOUNT_TYPE}, null, null, null, null); } else { intent = AccountManager.newChooseAccountIntent(null, null, new String[]

SecurityException in getPassword of accountManager in android

狂风中的少年 提交于 2019-12-21 18:29:23
问题 I'm trying to retrieve the password of google account, but getting security exception at String pwd = AccountManager.get(mContext).getPassword(account). Also i have given permissions in androidManifest.xml to account_manager, aunthenticator, get_account, manage account. code : android.accounts.Account[] gaccounts = AccountManager.get(mContext).getAccounts(); Log.i("parul", "2222()len :"+ gaccounts.length); for (android.accounts.Account account: gaccounts) { String pwd = AccountManager.get

Obtaining a basic google auth-token from AccountManager

不羁岁月 提交于 2019-12-21 16:17:53
问题 I want to obtain a Google Authtoken from the AccountManager that I can send to my Webservice (not hosted on App Engine) to authenticate the User (I just need the email address and eventually his name, if no permission is required for this). What do I have to use for the "authTokenType" Paramter of the "getAuthToken" method? And which google Api do I have to use to get the Users Email? 回答1: This is doable using OpenID Connect, however it's sort of experimental, so details could change in the

Android: How to get the configured email account address programmatically

早过忘川 提交于 2019-12-21 06:01:31
问题 I used the below code to get the configured account name Account[] accounts = AccountManager.get(this).getAccounts(); for (Account account : accounts) { Log.d("Account", "Name " + account.name); } But i need the email id of the configured Microsoft Exchange account as we can change the name of the account (it is not need to be unique). Thanks in Advance 回答1: This code work properly public class RegisteredEmailAccounts extends Activity { @Override protected void onCreate(Bundle

What features are supported by Android's Google accounts authenticator?

本秂侑毒 提交于 2019-12-19 16:52:15
问题 The API documentation for the hasFeatures method of Android's AccountManager has the following to say about which features are supported by each authenticator: Account features are authenticator-specific string tokens identifying boolean account properties. For example, features are used to tell whether Google accounts have a particular service (such as Google Calendar or Google Talk) enabled. The feature names and their meanings are published somewhere associated with the authenticator in

validating Android's authToken on third party server

坚强是说给别人听的谎言 提交于 2019-12-19 01:39:32
问题 I'm writing an Android application, which uses AccountManager to get the token. From an android app I'm able to interact with Google Picasa - it works fine. What I would like to achieve is the following: send some text + authToken to my third party server, then check if the token is correct before saving the text. Now the question is: is it possible to determine if the authToken of a particular token is correct solely on the token itself (and maybe email address). I've already programmed the

validating Android's authToken on third party server

北慕城南 提交于 2019-12-19 01:37:41
问题 I'm writing an Android application, which uses AccountManager to get the token. From an android app I'm able to interact with Google Picasa - it works fine. What I would like to achieve is the following: send some text + authToken to my third party server, then check if the token is correct before saving the text. Now the question is: is it possible to determine if the authToken of a particular token is correct solely on the token itself (and maybe email address). I've already programmed the