Unity3D/Problems

[SOLVED] EnableSavedGames ERROR_NOT_AUTHORIZED

일등하이 2019. 2. 1. 18:37
반응형


로그인은 되는 데 저장된 게임 체크 하고 


초기화 부분 EnableSavedGames 코드 추가 하면 로그인이 안됨...


다시 EnableSavedGames 빼면 로그인 됨 




com.smilejsu.testgpgs2


D:\workspace\unity\Test\TestGPGS2\keystore\testgpgs2.keystore


java -jar pepk.jar --keystore=D:\workspace\unity\Test\TestGPGS2\keystore\testgpgs2.keystore --alias=testgpgs2 --output=output.zip --encryptionkey=eb10fe8f7c7c9df715022017b00c6471f8ba8170b13049a11e6c09ffe3056a104a3bbe4ac5a955f4ba4fe93fc8cef27558a3eb9d2a529a2092761fb833b656cd48b9de6a --include-cert



319835351291-978d88b5gdjgktvr9uvegrb38qb9c7g0.apps.googleusercontent.com


keytool -exportcert -keystore D:\workspace\unity\Test\TestGPGS2\keystore\testgpgs2.keystore -list -v


keytool -importkeystore -srckeystore D:\workspace\unity\Test\TestGPGS2\keystore\testgpgs2.keystore -destkeystore D:\workspace\unity\Test\TestGPGS2\keystore\testgpgs2.keystore -deststoretype pkcs12




키스토어 SHA-1 

7C:44:C5:10:F0:CB:FC:5E:71:F5:E4:98:27:06:BE:A4:99:E9:D6:56



******* API 및 서비스 *******


앱서명 

61:15:35:C3:2F:05:89:B8:5F:C6:E7:B8:57:91:52:24:AC:C2:D4:0E

패키지명 

com.smilejsu.testgpgs3





업로드인증서

7C:44:C5:10:F0:CB:FC:5E:71:F5:E4:98:27:06:BE:A4:99:E9:D6:56

패키지명

com.smilejsu.testgpgs3









******* 게임 서비스 *******


<<게임세부정보>>


패키지 이름 

com.smilejsu.testgpgs3


OAuth2 클라이언트 ID

583640013392-5h3sbk9h76ki85qm55bilofco235be72.apps.googleusercontent.com


애플리케이션 ID

583640013392


----------------------------


<<테스트>>

테스터 추가 되어있음

smilejsu82@gmail.com




******* 모든 애플리케이션 *******


<<출시관리>>


[앱 서명]


앱 서명 인증서

SHA1: 61:15:35:C3:2F:05:89:B8:5F:C6:E7:B8:57:91:52:24:AC:C2:D4:0E


업로드 인증서 

SHA1: 7C:44:C5:10:F0:CB:FC:5E:71:F5:E4:98:27:06:BE:A4:99:E9:D6:56



모든걸 다 확인 했다...






출처: https://nmain.tistory.com/169






https://github.com/playgameservices/play-games-plugin-for-unity/issues/1978




https://answers.unity.com/questions/1357666/google-play-games-services-authentication-fails.html







@ 1step 여러 개의 키 스토어가있을 가능성은? 내장 된 apk의 압축을 푼 경우 META \ INF 폴더에서 CERT.DSA (또는 CERT.RSA) 파일을 찾아 아래 명령을 실행하여 apk에 서명 할 때 사용한 인증서의 정확한 SHA1을 찾을 수 있습니다. 

keytool -printcert-file "CERT.DSA 또는 CERT.RSA의 경로"


https://github.com/googlesamples/google-services/issues/144





공주를구해줘 2017.11

GPGS 버전 0.9.53

앱서명, 업로드 인증서 (savetheprincess.keystore )

GPGS로그인, 업적, 클라우드, 리더보드..





새프로젝트 2018.3.0f2

GPGS버전 0.9.60

공주를 구해줘 앱서명, 업로드 인증서

savetheprincess.keystore 가져옴 

개발자 콘솔에 있는 공주를구해줘 정보를 새프로젝트에 심음 (GPGS Init, 클라ID)

빌드 

GPGS로그인, 업적, 클라우드, 리더보드 다 됨 




새프로젝트 2018.3.0f2

GPGS버전 0.9.60

user.keystore 새로만듬 

앱서명, 업로드 인증서 새로 만듬 

개발자 콘솔에 앱등록, 서비스게임 등록 

API서비스 등록 

빌드 

GPGS로그인 됨 


EnableSaveGames하고 저장된 게임 사용하기 하면 로그인 안됨




https://support.google.com/googleplay/android-developer/answer/7384423?hl=ko


키의 종류 및 정의

다음은 알고 있어야 할 중요한 키, 아티팩트, 도구의 종류입니다.

  • 앱 서명 키: Google Play에서 사용자 기기로 전달되는 APK 서명에 사용하는 키입니다. Google Play 앱 서명을 선택하면 기존 앱 서명 키를 업로드하거나 Google Play에서 자동으로 생성하게 합니다. 앱 서명 키는 앱의 수명 동안 절대 변경될 수 없습니다. 이는 Android 보안 업데이트 모델의 일부입니다. 앱 서명 키는 공개해서는 안 되며 반드시 기밀로 유지해야 합니다. 앱 서명 키의 공개 인증서는 다른 사람과 공유할 수 있습니다.

  • 업로드 키: Google Play에 업로드하기 전에 App Bundle이나 APK에 서명하는 데 사용하는 키입니다. 업로드 키는 공개해서는 안 되나 업로드 키의 공개 인증서는 다른 사람과 공유할 수 있습니다. 다음 중 한 가지 방법으로 업로드 키를 생성할 수 있습니다.

    • Google에서 앱 서명 키를 대신 생성하도록 선택할 경우 첫 번째 릴리스에 서명할 때 사용하는 키가 업로드 키로 지정됩니다.

    • 신규 또는 기존 앱을 선택할 때 Google에 앱 서명 키를 제공할 경우 보안 강화를 위해 선택 단계에서 또는 사후에 새로운 업로드 키를 생성할 수 있습니다.

    • 새로운 업로드 키를 생성하지 않으면 앱 서명 키를 업로드 키로 계속 사용하여 각 릴리스에 서명하게 됩니다.

