开发者

use AccountManager Authentication in accessing Google Maps

开发者 https://www.devze.com 2023-03-14 10:03 出处:网络
I am trying to use the AccountManager for google login in android , what i want is once the user successfully logged in into the device , i want user to access his custom made map but the problem is i

I am trying to use the AccountManager for google login in android , what i want is once the user successfully logged in into the device , i want user to access his custom made map but the problem is i don't know how to make a bridge between AccountManager and MapService ( gdata apis - used to authenticate map service)

I am using following sample code for AccountManager Link to Code

And following is the MapService that is used to authenticate Google Maps

MapsService myService = new MapsService("Test");

try {
  // Replace these credentials with your own

  myService.setUserCredentials("userid","password"); 
} catch(AuthenticationException e) {
}

开发者_StackOverflowi tried to get password using accountManager.getPassword(account) but it was giving me following error even though i have added android.permission.AUTHENTICATE_ACCOUNTS

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

0

精彩评论

暂无评论...
验证码 换一张
取 消