1. sjmyst's Avatar
    Hi,

    I'm trying to develop an application to use Google Play Services.

    I'm using the Type-A-Number app as a starting point.

    I've tried a lot of things to try and get AUTH2 authentication working in my app, and am completely lost (several days now) about what to try next.

    I've downloaded the Type-A-Number from elitedev app from the Play Store to see how an app is supposed to work, and when I first downloaded it, things worked pretty well. I was able to sign in, sign out, sign in/out between two accounts, acquire achievements, etc.

    My phone where I'm testing and developing is older and has Gingerbread UCLD2 (2.3.6). Originally, the phone had two accounts on it, (mine and my wife's). My wife's was the "base" account (the one I couldn't remove without factory reset because it was too integrated into the configuration). I set up my Google account to be a test account for my app I'm developing.

    I originally got my app working with the simple auth keystore type and it was working well. Once I got into trying to emulate what the Type-A-Number app was doing in my code, I realized I needed AUTH2 authentication. I went about setting that up and couldn't get it working (tried many things including removing the keys from the developer authentication center).

    Stepping back a minute, I tried to just get something working and went back to the Type-A-Number app from elitedev. And, it is now giving me this error:

    Failed to sign in. Please check your network connection and try again.

    I have verified that my network connection is indeed working. When I open the Google Services "Play Games" app, that app is able to "connect" and show my picture from Google+.

    However, I can't get my app nor the Type-A-Number app to be able to log in. Even when I launch the Type-A-Number app from the "Play Games" app, the Type-A-Number app still doesn't work with the error above.

    I downloaded the logcat from the phone and I see the following around the time of the problem when trying with the Type-A-Number app. I had to modify some of the "link" stuff in the log because I'm not allowed to post links yet:

    01-18 00:48:27.166 V/GLSActivity( 5493): AuthDelegateWrapperCreated with selected intent: Intent { cmp=com.google.android.gms/.auth.DefaultAuthDelegateService }
    01-18 00:48:27.166 V/GLSActivity( 5493): AuthDelegateWrapperCreated with selected intent: Intent { cmp=com.google.android.gms/.auth.DefaultAuthDelegateService }
    01-18 00:48:27.196 I/GLSUser ( 5493): [GLSUser] getTokenFromGoogle [account: <ELLIDED:810669895>, callingPkg: com.elitedev.games.tanc, service: oauth2:ht (not a link) tps : / / www .googleapis. com / auth / games ht (not a link) tps : / / www .googleapis. com / auth / plus.login
    01-18 00:48:27.306 W/Conscrypt( 5493): Cannot find StructTimeval; not setting socket write timeout
    01-18 00:48:27.316 W/Conscrypt( 5493): Cannot find StructTimeval; not setting socket write timeout
    01-18 00:48:27.496 W/GLSActivity( 5493): gms.StatusHelper Status from wire: INVALID_KEY status: null
    01-18 00:48:27.496 I/GLSUser ( 5493): [GLSUser] getAuthtoken(<ELLIDED:810669895>, oauth2:ht (not a link) tps : / / www .googleapis.com / auth / games ht (not a link) tps : / / www .googleapis. com / auth / plus.login) -> status: UNKNOWN)
    01-18 00:48:27.496 I/GLSUser ( 5493): [GLSUser] Extracting token using key: Auth
    01-18 00:48:27.496 W/GLSActivity( 5493): gms.StatusHelper Status from wire: INVALID_KEY status: null
    01-18 00:48:27.506 V/BaseAuthAsyncOperation(10359): access token request failed
    01-18 00:48:27.516 W/SignInActivity(11057): onSignInFailed()...
    01-18 00:48:27.516 W/SignInActivity(11057): ==> Returning non-OK result: 10002
    01-18 00:48:27.546 D/PowerManagerService( 302): acquireDVFSlock : level : 1, timeMS : 3000
    01-18 00:48:27.647 D/PowerManagerService( 302): acquireDVFSlock : level : -1, timeMS : 100

    I've also done a factory reset on this phone to try and remove my wife's account. After the reset, I get the same problem.

    With one account, I get the error immediately. I've added a 2nd Google account that I haven't tried before with Google Play Services, and it gets the same error. I'm hoping if I am able figure out why the Type-A-Number app is failing, that my app is failing for the same reason.

    Any ideas?

    Regards,
    sjmyst
    01-17-2016 10:04 PM
  2. itguyjax8430's Avatar
    Hi,

    I'm trying to develop an application to use Google Play Services.

    I'm using the Type-A-Number app as a starting point.

    I've tried a lot of things to try and get AUTH2 authentication working in my app, and am completely lost (several days now) about what to try next.

    I've downloaded the Type-A-Number from elitedev app from the Play Store to see how an app is supposed to work, and when I first downloaded it, things worked pretty well. I was able to sign in, sign out, sign in/out between two accounts, acquire achievements, etc.

    My phone where I'm testing and developing is older and has Gingerbread UCLD2 (2.3.6). Originally, the phone had two accounts on it, (mine and my wife's). My wife's was the "base" account (the one I couldn't remove without factory reset because it was too integrated into the configuration). I set up my Google account to be a test account for my app I'm developing.

    I originally got my app working with the simple auth keystore type and it was working well. Once I got into trying to emulate what the Type-A-Number app was doing in my code, I realized I needed AUTH2 authentication. I went about setting that up and couldn't get it working (tried many things including removing the keys from the developer authentication center).

    Stepping back a minute, I tried to just get something working and went back to the Type-A-Number app from elitedev. And, it is now giving me this error:

    Failed to sign in. Please check your network connection and try again.

    I have verified that my network connection is indeed working. When I open the Google Services "Play Games" app, that app is able to "connect" and show my picture from Google+.

    However, I can't get my app nor the Type-A-Number app to be able to log in. Even when I launch the Type-A-Number app from the "Play Games" app, the Type-A-Number app still doesn't work with the error above.

    I downloaded the logcat from the phone and I see the following around the time of the problem when trying with the Type-A-Number app. I had to modify some of the "link" stuff in the log because I'm not allowed to post links yet:

    01-18 00:48:27.166 V/GLSActivity( 5493): AuthDelegateWrapperCreated with selected intent: Intent { cmp=com.google.android.gms/.auth.DefaultAuthDelegateService }
    01-18 00:48:27.166 V/GLSActivity( 5493): AuthDelegateWrapperCreated with selected intent: Intent { cmp=com.google.android.gms/.auth.DefaultAuthDelegateService }
    01-18 00:48:27.196 I/GLSUser ( 5493): [GLSUser] getTokenFromGoogle [account: <ELLIDED:810669895>, callingPkg: com.elitedev.games.tanc, service: oauth2:ht (not a link) tps : / / www .googleapis. com / auth / games ht (not a link) tps : / / www .googleapis. com / auth / plus.login
    01-18 00:48:27.306 W/Conscrypt( 5493): Cannot find StructTimeval; not setting socket write timeout
    01-18 00:48:27.316 W/Conscrypt( 5493): Cannot find StructTimeval; not setting socket write timeout
    01-18 00:48:27.496 W/GLSActivity( 5493): gms.StatusHelper Status from wire: INVALID_KEY status: null
    01-18 00:48:27.496 I/GLSUser ( 5493): [GLSUser] getAuthtoken(<ELLIDED:810669895>, oauth2:ht (not a link) tps : / / www .googleapis.com / auth / games ht (not a link) tps : / / www .googleapis. com / auth / plus.login) -> status: UNKNOWN)
    01-18 00:48:27.496 I/GLSUser ( 5493): [GLSUser] Extracting token using key: Auth
    01-18 00:48:27.496 W/GLSActivity( 5493): gms.StatusHelper Status from wire: INVALID_KEY status: null
    01-18 00:48:27.506 V/BaseAuthAsyncOperation(10359): access token request failed
    01-18 00:48:27.516 W/SignInActivity(11057): onSignInFailed()...
    01-18 00:48:27.516 W/SignInActivity(11057): ==> Returning non-OK result: 10002
    01-18 00:48:27.546 D/PowerManagerService( 302): acquireDVFSlock : level : 1, timeMS : 3000
    01-18 00:48:27.647 D/PowerManagerService( 302): acquireDVFSlock : level : -1, timeMS : 100

    I've also done a factory reset on this phone to try and remove my wife's account. After the reset, I get the same problem.

    With one account, I get the error immediately. I've added a 2nd Google account that I haven't tried before with Google Play Services, and it gets the same error. I'm hoping if I am able figure out why the Type-A-Number app is failing, that my app is failing for the same reason.

    Any ideas?

    Regards,
    sjmyst
    Welcome to Android Central!

    Did you ever figure this out?
    01-22-2016 09:10 AM
  3. sjmyst's Avatar
    Hi,

    I did not figure out how to get the Type-A-Number from elitedev to work. But, I did figure out how to get my app to work.

    After a couple of days of waiting for a response here, I decided to upgrade my SGH-I577 Samsung from Gingerbread to a later android to see if that would help. After floundering around a little with that, I eventually was able to upgrade to KitKat, so I went with that path, and successfully upgraded.

    After the upgrade, I went to download the Type-A-Number app, and saw that there were two of them in Google Play. I went ahead and selected the elitedev version, and after all of the upgrades to Google Play Services (and I think other libraries), I eventually got the app running, viola... same error.

    Out of curiosity, I decided to download the "other" Type-A-Number app from Xtr3m3Android. The app worked just slightly differently from the other Type-A-Number app. But, this app was able to log in successfully. This gave me confidence that I could go back to my own app that I'm developing and to try and port over the parts of the Type-A-Number that I needed to get the authentication working. After a couple of hours of "translating" the Type-A-Number code from GitHub into my app, I got the point to give it a try, and voila... SUCCESS!

    So, I may never get this original Type-A-Number working. But, I'm no longer worried about it, because I was able to get the same functionality working in my own app.

    I am curious if about a couple of things. But, I'll probably never take the time to figure them out. 1. Why this Type-A-Number app from elitedev stopped working. 2. If my current working app would work on the old Gingerbread android.

    I originally wanted to support Gingerbread. But, looking at the numbers on the Android Dashboard here. Well, I'd post the URL for the Google Dashboard, but I don't have enough street cred here to post URLs. So, I'll just say to get to the Android Dashboard, type "google android dashboard" and click on the first link.

    Gingerbread doesn't seem important anymore. I'm going to go forward with testing on KitKat. And, do some AVD emulator testing on JellyBean to make sure nothing major breaks going backwards. Hopefully I won't run into too many problems doing things this way.

    Regards,
    sjmyst
    01-23-2016 11:24 PM

Similar Threads

  1. Howdy!! Happy to be here
    By kramer5150 in forum New to the Forums? Introduce Yourself Here!
    Replies: 18
    Last Post: 02-10-2016, 06:19 AM
  2. Replies: 1
    Last Post: 01-22-2016, 09:05 AM
  3. Replies: 1
    Last Post: 01-17-2016, 10:55 PM
  4. How do I check messages and reply with my laptop?
    By AC Question in forum General Help and How To
    Replies: 1
    Last Post: 01-17-2016, 10:54 PM
  5. Are there any instructions for my Cricket ZTE Overture2?
    By AC Question in forum Other ZTE Android Phones
    Replies: 1
    Last Post: 01-17-2016, 09:32 PM
LINK TO POST COPIED TO CLIPBOARD