Code example for AccountManager

Methods: getAuthToken

0
	private class Task extends AsyncTask<String, String, Bundle>{
	 
		@Override 
		protected Bundle doInBackground(String... params) {
	 
			AccountManagerFuture<Bundle> future = am.getAuthToken(acc, type, null, act, null, null);
			 
			Bundle bundle = null;
			 
			try { 
				bundle = future.getResult();
			} catch (OperationCanceledException e) {
			} catch (AuthenticatorException e) {
				AQUtility.debug(e);
			} catch (IOException e) {
				AQUtility.debug(e);
			} 
			 
			return bundle;
		}