키를 안전하게 보관하려면 앱 서명 키와 별도로 업로드 키를 만드는 것이 좋습니다.
  • 인증서(.der 또는 .pem): 인증서에는 공개 키, 그리고 키 소유자에 관한 추가 식별 정보가 들어 있습니다. 공개 키 인증서를 사용하면 누구나 App Bundle이나 APK에 서명한 사람이 누구인지 확인할 수 있습니다. Play Console의 앱 서명 페이지에서 앱 서명 키와 업로드 키의 공개 인증서를 다운로드하여 키를 API 제공업체에 등록할 수 있습니다. 공개 키 인증서는 다른 사람과 공유할 수 있으며 개인 키는 공개 키 인증서에 포함되지 않습니다.

  • 인증서 지문: 짧고 고유한 인증서 표현식으로 API 제공업체가 패키지 이름과 함께 요청하는 경우가 많습니다. 앱을 제공업체 서비스에 등록하는 데 사용됩니다. 업로드 및 앱 서명 인증서의 MD5, SHA-1 및 SHA-256 지문은 Play Console의 앱 서명 페이지에서 찾을 수 있습니다. 같은 페이지에서 원본 인증서(.der)를 다운로드함으로써 다른 지문을 계산할 수도 있습니다.

  • Java Keystore(.jks 또는 .keystore): 보안 인증서와 개인 키 저장소입니다.

  • PEPK(Play Encrypt Private Key) 도구: 이 도구를 사용하여 Java Keystore에서 개인 키를 내보내고 암호화하여 Google Play로 전송할 수 있습니다. Google에서 사용할 앱 서명 키를 제공할 때 ‘Java Keystore에서 키 내보내기 및 업로드’ 옵션을 선택하고 지시에 따라 도구를 다운로드 및 사용하세요. 또는 ‘키 내보내기 및 업로드(Java Keystore 사용 안 함)’을 선택하여 PEPK 도구의 오픈소스 코드를 다운로드, 검토 및 사용하세요.

권한 및 액세스

Play Console 계정 소유자거나 전체 '프로덕션 버전 관리' 권한이 있는 사용자라면 Google Play 앱 서명을 선택할 수 있습니다. 개발자 계정당 한 번씩 서비스 약관에 동의해야 합니다. 서비스 약관에 동의하면 개별 앱을 프로그램에 등록할 수 있습니다.

서비스 약관에 동의해도 개발자 계정에 연결된 모든 앱이 자동으로 앱 서명에 등록되지는 않습니다.




AUTHENTICATION_FAILEDCLIENT_CUSTOMER_ID_IS_REQUIRED 및 유사한 오류

로그인, 비밀번호 또는 OAuth 자격증명 정보가 유효하지 않거나 클라이언트 고객 ID가 없거나 잘못된 계정을 가리킵니다. 자격증명 정보를 확인하세요.







I/SignInActivity( 3989): Transition from 0 to 1

I/SignInActivity( 3989): Transition from 1 to 3

W/ContextImpl( 1742): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1327 com.android.server.InputMethodManagerService.hideCurrentInputLocked:1992 com.android.server.InputMethodManagerService.windowGainedFocus:2082 com.android.internal.view.IInputMethodManager$Stub.onTransact:221 com.android.server.InputMethodManagerService.onTransact:873 

I/SignInActivity( 3989): Transition from 3 to 4

W/ChimeraUtils( 1938): Non Chimera context

W/GLSUser ( 1938): [DeviceKeyStore] Cannot load key: Device key file not found.

W/GLSUser ( 1938): [DeviceKeyStore] Cannot load key: Device key file not found.

I/SignInActivity( 3989): Transition from 4 to 5

I/SignInActivity( 3989): Transition from 5 to 6

I/SignInActivity( 3989): Transition from 6 to 11

W/SignInActivity( 3989): onSignInFailed()...

W/SignInActivity( 3989): Sign in failed during 6

W/SignInActivity( 3989): ==> Returning non-OK result: 10002

I/AppLifecycleTracker( 3989): onActivityPaused: 


I/SignInActivity( 3989): Transition from -1 to 0

I/SignInActivity( 3989): Transition from 0 to 1

I/SignInActivity( 3989): Transition from 1 to 3

I/SignInActivity( 3989): Transition from 3 to 4

I/SignInActivity( 3989): Transition from 4 to 5

I/SignInActivity( 3989): Transition from 5 to 6

I/SignInActivity( 3989): Transition from 6 to 11

W/SignInActivity( 3989): onSignInFailed()...

W/SignInActivity( 3989): Sign in failed during 6

W/SignInActivity( 3989): ==> Returning non-OK result: 10002

E/TokenFragment( 4832): Setting result error status code to: 16

I/GamesNativeSDK( 4832): Using existing jar.

I/GamesNativeSDK( 4832): Writing 1941 bytes to jar file

I/GamesNativeSDK( 4832): Using existing jar.

I/GamesNativeSDK( 4832): Writing 1066 bytes to jar file

I/GamesNativeSDK( 4832): Auth operation started: SIGN IN

I/GamesNativeSDK( 4832): Connecting to Google Play...

