Validation backend with get Google Token on android -


i have problem when try google token in android balidation backend. create web application client id (i use http://localhost in url paths), android client id, , use code:

public class googleoauthtask extends asynctask<void, void, string> {  private static final string tag = googleoauthtask.class.getsimplename(); activity mactivity; string memail;  private final static string scope = "audience:server:client_id:xxxxxxxxxxxxxxxxxxxaaaaaxxxxxxxxxxx.apps.googleusercontent.com";  public googleoauthtask(activity activity, string email) {     this.mactivity = activity;     this.memail = name; }  @override protected string doinbackground(void... params) {     string accountname = "myrandomvalidemail@gmail.com";     account account = new account(accountname, googleauthutil.google_account_type);     string scopes = "audience:server:client_id:xxxxxasasxxxxx.apps.googleusercontent.com"; // web application client id     try {         return googleauthutil.gettoken(mactivity, account, scopes);     } catch (ioexception e) {         log.e(tag, "error retrieving id token.", e);         return null;     } catch (googleauthexception e) {         log.e(tag, "error retrieving id token.", e);         return null;     } } } 

my problem is:

when call googleauthutil.gettoken(mactivity, account, scopes) code no continue , i.e, method never end.

i'm waiting

more informations:

i use .android/debug.keystore generate sha-1 hash use http://localhost in javascript origins use http://localhost/mywebservice in redirect uri. line appears in logcat:

could not find method android.app.notification$builder.setlocalonly 

the problem thread pool in asynctask.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -