freshplanet / ANE-Google-Play-Game-Services

Enable user to log in with Google+ to upload high score and achievements
Apache License 2.0
57 stars 42 forks source link

Check user has got Google Play Account #29

Open lukeavery15 opened 10 years ago

lukeavery15 commented 10 years ago

If a user does not have google play logged in the app is crashing when it attempts a sign in.

Any way to check if the user has google play logged in or a message sent back if a attempted sign in failed?

lukeavery15 commented 10 years ago

Also a AirGooglePlayGamesEvent.ON_SIGN_IN_FAIL event is never sent

lukeavery15 commented 10 years ago

I/AirGooglePlayGames: sign in activiy started I/AirGooglePlayGames: shouldStartSignInFlow2 : true I/AirGooglePlayGames: create helper I/AirGooglePlayGames: setup D/GameHelper( 3296): GameHelper: Setup: requested clients: 1 D/GameHelper( 3296): GameHelper: setup: scopes: D/GameHelper( 3296): GameHelper: - https://www.googleapis.com/auth/games D/GameHelper( 3296): GameHelper: setup: creating GamesClient I/dalvikvm( 3296): Could not find method android.view.View.getDisplay, referenced from method com.google.android.gms.internal.fq$b.f W/dalvikvm( 3296): VFY: unable to resolve virtual method 6573: Landroid/view/View;.getDisplay ()Landroid/view/Display; D/dalvikvm( 3296): VFY: replacing opcode 0x6e at 0x0009 I/dalvikvm( 3296): Could not find method android.view.ViewTreeObserver.removeOnGlobalLayoutListener, referenced from method com.google.android.gms.internal.fq$b.e W/dalvikvm( 3296): VFY: unable to resolve virtual method 6840: Landroid/view/ViewTreeObserver;.removeOnGlobalLayoutListener (Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;)V D/dalvikvm( 3296): VFY: replacing opcode 0x6e at 0x003a W/PopupManager( 3296): You have not specified a View to use as content view for popups. Falling back to the Activity content view which may not work properly in future versions of the API. Use setViewForPopups() to set your content view. D/GameHelper( 3296): GameHelper: State change UNCONFIGURED -> DISCONNECTED I/AirGooglePlayGames: autosignIn D/GameHelper( 3296): GameHelper: onStart, state = DISCONNECTED D/GameHelper( 3296): GameHelper: onStart: Not connecting (user specifically signed out). I/AirGooglePlayGames: signIn D/GameHelper( 3296): GameHelper: Starting USER-INITIATED sign-in flow. E/GooglePlayServicesUtil( 3296): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included. W/GooglePlayServicesUtil( 3296): Google Play services is missing. D/GameHelper( 3296): GameHelper: isGooglePlayServicesAvailable returned 1 D/GameHelper( 3296): GameHelper: Google Play services not available. Show error dialog. D/GameHelper( 3296): GameHelper: Making error dialog for failure: SignInFailureReason(serviceErrorCode:SERVICE_MISSING(1),activityResultCode:RESULT_CANCELED) D/GameHelper( 3296): GameHelper: Showing error dialog. D/AndroidRuntime( 3296): Shutting down VM W/dalvikvm( 3296): threadid=1: thread exiting with uncaught exception (group=0x40c421f8) W/System.err( 3296): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.route1games.nba/com.freshplanet.googleplaygames.SignInActivity}: java.lang.NullPointerException W/System.err( 3296): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1968) W/System.err( 3296): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1993) W/System.err( 3296): at android.app.ActivityThread.access$600(ActivityThread.java:127) W/System.err( 3296): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1159) W/System.err( 3296): at android.os.Handler.dispatchMessage(Handler.java:99) W/System.err( 3296): at android.os.Looper.loop(Looper.java:137) W/System.err( 3296): at android.app.ActivityThread.main(ActivityThread.java:4507) W/System.err( 3296): at java.lang.reflect.Method.invokeNative(Native Method) W/System.err( 3296): at java.lang.reflect.Method.invoke(Method.java:511) W/System.err( 3296): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:978) W/System.err( 3296): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:745) W/System.err( 3296): at dalvik.system.NativeStart.main(Native Method) W/System.err( 3296): Caused by: java.lang.NullPointerException W/System.err( 3296): at com.freshplanet.googleplaygames.GameHelper.showFailureDialog(Unknown Source) W/System.err( 3296): at com.freshplanet.googleplaygames.GameHelper.beginUserInitiatedSignIn(Unknown Source) W/System.err( 3296): at com.freshplanet.googleplaygames.SignInActivity.onStart(Unknown Source) W/System.err( 3296): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1136) W/System.err( 3296): at android.app.Activity.performStart(Activity.java:4479) W/System.err( 3296): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1941) W/System.err( 3296): ... 11 more E/AndroidRuntime( 3296): FATAL EXCEPTION: main

UmberFunk commented 9 years ago

Gladly that might happen in very few cases. Without account a user can't download apps. The only case it can happen for regular user is if he/she installs the an app and then removes all linked accounts from Android.