V/GamesNativeSDK( 4832): Received Activity Resume Event.

D/TokenFragment( 4832): onResume called

V/GamesNativeSDK( 4832): Play Games callback indicates connection failure.

I/GamesNativeSDK( 4832): UI interaction required to connect to Google Play.

V/GamesNativeSDK( 4832): Detaching from JVM on thread main_dispatch



https://stackoverrun.com/ko/q/11408566



I/Unity   ( 3119): SystemInfo CPU = Intel x86 SSE3, Cores = 2, Memory = 1512mb

I/Unity   ( 3119): ApplicationInfo com.smilejsu.testgpgs4 version 0.2 build df981af5-50b4-40c3-8323-c03df31a6b93

I/Unity   ( 3119): Built from '2018.3/release' branch, Version '2018.3.0f2 (6e9a27477296)', Build type 'Release', Scripting Backend 'mono', CPU 'x86'

D/Unity   ( 3119):  GL_EXT_debug_marker GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_depth24 GL_OES_depth32 GL_OES_element_index_uint GL_OES_texture_float GL_OES_texture_float_linear GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_EXT_texture_format_BGRA8888 GL_APPLE_texture_format_BGRA8888 GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_packed_depth_stencil GL_OES_vertex_half_float GL_OES_texture_npot GL_OES_rgb8_rgba8 GL_EXT_color_buffer_float ANDROID_gles_max_version_3_1 GL_OES_vertex_array_object

I/Unity   ( 3119): scope: drive

I/Unity   ( 3119):  

I/Unity   ( 3119): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3119): 

I/Unity   ( 3119): scope: drive.file

I/Unity   ( 3119):  

I/Unity   ( 3119): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3119): 

I/Unity   ( 3119): 로그인시도

I/Unity   ( 3119):  

I/Unity   ( 3119): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3119): 

I/Unity   ( 3119): localUser : [Player: 'localUser' (id )]

I/Unity   ( 3119):  

I/Unity   ( 3119): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3119): 

I/Unity   ( 3119): authenticated: False

I/Unity   ( 3119):  

I/Unity   ( 3119): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3119): 

I/Unity   ( 3119): Starting Auth with token client.

I/Unity   ( 3119):  

I/Unity   ( 3119): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3119): 

W/Unity   ( 3119): !!! [Play Games Plugin DLL] 02/10/19 4:11:16 +09:00 WARNING: Creating new PlayGamesPlatform

W/Unity   ( 3119):  

W/Unity   ( 3119): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

W/Unity   ( 3119): 

I/Unity   ( 3119):  [Play Games Plugin DLL] 02/10/19 4:11:16 +09:00 DEBUG: Activating PlayGamesPlatform.

I/Unity   ( 3119):  

I/Unity   ( 3119): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3119): 

I/Unity   ( 3119):  [Play Games Plugin DLL] 02/10/19 4:11:16 +09:00 DEBUG: PlayGamesPlatform activated: GooglePlayGames.PlayGamesPlatform

I/Unity   ( 3119):  

I/Unity   ( 3119): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3119): 

I/Unity   ( 3119):  [Play Games Plugin DLL] 02/10/19 4:11:16 +09:00 DEBUG: Creating platform-specific Play Games client.

I/Unity   ( 3119):  

I/Unity   ( 3119): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3119): 

I/Unity   ( 3119):  [Play Games Plugin DLL] 02/10/19 4:11:16 +09:00 DEBUG: Creating Android IPlayGamesClient Client

I/Unity   ( 3119):  

I/Unity   ( 3119): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3119): 

D/TokenFragment( 3119): Creating fragment

D/TokenFragment( 3119): onResume called

D/TokenFragment( 3119): Building client for: 22d8325 (a:false e:false i:true wc: 111180218558-tslmr9nku0e1spe07j47agb7i02t13kj.apps.googleusercontent.com f: false)

D/TokenFragment( 3119): signIn

D/TokenFragment( 3119): mGoogleSignInClient.silentSignIn

D/TokenFragment( 3119): Done with processRequest, result is pending.

D/TokenFragment( 3119): silentSignIn.onFailure

I/SignInActivity( 3201): Transition from -1 to 0

I/SignInActivity( 3201): Transition from 0 to 1

I/SignInActivity( 3201): Transition from 1 to 3

I/SignInActivity( 3201): Transition from 3 to 4

I/SignInActivity( 3201): Transition from 4 to 5

I/SignInActivity( 3201): Transition from 5 to 6

I/SignInActivity( 3201): Transition from 6 to 11

W/SignInActivity( 3201): onSignInFailed()...

W/SignInActivity( 3201): Sign in failed during 6

W/SignInActivity( 3201): ==> Returning non-OK result: 10002

E/TokenFragment( 3119): Setting result error status code to: 16

I/Unity   ( 3119): Building GPG services, implicitly attempts silent auth

I/Unity   ( 3119):  

I/Unity   ( 3119): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3119): 

I/GamesNativeSDK( 3119): Using existing jar.

I/GamesNativeSDK( 3119): Writing 1941 bytes to jar file

I/GamesNativeSDK( 3119): Using existing jar.

I/GamesNativeSDK( 3119): Writing 1066 bytes to jar file

I/GamesNativeSDK( 3119): Auth operation started: SIGN IN

I/GamesNativeSDK( 3119): Connecting to Google Play...

V/GamesNativeSDK( 3119): Received Activity Resume Event.

D/TokenFragment( 3119): onResume called

I/Unity   ( 3119): success: False

I/Unity   ( 3119):  

I/Unity   ( 3119): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3119): 

I/Unity   ( 3119):  [Play Games Plugin DLL] 02/10/19 4:11:25 +09:00 DEBUG: Invoking user callback on game thread

