2014-05-25 1 views
0

질문이 간단합니다. 활동이없는 Google Play 게임 서비스를 사용할 수 있습니까?Google Play 게임에 다시 로그인 할 수 없음

처음 로그인 할 수 있으며 모두 괜찮습니다. 문제가되면 로그 아웃 한 다음 다시 로그인 해보십시오 (signin-> signout-> signin). 그냥 작동하지 않습니다.

05-25 13:14:13.092: D/GameHelper(21003): GameHelper: beginUserInitiatedSignIn: resetting attempt count. 
05-25 13:14:13.093: D/GameHelper(21003): GameHelper: Starting USER-INITIATED sign-in flow. 
05-25 13:14:13.093: D/GameHelper(21003): GameHelper: beginUserInitiatedSignIn: starting new sign-in flow. 
05-25 13:14:13.093: D/GameHelper(21003): GameHelper: Starting connection. 
05-25 13:14:13.094: E/GooglePlayServicesUtil(21003): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included. 
05-25 13:14:13.140: D/GameHelper(21003): GameHelper: onConnectionFailed 
05-25 13:14:13.140: D/GameHelper(21003): GameHelper: Connection failure: 
05-25 13:14:13.140: D/GameHelper(21003): GameHelper: - code: SIGN_IN_REQUIRED(4) 
05-25 13:14:13.140: D/GameHelper(21003): GameHelper: - resolvable: true 
05-25 13:14:13.140: D/GameHelper(21003): GameHelper: - details: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{421e1d10: [email protected]}} 
05-25 13:14:13.140: D/GameHelper(21003): GameHelper: onConnectionFailed: WILL resolve because user initiated sign-in. 
05-25 13:14:13.140: D/GameHelper(21003): GameHelper: onConnectionFailed: resolving problem... 
05-25 13:14:13.141: D/GameHelper(21003): GameHelper: resolveConnectionResult: trying to resolve result: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{421e1d10: [email protected]}} 
05-25 13:14:13.141: D/GameHelper(21003): GameHelper: Result has resolution. Starting it. 
05-25 13:14:13.141: I/ActivityManager(990): START u0 {flg=0x4000000 cmp=com.google.android.gms/.games.ui.signin.SignInActivity (has extras)} from pid -1 
05-25 13:14:13.147: W/ContextImpl(1286): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1244 android.content.ContextWrapper.sendBroadcast:365 com.motorola.motocare.util.TriggerHelper$TriggerBuilder.send:76 com.motorola.motocare.internal.frameworkevents.PauseResumeTrigger.handleFrameworkEvent:53 com.motorola.motocare.internal.frameworkevents.FwEventMonitor$FrameworkListener.processFrameworkEvent:114 
05-25 13:14:13.172: D/Volley(14199): [1] Request.finish: 32233 ms: [ ] https://android.clients.google.com/fdfe/bulkDetails 0xe8d195d1 NORMAL 1 
05-25 13:14:13.647: W/ActivityManager(990): Activity pause timeout for ActivityRecord{4237a8c0 u0 com.clinko.dovestw/com.unity3d.player.UnityPlayerNativeActivity t24} 
05-25 13:14:13.650: W/ContextImpl(1286): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1244 android.content.ContextWrapper.sendBroadcast:365 com.motorola.motocare.util.TriggerHelper$TriggerBuilder.send:76 com.motorola.motocare.internal.frameworkevents.PauseResumeTrigger.handleFrameworkEvent:53 com.motorola.motocare.internal.frameworkevents.FwEventMonitor$FrameworkListener.processFrameworkEvent:114 
05-25 13:14:13.657: I/SFPerfTracer(271):  triggers: (rate: 0:0) (176027 sw vsyncs) (0 skipped) (194:116854 vsyncs) (196:299645) 
05-25 13:14:13.730: D/Sensors(990): AccelerationSensor: Set Sensors state 0x2 
05-25 13:14:13.730: D/Sensors(990): AccelerationSensor: set delay 0 
05-25 13:14:13.739: I/Choreographer(21003): Skipped 34 frames! The application may be doing too much work on its main thread. 
05-25 13:14:13.795: I/SBar.NetworkController(1111): onDataActivity: direction=3 
05-25 13:14:13.798: I/SBar.NetworkController(1111): refreshSignalCluster: mobile: mHasMobileDataFeature=true DataTypeShown=zz_moto_stat_sys_data_fully_connected_h_wide Activity=zz_moto_stat_sys_data_fully_connected_signal_inout_wide in=false out=false Accessibility="3.5G" 
05-25 13:14:13.836: I/LaunchCheckinHandler(990): Displayed com.google.android.gms/.games.ui.signin.SignInActivity,wp,ca,189 
05-25 13:14:13.836: I/ActivityManager(990): Displayed com.google.android.gms/.games.ui.signin.SignInActivity: +189ms 
05-25 13:14:14.794: I/SBar.NetworkController(1111): onDataActivity: direction=0 
05-25 13:14:14.798: I/SBar.NetworkController(1111): refreshSignalCluster: mobile: mHasMobileDataFeature=true DataTypeShown=zz_moto_stat_sys_data_fully_connected_h_wide Activity=zz_moto_stat_sys_data_fully_connected_signal_none_wide in=false out=false Accessibility="3.5G" 
05-25 13:14:15.041: V/AlarmManager(990): sending alarm Alarm{42cd7300 type 2 com.android.providers.calendar} 
05-25 13:14:15.085: E/ModemStatsUtils(1219): Exception in getLastKnownLocation - Timed out waiting for response from server 
05-25 13:14:15.085: D/Checkin(1219): publish the event [tag = CALL_PERF_DEVICE_LOC event name = CALL_PERF_DEVICE_LOC] 
05-25 13:14:15.797: I/SBar.NetworkController(1111): onDataActivity: direction=3 
05-25 13:14:15.807: I/SBar.NetworkController(1111): refreshSignalCluster: mobile: mHasMobileDataFeature=true DataTypeShown=zz_moto_stat_sys_data_fully_connected_h_wide Activity=zz_moto_stat_sys_data_fully_connected_signal_inout_wide in=false out=false Accessibility="3.5G" 
05-25 13:14:16.807: I/SBar.NetworkController(1111): onDataActivity: direction=2 
05-25 13:14:16.811: I/SBar.NetworkController(1111): refreshSignalCluster: mobile: mHasMobileDataFeature=true DataTypeShown=zz_moto_stat_sys_data_fully_connected_h_wide Activity=zz_moto_stat_sys_data_fully_connected_signal_out_wide in=false out=false Accessibility="3.5G" 
05-25 13:14:17.341: E/ViewRootImpl(19392): Attempting to destroy the window while drawing! 
05-25 13:14:17.341: E/ViewRootImpl(19392): [email protected], title= 
05-25 13:14:17.389: I/SFPerfTracer(271):  triggers: (rate: 16:457) (compose: 0:24) (post: 0:57) (render: 2:290) (209:61029 frames) (210:111372) 
05-25 13:14:17.390: D/SFPerfTracer(271):  layers: (7:12) (DimLayer: 0:25)* (FocusedStackFrame: 0:349)* (StatusBar: 15:8589) (NavigationBar: 0:3139) (com.android.systemui.ImageWallpaper: 0:1087)* (DimLayer: 14:15) (com.clinko.dovestw/com.unity3d.player.UnityPlayerNativeActivity: 186:1244) (SurfaceView: 0:1538) (com.google.android.gms/com.google.android.gms.games.ui.signin.SignInActivity: 1:8) (: 208:214) 
05-25 13:14:17.470: W/GLSUser(13596): GoogleAccountDataService.getToken() 
05-25 13:14:17.534: W/GLSUser(13596): GoogleAccountDataService.getToken() 
05-25 13:14:17.813: I/SBar.NetworkController(1111): onDataActivity: direction=3 
05-25 13:14:17.815: I/SBar.NetworkController(1111): refreshSignalCluster: mobile: mHasMobileDataFeature=true DataTypeShown=zz_moto_stat_sys_data_fully_connected_h_wide Activity=zz_moto_stat_sys_data_fully_connected_signal_inout_wide in=false out=false Accessibility="3.5G" 
05-25 13:14:18.035: D/dalvikvm(2539): GC_CONCURRENT freed 1963K, 36% free 11073K/17248K, paused 3ms+12ms, total 55ms 
05-25 13:14:18.131: W/GLSUser(13596): GoogleAccountDataService.getToken() 
05-25 13:14:18.358: I/qtaguid(2539): Failed write_ctrl(u 172) res=-1 errno=22 
05-25 13:14:18.358: I/qtaguid(2539): Untagging socket 172 failed errno=-22 
05-25 13:14:18.359: W/NetworkManagementSocketTagger(2539): untagSocket(172) failed with errno -22 
05-25 13:14:18.567: D/dalvikvm(990): GC_EXPLICIT freed 868K, 17% free 21692K/26020K, paused 6ms+11ms, total 149ms 
05-25 13:14:18.601: W/ContextImpl(1286): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1244 android.content.ContextWrapper.sendBroadcast:365 com.motorola.motocare.util.TriggerHelper$TriggerBuilder.send:76 com.motorola.motocare.internal.frameworkevents.PauseResumeTrigger.handleFrameworkEvent:53 com.motorola.motocare.internal.frameworkevents.FwEventMonitor$FrameworkListener.processFrameworkEvent:114 
05-25 13:14:18.610: W/ContextImpl(1286): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1244 android.content.ContextWrapper.sendBroadcast:365 com.motorola.motocare.util.TriggerHelper$TriggerBuilder.send:76 com.motorola.motocare.internal.frameworkevents.PauseResumeTrigger.handleFrameworkEvent:53 com.motorola.motocare.internal.frameworkevents.FwEventMonitor$FrameworkListener.processFrameworkEvent:114 
05-25 13:14:18.637: W/GLSUser(13596): GoogleAccountDataService.getToken() 
05-25 13:14:18.731: D/audio_hw_primary(274): out_set_parameters: enter: usecase(0: deep-buffer-playback) kvpairs: routing=2 
05-25 13:14:18.731: D/audio_hw_extn(274): audio_extn_set_anc_parameters: anc_enabled:0 
05-25 13:14:18.732: D/Sensors(990): AccelerationSensor: Set Sensors state 0x3 
05-25 13:14:18.732: D/Sensors(990): AccelerationSensor: set delay 20 
05-25 13:14:18.732: D/Sensors(990): AccelerationSensor: set delay 1 
05-25 13:14:18.734: D/Sensors(990): AccelerationSensor: set delay 20 
05-25 13:14:18.752: V/msm8974_platform(274): platform_get_output_snd_device: enter: output devices(0x2) 
05-25 13:14:18.752: V/msm8974_platform(274): platform_get_output_snd_device: exit: snd_device(speaker) 
05-25 13:14:18.752: D/audio_hw_primary(274): select_devices: out_snd_device(2: speaker) in_snd_device(0:) 
05-25 13:14:18.752: V/msm8974_platform(274): platform_send_audio_calibration: sending audio calibration for snd_device(2) acdb_id(14) 
05-25 13:14:18.935: I/SFPerfTracer(271):  triggers: (rate: 16:458) (compose: 0:24) (post: 0:57) (render: 2:291) (15:61057 frames) (16:111461) 
05-25 13:14:18.935: D/SFPerfTracer(271):  layers: (5:12) (DimLayer: 0:25)* (FocusedStackFrame: 1:351)* (StatusBar: 15:8605) (NavigationBar: 4:3143) (com.android.systemui.ImageWallpaper: 0:1087)* (DimLayer: 0:28)* (com.clinko.dovestw/com.unity3d.player.UnityPlayerNativeActivity: 7:1313) (SurfaceView: 9:1547) (com.google.android.gms/com.google.android.gms.games.ui.signin.SignInActivity: 16:87) (: 0:228)* 
05-25 13:14:18.978: I/qtaguid(2539): Failed write_ctrl(u 172) res=-1 errno=22 
05-25 13:14:18.978: I/qtaguid(2539): Untagging socket 172 failed errno=-22 
05-25 13:14:18.978: W/NetworkManagementSocketTagger(2539): untagSocket(172) failed with errno -22 
05-25 13:14:20.820: I/SBar.NetworkController(1111): onDataActivity: direction=0 
05-25 13:14:20.823: I/SBar.NetworkController(1111): refreshSignalCluster: mobile: mHasMobileDataFeature=true DataTypeShown=zz_moto_stat_sys_data_fully_connected_h_wide Activity=zz_moto_stat_sys_data_fully_connected_signal_none_wide in=false out=false Accessibility="3.5G" 
05-25 13:14:21.395: I/MDMCTBK(270): NetlinkHandler, power_supply subsys 
05-25 13:14:21.395: I/MDMCTBK(270): NetlinkHandler, usbChargerStateChanged 
05-25 13:14:21.395: I/MDMCTBK(270): MdmCutbackHndler,readFromFile = /sys/class/power_supply/usb/online 
05-25 13:14:21.395: I/MDMCTBK(270): MdmCutbackHndler,readFromFile = 
05-25 13:14:21.395: E/MDMCTBK(270): MdmCutbackHndler,Could not open '' 
05-25 13:14:21.403: I/MDMCTBK(270): NetlinkHandler, power_supply subsys 
05-25 13:14:21.403: I/MDMCTBK(270): NetlinkHandler, usbChargerStateChanged 
05-25 13:14:21.403: I/MDMCTBK(270): MdmCutbackHndler,readFromFile = /sys/class/power_supply/usb/online 
05-25 13:14:21.404: I/MDMCTBK(270): MdmCutbackHndler,readFromFile = 
05-25 13:14:21.404: E/MDMCTBK(270): MdmCutbackHndler,Could not open '' 
05-25 13:14:22.893: I/SBar.NetworkController(1111): onDataActivity: direction=0 
05-25 13:14:35.333: I/SBar.NetworkController(1111): onDataActivity: direction=0 
05-25 13:14:37.640: I/SBar.NetworkController(1111): onDataActivity: direction=4 
05-25 13:14:37.688: D/dalvikvm(1279): GC_CONCURRENT freed 1967K, 40% free 10397K/17248K, paused 13ms+3ms, total 52ms 
05-25 13:14:38.652: I/SBar.NetworkController(1111): onDataActivity: direction=3 
05-25 13:14:38.656: I/SBar.NetworkController(1111): refreshSignalCluster: mobile: mHasMobileDataFeature=true DataTypeShown=zz_moto_stat_sys_data_fully_connected_h_wide Activity=zz_moto_stat_sys_data_fully_connected_signal_inout_wide in=false out=false Accessibility="3.5G" 
05-25 13:14:39.657: I/SBar.NetworkController(1111): onDataActivity: direction=0 
05-25 13:14:39.662: I/SBar.NetworkController(1111): refreshSignalCluster: mobile: mHasMobileDataFeature=true DataTypeShown=zz_moto_stat_sys_data_fully_connected_h_wide Activity=zz_moto_stat_sys_data_fully_connected_signal_none_wide in=false out=false Accessibility="3.5G" 
05-25 13:14:42.116: I/SBar.NetworkController(1111): onDataActivity: direction=0 
05-25 13:14:46.717: I/SFPerfTracer(271):  triggers: (rate: 0:0) (176027 sw vsyncs) (0 skipped) (1990:118844 vsyncs) (1992:301637) 