I/Unity   ( 3119):  

I/Unity   ( 3119): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3119): 

V/GamesNativeSDK( 3119): Play Games callback indicates connection failure.

I/GamesNativeSDK( 3119): UI interaction required to connect to Google Play.

I/Unity   ( 3119):  [Play Games Plugin DLL] 02/10/19 4:11:25 +09:00 DEBUG: Starting Auth Transition. Op: SIGN_IN status: ERROR_NOT_AUTHORIZED

I/Unity   ( 3119):  

I/Unity   ( 3119): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3119): 

I/Unity   ( 3119):  [Play Games Plugin DLL] 02/10/19 4:11:25 +09:00 DEBUG: AuthState == Unauthenticated calling auth callbacks with failure

I/Unity   ( 3119):  

I/Unity   ( 3119): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3119): 

V/GamesNativeSDK( 3119): Detaching from JVM on thread main_dispatch





https://developers.google.com/identity/protocols/googlescopes
https://www.googleapis.com/auth/drive.file




smilejsuui-MacBook-Pro:~ smilejsu$ adb logcat -s Unity GamesNativeSDK TokenFragment

--------- beginning of main

--------- beginning of system

I/Unity   ( 3403): SystemInfo CPU = Intel x86 SSE3, Cores = 2, Memory = 1512mb

I/Unity   ( 3403): ApplicationInfo com.smilejsu.testgpgs4 version 0.2 build 4f56a2a6-0f88-4560-8643-74288fb17019

I/Unity   ( 3403): Built from '2018.3/release' branch, Version '2018.3.0f2 (6e9a27477296)', Build type 'Release', Scripting Backend 'mono', CPU 'x86'

D/Unity   ( 3403):  GL_EXT_debug_marker GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_depth24 GL_OES_depth32 GL_OES_element_index_uint GL_OES_texture_float GL_OES_texture_float_linear GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_EXT_texture_format_BGRA8888 GL_APPLE_texture_format_BGRA8888 GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_packed_depth_stencil GL_OES_vertex_half_float GL_OES_texture_npot GL_OES_rgb8_rgba8 GL_EXT_color_buffer_float ANDROID_gles_max_version_3_1 GL_OES_vertex_array_object

I/Unity   ( 3403): ***** 3차시도 EnableSavedGames 제거 *****

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/Unity   ( 3403): 로그인시도

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/Unity   ( 3403): localUser : [Player: 'localUser' (id )]

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/Unity   ( 3403): authenticated: False

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/Unity   ( 3403): Starting Auth with token client.

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

W/Unity   ( 3403): !!! [Play Games Plugin DLL] 02/10/19 4:39:48 +09:00 WARNING: Creating new PlayGamesPlatform

W/Unity   ( 3403):  

W/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

W/Unity   ( 3403): 

I/Unity   ( 3403):  [Play Games Plugin DLL] 02/10/19 4:39:48 +09:00 DEBUG: Activating PlayGamesPlatform.

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/Unity   ( 3403):  [Play Games Plugin DLL] 02/10/19 4:39:48 +09:00 DEBUG: PlayGamesPlatform activated: GooglePlayGames.PlayGamesPlatform

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/Unity   ( 3403):  [Play Games Plugin DLL] 02/10/19 4:39:48 +09:00 DEBUG: Creating platform-specific Play Games client.

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/Unity   ( 3403):  [Play Games Plugin DLL] 02/10/19 4:39:48 +09:00 DEBUG: Creating Android IPlayGamesClient Client

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

D/TokenFragment( 3403): Creating fragment

D/TokenFragment( 3403): onResume called

D/TokenFragment( 3403): Building client for: 11c88c54 (a:false e:false i:false wc: 111180218558-tslmr9nku0e1spe07j47agb7i02t13kj.apps.googleusercontent.com f: false)

D/TokenFragment( 3403): signIn

D/TokenFragment( 3403): mGoogleSignInClient.silentSignIn

D/TokenFragment( 3403): Done with processRequest, result is pending.

D/TokenFragment( 3403): silentSignIn.onSuccess

I/Unity   ( 3403): Building GPG services, implicitly attempts silent auth

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/GamesNativeSDK( 3403): Writing 1941 bytes to jar file

I/GamesNativeSDK( 3403): Writing 1066 bytes to jar file

I/GamesNativeSDK( 3403): Auth operation started: SIGN IN

I/GamesNativeSDK( 3403): Connecting to Google Play...

V/GamesNativeSDK( 3403): Play Games callback indicates connection.

I/GamesNativeSDK( 3403): Successfully connected to Google Play.

I/Unity   ( 3403):  [Play Games Plugin DLL] 02/10/19 4:39:55 +09:00 DEBUG: Starting Auth Transition. Op: SIGN_IN status: VALID

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/Unity   ( 3403):  [Play Games Plugin DLL] 02/10/19 4:39:55 +09:00 DEBUG: Entering internal callback for PlayerManager#InternalFetchSelfCallback

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/Unity   ( 3403):  [Play Games Plugin DLL] 02/10/19 4:39:55 +09:00 DEBUG: Populating User

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/Unity   ( 3403):  [Play Games Plugin DLL] 02/10/19 4:39:55 +09:00 DEBUG: Found User: [Player: 'smilejsu' (id a_6018952439063187801)]

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/Unity   ( 3403):  [Play Games Plugin DLL] 02/10/19 4:39:55 +09:00 DEBUG: Maybe finish for User

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/Unity   ( 3403):  [Play Games Plugin DLL] 02/10/19 4:39:55 +09:00 DEBUG: Auth not finished. User=[Player: 'smilejsu' (id a_6018952439063187801)] achievements=

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/Unity   ( 3403):  [Play Games Plugin DLL] 02/10/19 4:39:57 +09:00 DEBUG: Entering internal callback for AchievementManager#InternalFetchAllCallback

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/Unity   ( 3403):  [Play Games Plugin DLL] 02/10/19 4:39:57 +09:00 DEBUG: Populating Achievements, status = VALID

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/Unity   ( 3403):  [Play Games Plugin DLL] 02/10/19 4:39:57 +09:00 DEBUG: Found 1 Achievements

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/Unity   ( 3403):  [Play Games Plugin DLL] 02/10/19 4:39:57 +09:00 DEBUG: Maybe finish for Achievements

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/Unity   ( 3403):  [Play Games Plugin DLL] 02/10/19 4:39:57 +09:00 DEBUG: Auth finished. Proceeding.

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/Unity   ( 3403):  [Play Games Plugin DLL] 02/10/19 4:39:57 +09:00 DEBUG: Invoking Callbacks: System.Action`2[System.Boolean,System.String]

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/Unity   ( 3403): success: True

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/Unity   ( 3403): localUser: True, , a_6018952439063187801

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

I/Unity   ( 3403):  [Play Games Plugin DLL] 02/10/19 4:39:57 +09:00 DEBUG: Invoking user callback on game thread

I/Unity   ( 3403):  

I/Unity   ( 3403): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3403): 

V/GamesNativeSDK( 3403): Detaching from JVM on thread main_dispatch





V/GamesNativeSDK( 3403): Detaching from JVM on thread main_dispatch

V/GamesNativeSDK( 3403): Received Activity Stop Event.

V/GamesNativeSDK( 3403): Attached to JVM on thread main_dispatch

V/GamesNativeSDK( 3403): Running disconnect operation.

V/GamesNativeSDK( 3403): Detaching from JVM on thread main_dispatch

I/Unity   ( 3885): SystemInfo CPU = Intel x86 SSE3, Cores = 2, Memory = 1512mb

I/Unity   ( 3885): ApplicationInfo com.smilejsu.testgpgs4 version 0.2 build 28b82b9c-f777-4e65-a0d3-c2c48da1fc18

I/Unity   ( 3885): Built from '2018.3/release' branch, Version '2018.3.0f2 (6e9a27477296)', Build type 'Release', Scripting Backend 'mono', CPU 'x86'

D/Unity   ( 3885):  GL_EXT_debug_marker GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_depth24 GL_OES_depth32 GL_OES_element_index_uint GL_OES_texture_float GL_OES_texture_float_linear GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_EXT_texture_format_BGRA8888 GL_APPLE_texture_format_BGRA8888 GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_packed_depth_stencil GL_OES_vertex_half_float GL_OES_texture_npot GL_OES_rgb8_rgba8 GL_EXT_color_buffer_float ANDROID_gles_max_version_3_1 GL_OES_vertex_array_object

I/Unity   ( 3885): ***** 4차시도 EnableSavedGames 추가 *****

I/Unity   ( 3885):  

I/Unity   ( 3885): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3885): 

I/Unity   ( 3885): 로그인시도

I/Unity   ( 3885):  

I/Unity   ( 3885): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3885): 

I/Unity   ( 3885): localUser : [Player: 'localUser' (id )]

I/Unity   ( 3885):  

I/Unity   ( 3885): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3885): 

I/Unity   ( 3885): authenticated: False

I/Unity   ( 3885):  

I/Unity   ( 3885): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3885): 

I/Unity   ( 3885): Starting Auth with token client.

I/Unity   ( 3885):  

I/Unity   ( 3885): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3885): 

W/Unity   ( 3885): !!! [Play Games Plugin DLL] 02/10/19 4:44:56 +09:00 WARNING: Creating new PlayGamesPlatform

W/Unity   ( 3885):  

W/Unity   ( 3885): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

W/Unity   ( 3885): 

I/Unity   ( 3885):  [Play Games Plugin DLL] 02/10/19 4:44:56 +09:00 DEBUG: Activating PlayGamesPlatform.

I/Unity   ( 3885):  

I/Unity   ( 3885): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3885): 

I/Unity   ( 3885):  [Play Games Plugin DLL] 02/10/19 4:44:56 +09:00 DEBUG: PlayGamesPlatform activated: GooglePlayGames.PlayGamesPlatform

I/Unity   ( 3885):  

I/Unity   ( 3885): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3885): 

I/Unity   ( 3885):  [Play Games Plugin DLL] 02/10/19 4:44:56 +09:00 DEBUG: Creating platform-specific Play Games client.

I/Unity   ( 3885):  

I/Unity   ( 3885): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3885): 

I/Unity   ( 3885):  [Play Games Plugin DLL] 02/10/19 4:44:56 +09:00 DEBUG: Creating Android IPlayGamesClient Client

I/Unity   ( 3885):  

I/Unity   ( 3885): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3885): 

D/TokenFragment( 3885): Creating fragment

D/TokenFragment( 3885): onResume called

D/TokenFragment( 3885): Building client for: 11c88c54 (a:false e:false i:false wc: 111180218558-tslmr9nku0e1spe07j47agb7i02t13kj.apps.googleusercontent.com f: false)

D/TokenFragment( 3885): signIn

D/TokenFragment( 3885): mGoogleSignInClient.silentSignIn

D/TokenFragment( 3885): Done with processRequest, result is pending.

D/TokenFragment( 3885): silentSignIn.onFailure

E/TokenFragment( 3885): Setting result error status code to: 16

I/Unity   ( 3885): Building GPG services, implicitly attempts silent auth

I/Unity   ( 3885):  

I/Unity   ( 3885): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3885): 

I/GamesNativeSDK( 3885): Writing 1941 bytes to jar file

I/GamesNativeSDK( 3885): Writing 1066 bytes to jar file

I/GamesNativeSDK( 3885): Auth operation started: SIGN IN

I/GamesNativeSDK( 3885): Connecting to Google Play...

V/GamesNativeSDK( 3885): Received Activity Resume Event.

D/TokenFragment( 3885): onResume called

I/Unity   ( 3885): success: False

I/Unity   ( 3885):  

I/Unity   ( 3885): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3885): 

I/Unity   ( 3885):  [Play Games Plugin DLL] 02/10/19 4:45:03 +09:00 DEBUG: Invoking user callback on game thread

I/Unity   ( 3885):  

I/Unity   ( 3885): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3885): 

V/GamesNativeSDK( 3885): Play Games callback indicates connection failure.

I/GamesNativeSDK( 3885): Error connecting to Google Play: code 8.

I/Unity   ( 3885):  [Play Games Plugin DLL] 02/10/19 4:45:04 +09:00 DEBUG: Starting Auth Transition. Op: SIGN_IN status: ERROR_NOT_AUTHORIZED

I/Unity   ( 3885):  

I/Unity   ( 3885): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3885): 

I/Unity   ( 3885):  [Play Games Plugin DLL] 02/10/19 4:45:04 +09:00 DEBUG: AuthState == Unauthenticated calling auth callbacks with failure

I/Unity   ( 3885):  

I/Unity   ( 3885): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 3885): 

V/GamesNativeSDK( 3885): Detaching from JVM on thread main_dispatch





V/GamesNativeSDK( 3885): Received Activity Stop Event.

I/Unity   ( 4276): SystemInfo CPU = Intel x86 SSE3, Cores = 2, Memory = 1512mb

I/Unity   ( 4276): ApplicationInfo com.smilejsu.testgpgs4 version 0.2 build 722389a4-86b8-429a-b4e0-0e11cc2511ed

I/Unity   ( 4276): Built from '2018.3/release' branch, Version '2018.3.0f2 (6e9a27477296)', Build type 'Release', Scripting Backend 'mono', CPU 'x86'

D/Unity   ( 4276):  GL_EXT_debug_marker GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_depth24 GL_OES_depth32 GL_OES_element_index_uint GL_OES_texture_float GL_OES_texture_float_linear GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_EXT_texture_format_BGRA8888 GL_APPLE_texture_format_BGRA8888 GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_packed_depth_stencil GL_OES_vertex_half_float GL_OES_texture_npot GL_OES_rgb8_rgba8 GL_EXT_color_buffer_float ANDROID_gles_max_version_3_1 GL_OES_vertex_array_object

I/Unity   ( 4276): ***** 5차시도 EnableSavedGames 제거 하고 OauthScope로 DRIVE.Scope SCOPE_FILE넣기 *****

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/Unity   ( 4276): 로그인시도

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/Unity   ( 4276): localUser : [Player: 'localUser' (id )]

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/Unity   ( 4276): authenticated: False

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/Unity   ( 4276): Starting Auth with token client.

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

W/Unity   ( 4276): !!! [Play Games Plugin DLL] 02/10/19 4:49:40 +09:00 WARNING: Creating new PlayGamesPlatform

W/Unity   ( 4276):  

W/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

W/Unity   ( 4276): 

I/Unity   ( 4276):  [Play Games Plugin DLL] 02/10/19 4:49:40 +09:00 DEBUG: Activating PlayGamesPlatform.

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/Unity   ( 4276):  [Play Games Plugin DLL] 02/10/19 4:49:40 +09:00 DEBUG: PlayGamesPlatform activated: GooglePlayGames.PlayGamesPlatform

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/Unity   ( 4276):  [Play Games Plugin DLL] 02/10/19 4:49:40 +09:00 DEBUG: Creating platform-specific Play Games client.

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/Unity   ( 4276):  [Play Games Plugin DLL] 02/10/19 4:49:40 +09:00 DEBUG: Creating Android IPlayGamesClient Client

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

D/TokenFragment( 4276): Creating fragment

D/TokenFragment( 4276): onResume called

D/TokenFragment( 4276): Building client for: 11c88c54 (a:false e:false i:false wc: 111180218558-tslmr9nku0e1spe07j47agb7i02t13kj.apps.googleusercontent.com f: false)

D/TokenFragment( 4276): signIn

D/TokenFragment( 4276): mGoogleSignInClient.silentSignIn

D/TokenFragment( 4276): Done with processRequest, result is pending.

D/TokenFragment( 4276): silentSignIn.onFailure

I/Unity   ( 4276): Building GPG services, implicitly attempts silent auth

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/GamesNativeSDK( 4276): Writing 1941 bytes to jar file

I/GamesNativeSDK( 4276): Writing 1066 bytes to jar file

I/GamesNativeSDK( 4276): Auth operation started: SIGN IN

I/GamesNativeSDK( 4276): Connecting to Google Play...

V/GamesNativeSDK( 4276): Received Activity Resume Event.

D/TokenFragment( 4276): onResume called

V/GamesNativeSDK( 4276): Play Games callback indicates connection.

I/GamesNativeSDK( 4276): Successfully connected to Google Play.

I/Unity   ( 4276):  [Play Games Plugin DLL] 02/10/19 4:50:04 +09:00 DEBUG: Starting Auth Transition. Op: SIGN_IN status: VALID

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/Unity   ( 4276):  [Play Games Plugin DLL] 02/10/19 4:50:04 +09:00 DEBUG: Entering internal callback for PlayerManager#InternalFetchSelfCallback

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/Unity   ( 4276):  [Play Games Plugin DLL] 02/10/19 4:50:04 +09:00 DEBUG: Populating User

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/Unity   ( 4276):  [Play Games Plugin DLL] 02/10/19 4:50:04 +09:00 DEBUG: Found User: [Player: 'smilejsu' (id a_6018952439063187801)]

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/Unity   ( 4276):  [Play Games Plugin DLL] 02/10/19 4:50:04 +09:00 DEBUG: Maybe finish for User

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/Unity   ( 4276):  [Play Games Plugin DLL] 02/10/19 4:50:04 +09:00 DEBUG: Auth not finished. User=[Player: 'smilejsu' (id a_6018952439063187801)] achievements=

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/Unity   ( 4276):  [Play Games Plugin DLL] 02/10/19 4:50:04 +09:00 DEBUG: Entering internal callback for AchievementManager#InternalFetchAllCallback

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/Unity   ( 4276):  [Play Games Plugin DLL] 02/10/19 4:50:04 +09:00 DEBUG: Populating Achievements, status = VALID

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/Unity   ( 4276):  [Play Games Plugin DLL] 02/10/19 4:50:04 +09:00 DEBUG: Found 1 Achievements

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/Unity   ( 4276):  [Play Games Plugin DLL] 02/10/19 4:50:04 +09:00 DEBUG: Maybe finish for Achievements

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/Unity   ( 4276):  [Play Games Plugin DLL] 02/10/19 4:50:04 +09:00 DEBUG: Auth finished. Proceeding.

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/Unity   ( 4276):  [Play Games Plugin DLL] 02/10/19 4:50:04 +09:00 DEBUG: Invoking Callbacks: System.Action`2[System.Boolean,System.String]

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/Unity   ( 4276): success: True

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/Unity   ( 4276): localUser: True, , a_6018952439063187801

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