내가 그것을 isConnecting에 충실 돌아가려면 로그인의 상태를 읽어

public final class GooglePlayGameServices 
{ 
    private static Activity ua;//Unity Activity 
    private static GameHelper gameHelper = null; 
    private static GameHelperListener gameHelperListener= null; 

    public static void signIn() 
    { 
     if (ua == null) 
     { 
      ua = UnityPlayer.currentActivity; 
     } 

     ua.runOnUiThread(new Runnable() {public void run() 
     { 
      if (gameHelper == null) 
      { 
       conectedInPast = false; 
       gameHelper = new GameHelper(ua, GameHelper.CLIENT_GAMES); 
       gameHelperListener = new GameHelperListener() { 

        @Override 
        public void onSignInSucceeded() { 
         // TODO Auto-generated method stub 

        } 

        @Override 
        public void onSignInFailed() { 
         // TODO Auto-generated method stub 

        } 
       }; 

       gameHelper.setup(gameHelperListener); 
       gameHelper.enableDebugLog(true); 
      } 

      if (!gameHelper.isConnecting() && !gameHelper.isSignedIn()) 
      { 
       gameHelper.beginUserInitiatedSignIn(); 
      } 
      else 
      { 
       if (gameHelper.isConnecting()) 
       { 
        gameHelper.makeSimpleDialog("You are connecting. Please be patient").show(); 
       } 
       else if (gameHelper.isSignedIn()) 
       { 
        gameHelper.makeSimpleDialog("You have already signed in").show(); 
       } 
      } 

     }});    
    } 