I/Unity   ( 4276):  [Play Games Plugin DLL] 02/10/19 4:50:04 +09:00 DEBUG: Invoking user callback on game thread

I/Unity   ( 4276):  

I/Unity   ( 4276): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

I/Unity   ( 4276): 

V/GamesNativeSDK( 4276): Detaching from JVM on thread main_dispatch




해결방법정리 

1
2
3
4
5
6
7
8
9
PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
            .AddOauthScope("https://www.googleapis.com/auth/drive.file")
            //.EnableSavedGames()
            .Build();
        PlayGamesPlatform.InitializeInstance(config);
        // recommended for debugging:
        PlayGamesPlatform.DebugLogEnabled = true;
        // Activate the Google Play Games platform
        PlayGamesPlatform.Activate();
cs


참고 : 

https://github.com/playgameservices/android-basic-samples

샘플코드중 초기화 부분

1
2
3
4
5
6
7
8
9
10
11
12
13
@Override
  protected void onCreate(Bundle savedInstanceState) {
 
    log("onCreate.");
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
 
    // Create the client used to sign in.
    mGoogleSignInClient = GoogleSignIn.getClient(this,
        new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN)
            // Since we are using SavedGames, we need to add the SCOPE_APPFOLDER to access Google Drive.
            .requestScopes(Drive.SCOPE_APPFOLDER)
            .build());