    public static void signOut() 
    { 
     if (gameHelper != null) 
     { 
      ua.runOnUiThread(new Runnable() {public void run() 
      { 
       gameHelper.signOut(); 
      }}); 
     } 
    } 

    public static boolean isSignedIn() 
    { 
     return gameHelper != null&& gameHelper.isSignedIn(); 
    } 

    public static void showLeaderBoard(final String leaderboardID) 
    { 
     ua.runOnUiThread(new Runnable() {public void run() 
     { 
      ua.startActivityForResult(Games.Leaderboards.getLeaderboardIntent(gameHelper.getApiClient(), leaderboardID), 5342); 
     }}); 
    } 

} 

이 다른 시간을 로그인의 바로 로그 캣은 다음과 같습니다

는 코드입니다.

내가 뭘 잘못하고 있는지 알고 싶습니까? 읽어 주셔서 감사합니다.

+0

어디에서나 onActivityResult를 구현 했습니까? gameHelper 상태를 동기화 상태로 유지해야합니다. – free3dom

+0

Unity 활동을 확장하지 않고 어떻게 구현할 수 있습니까? –

+0

당신이 할 수 있을지 모르겠지만, ** gameHelper를 동기화 상태로 유지하기 위해 어딘가에 구현해야합니다 ** - 로그인 활동에서 그런 식으로 의사 소통하기 때문에 주위를 둘러 볼 필요가 없습니다. [이 토론] (http://forum.unity3d.com/threads/219672-Examples-when-to-extend-UnityPlayerActivity)는 몇 가지 아이디어를 줄 수 있습니다. 통합 활동을 서브 클래스 화해야 할 수도 있습니다. 자세한 내용은 [UnityPlayerActivity Java 코드 확장] (http://docs.unity3d.com/Documentation/Manual/PluginsForAndroid.html) 섹션을 참조하십시오. – free3dom

답변

1

의견에서 언급했듯이 일 어딘가에서 onActivityResult을 구현하고 gameHelper.onActivityResult()을 호출해야합니다. 이렇게하면 gameHelper이 로그인/아웃 활동의 결과를 수신하여 내부 상태를 업데이트 할 수 있습니다. 이 값이 없으면 gameHelper은 현재 로그인 상태가 무엇인지 알 수 없으며 실제로 로그 아웃되었을 때 사용자가 이미 로그인되어 있음을 잘못보고하여 서비스에 다시 로그인하지 못하게합니다.

This discussionUnityPlayerActivity을 확장뿐만 아니라 몇 가지 다른 아이디어로이 일에 대해 갈 수있는 몇 가지 방법을 제공합니다.

유니티 플러그인 문서의 Extending the UnityPlayerActivity Java Code 부분은 그렇게 할 때 매니페스트에 필요한 변화뿐만 아니라 UnityPlayerActivity을 확장하는 방법의 좋은 예를 제공합니다.

관련 문제