cs

https://developers.google.com/identity/protocols/googlescopes

https://developers.google.com/android/reference/com/google/android/gms/drive/Drive.html#SCOPE_FILE


문제의 원인은?

확실하지는 않지만 GPGS초기화 부분에서 사용했던 부분 EnableSavedGames() 이 잘 동작 하지 않는듯 보인다. 

이상한것은 어느 시점 (2019.01.18) 이전 프로젝트에서는 잘 동작 한다는것.

확실한 원인인을 찾아내지 못했기에 조금 찜찜하다;


로그인만 됨 

저장하기 하면 에러 

2019-02-11

 NotImplementedException: You must enable saved games before it can be used. See PlayGamesClientConfiguration.Builder.EnableSavedGames.

E/Unity   ( 4042):   at GooglePlayGames.Native.UnsupportedSavedGamesClient.OpenWithAutomaticConflictResolution (System.String filename, GooglePlayGames.BasicApi.DataSource source, GooglePlayGames.BasicApi.SavedGame.ConflictResolutionStrategy resolutionStrategy, System.Action`2[T1,T2] callback) [0x00000] in <e77971844bd4443bb3e6c8fa5b33ce6c>:0

E/Unity   ( 4042):   at App.SaveToCloud (System.String dataToSave) [0x00025] in <e77971844bd4443bb3e6c8fa5b33ce6c>:0

E/Unity   ( 4042):   at App.SaveToCloud () [0x00027] in <e77971844bd4443bb3e6c8fa5b33ce6c>:0

E/Unity   ( 4042):   at App.<Start>b__14_3 () [0x00000] in <e77971844bd4443bb3e6c8fa5b33ce6c>:0

E/Unity   ( 4042):   at UnityEngine.Events.InvokableCall.Invoke () [0x00011] in <004fc436a9154f7fab4df9679445af6c>:0

E/Unity   ( 4042):   at UnityEngine.Events.UnityEvent.Invoke () [0x00023] in <004fc436a9154f7fab4df9679445af6c>:0

E/Unity   ( 4042):   at UnityEngine.UI.Button.Press () [0x00027] in <d8a17036f3054790a43ef58626f72ed2>:0

E/Unity   ( 4042):   at UnityEngine.UI.Button.



https://developers.google.com/drive/android/deprecation



Google 드라이브 Android API 사용 중단

드라이브 Android API는 2018 년 12 월 6 일부터 지원 중단되며 2019 년 12 월 6 일에 사용 중지됩니다 .

타임 라인

날짜Android API 상태 드라이브
2018 년 12 월 6 일지원 중단이 공개됩니다. 기존 클라이언트는 API에 정상적으로 액세스 할 수 있지만 마이그레이션 작업을 즉시 시작해야합니다. 신규 고객은 API를 사용하지 않아야합니다.
2019 년 10 월 21 일드라이브 Android API가 Google Play 서비스 SDK 배포에서 제거되었습니다. 드라이브 Android Android API 종속성을 제거 할 때까지 앱을 빌드 할 수 없지만 기존 빌드는 영향을받지 않습니다. 드라이브 Android API 공개 문서는 더 이상 사용할 수 없습니다.
2019 년 12 월 6 일드라이브 Android API가 종료되고 모든 연결 시도가 거부됩니다. 클라이언트는이 날짜까지 마이그레이션해야합니다.

이주

드라이브 데이터에 대한 액세스가 필요한 클라이언트는 드라이브 REST API 및 Java 래퍼 를 통해이를 수행 할 수 있습니다.

클라이언트 마이그레이션 작업을 쉽게하기 위해 REST API를 통해 사용자의 드라이브 파일을 생성, 수정 및 쿼리하는 방법을 보여주는 샘플 앱 이 제공되었습니다. Android API의 기능을 복제하는 데 대한 자세한 내용은 다음 하위 절에서 설명합니다.

앱 데이터 액세스

향후 앱 데이터 폴더 에 저장 및 동기화 지원이 드라이브에서 삭제 될 수 있습니다. 앱 데이터 저장이 필요한 고객 은 Cloud Firestore 와 같은 비 드라이브 솔루션으로 마이그레이션 하는 것이 좋습니다 .

사용자가 볼 수있는 드라이브 데이터 액세스

'내 드라이브'에있는 사용자가 볼 수있는 데이터의 경우 REST API는 Android API 기능을 원활하게 복제하는 Java 래퍼를 제공합니다. REST API에는 팀 드라이브 및 공유와 같이 Android API에서 지원되지 않는 기능이 포함되어 있습니다.

샘플 응용 프로그램은 생성, 수정 및 REST API 자바 래퍼를 사용하여 드라이브 파일을 조회하는 방법을 보여줍니다. Android와 REST API 호출에는 기능상의 차이점이 거의 없으며 대부분의 클라이언트에서 필요한 코드 변경 사항은 통어론 적입니다.

프로젝트 설정

클라이언트는 기존 드라이브 Android API 인증 프로세스 와 마찬가지로 Google Cloud Console 에서 드라이브 API에 대한 액세스를 요청하도록 앱을 구성해야합니다 드라이브 Android API 액세스가 사용 설정된 대부분의 프로젝트의 경우 기존 프로젝트 구성을 변경하지 않아도됩니다. 그러나 디버깅하기 어려운 오류를 피하려면 프로젝트에 대해 다음 단계가 완료되었는지 확인하십시오.

  1. API 라이브러리 에서 드라이브 API를 사용하도록 설정합니다 .
  2. 자격증 명 탭 에 OAuth Android 클라이언트 ID를 만듭니다 .
  3. 동의 화면을 구성 하고 앱에 필요한 드라이브 범위를 요청하십시오.

오프라인 동기화

모든 드라이브 Android API 클라이언트는 무료 메타 데이터 동기화를 통해 로컬 데이터베이스를 수신합니다. 이 기능은 REST API에서 제공하지 않으며, 앱에 오프라인 우선 모델이 필요한 경우 직접 구현해야합니다.

깨끗한 객체 지향 인터페이스에서 SQL 작업을 캡슐화하는 로컬 저장소 용 Room Persistence Library 를 권장합니다 오프라인 동기화를 사용하려면 네트워크 모니터링, 절전, 제한 및 오프라인 동기화와 관련된 기타 모든 문제가있는 세부 정보를 처리 하는 SyncAdapter 를 만드는 것이 좋습니다 이러한 제품에 대한 기존 문서는 REST API를 통해 얻은 드라이브 데이터에 사용될 때 영향을받지 않습니다.

파일 선택기 UI

Android API의 파일 선택기 (예 : 호출 DriveClient#newOpenFileActivityIntentSender를 사용하는 클라이언트의 경우 Drive Android 앱의 콘텐츠 제공 업체에 액세스하는 SAF ( Storage Access Framework )를 사용하는 것이 좋습니다 샘플 응용 프로그램은 파일 선택기를 시작하는 방법을 설명 Intent하고 반환 데이터를 처리합니다.

Android API의 파일 선택 도구와 비교할 때 SAF의 몇 가지 단점이 있으며 다음 중 하나가 금지되면 자신 만의 UI를 만들고이를 드라이브 REST API 쿼리의 결과로 채워야합니다.

  • SAF를 통해 읽은 파일은 동일한 메커니즘을 통해 수정하거나 삭제할 수 없습니다. 그러나 SAF를 사용 fileId하여 메타 데이터에서 파일을 검색 한 다음 샘플 앱에 표시된 것처럼 REST API를 통해 파일 을 업데이트 할 수 있습니다 .
  • SAF는 Android API 레벨 21 이상에서 지원되며 가상 파일 지원 (예 : Google 문서 도구)은 24+에서만 제공됩니다. 드라이브 Android API는 API 레벨 14 이상을 지원합니다.
  • 사용자가 SAF를 통해 드라이브 파일을 선택할 수 있으려면 드라이브 Android 앱이 설치되어 있어야합니다. 드라이브는 표준 Android OS와 번들로 제공되며 제거 할 수는 없지만 Android Go 변형 에는 기본적으로 포함 되지 않습니다 .
  • UI가 뚜렷히 다르기 때문에 SAF로 마이그레이션 할 때 사용자가 볼 수있는 변경 사항이 표시됩니다.


반응형