Code Monkey home page Code Monkey logo

cpp-android-basic-samples's People

Contributors

claywilkinson avatar dturner avatar ggfan avatar gguuss avatar hak avatar iannilewis avatar jknightdoeswork avatar msmaurizio avatar mystal avatar naokigoogle avatar olehkuznetsov avatar thedmail avatar tjohns avatar wolffg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cpp-android-basic-samples's Issues

Connection errors when running minimalist.

So I now have built the unmodified sources of minimalist android example.

The changes I made are limited to:

  • Pointing to my gpg include files in Android.mk
  • res/values/ids.xml changed to use my app id.
  • Used my package name in AndroidManifest.xml

I use: ndkr9d, v1.3 of google play game services sdk. v21 of google play services.
Latest google play services app downloaded.
My account is registered as test account for my app.
My app is linked twice, with debug and release keys in Google Play Developer Console.

When running, I get the log below.

There are two problems with it:

  1. The login fails (see end of log.)
  2. There are problems with class definitions not being found. (see start of log.)
V/GamesNativeSDK(12369): Attached to JVM on thread 1927939016
I/native-activity(12369): Setting up gpg-cpp
I/TeapotNativeActivity(12369): Initializing Services
I/TeapotNativeActivity(12369): Uninitialized services, so creating
V/GamesNativeSDK(12369): Using classes from /data/data/com.steenriver.Biplane/app_.gpg.classloader/4da25210572e7e07ea67142ded62c42e.jar.
D/dalvikvm(12369): DexOpt: --- BEGIN '4da25210572e7e07ea67142ded62c42e.jar' (bootstrap=0) ---
D/dalvikvm(12385): DexOpt: load 4ms, verify+opt 0ms, 90732 bytes
D/dalvikvm(12369): DexOpt: --- END '4da25210572e7e07ea67142ded62c42e.jar' (success) ---
D/dalvikvm(12369): DEX prep '/data/data/com.steenriver.Biplane/app_.gpg.classloader/4da25210572e7e07ea67142ded62c42e.jar': unzip in 0ms, rewrite 56ms
E/GamesNativeSDK(12369): Exception in dalvik/system/DexClassLoader.loadClass: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.games.NativeSdkEntryPoints" on path: DexPathList[[zip file "/data/data/com.steenriver.Biplane/app_.gpg.classloader/4da25210572e7e07ea67142ded62c42e.jar"],nativeLibraryDirectories=[/vendor/lib, /system/lib]].
W/dalvikvm(12369): Unable to resolve superclass of Lcom/google/android/gms/common/api/d; (148)
W/dalvikvm(12369): Link of class 'Lcom/google/android/gms/common/api/d;' failed
I/dalvikvm(12369): Could not find method com.google.android.gms.common.api.d.a, referenced from method com.google.android.gms.common.api.GoogleApiClient$Builder.gl
W/dalvikvm(12369): VFY: unable to resolve static method 3084: Lcom/google/android/gms/common/api/d;.a (Landroid/support/v4/app/FragmentActivity;)Lcom/google/android/gms/common/api/d;
D/dalvikvm(12369): VFY: replacing opcode 0x71 at 0x0002
W/dalvikvm(12369): VFY: unable to find class referenced in signature (Landroid/support/v4/app/FragmentActivity;)
E/dalvikvm(12369): Could not find class 'android.support.v4.app.FragmentActivity', referenced from method com.google.android.gms.common.api.GoogleApiClient$Builder.enableAutoManage
W/dalvikvm(12369): VFY: unable to resolve check-cast 149 (Landroid/support/v4/app/FragmentActivity;) in Lcom/google/android/gms/common/api/GoogleApiClient$Builder;
D/dalvikvm(12369): VFY: replacing opcode 0x1f at 0x0010
V/AlarmManager(  934): waitForAlarm result :4
V/AlarmManager(  934): AlarmManager_setLocked to type=2 curELAPSED = 509933487 as =509948 ans=897000000
V/AlarmManager(  934): sending alarm Alarm{44a2e7a8 type 0 PendingIntent{44f3bd30: PendingIntentRecord{4468f6b8 startService Key{startService pkg=com.android.vending intent=cmp=com.android.vending/com.google.android.finsky.services.ContentSyncService flags=0x0 u=0}}}}
W/dalvikvm(12369): VFY: unable to find class referenced in signature (Landroid/support/v4/app/FragmentActivity;)
W/dalvikvm(12369): Unable to resolve superclass of Lcom/google/android/gms/common/api/d; (148)
W/dalvikvm(12369): Link of class 'Lcom/google/android/gms/common/api/d;' failed
I/dalvikvm(12369): Could not find method com.google.android.gms.common.api.d.a, referenced from method com.google.android.gms.common.api.b.stopAutoManage
W/dalvikvm(12369): VFY: unable to resolve static method 3084: Lcom/google/android/gms/common/api/d;.a (Landroid/support/v4/app/FragmentActivity;)Lcom/google/android/gms/common/api/d;
D/dalvikvm(12369): VFY: replacing opcode 0x71 at 0x000a
W/PopupManager(12369): 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.
I/TeapotNativeActivity(12369): Created
V/GamesNativeSDK(12369): Received Activity Resume Event.
I/GamesNativeSDK(12369): Connecting to Google Play...
V/GamesNativeSDK(12369): Attached to JVM on thread main_dispatch
W/dalvikvm(12369): VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
W/dalvikvm(12369): VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
W/dalvikvm(12369): VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
V/AlarmManager(  934): trigger ELAPSED_REALTIME_WAKEUP or RTC_WAKEUP
V/AlarmManager(  934): !@trigger WAKEUP Alarm{44a2e7a8 type 0 PendingIntent{44f3bd30: PendingIntentRecord{4468f6b8 startService Key{startService pkg=com.android.vending intent=cmp=com.android.vending/com.google.android.finsky.services.ContentSyncService flags=0x0 u=0}}}}
D/StatusBarManagerService(  934): semi p:12369,o:f
W/dalvikvm(12369): VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
W/dalvikvm(12369): VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
W/dalvikvm(12369): VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
W/dalvikvm(12369): VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
E/dalvikvm(12369): Could not find class 'android.support.v4.app.FragmentActivity', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.showErrorDialogFragment
W/dalvikvm(12369): VFY: unable to resolve instanceof 149 (Landroid/support/v4/app/FragmentActivity;) in Lcom/google/android/gms/common/GooglePlayServicesUtil;
D/dalvikvm(12369): VFY: replacing opcode 0x20 at 0x0008
E/dalvikvm(12369): Could not find class 'android.support.v4.app.FragmentActivity', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.showErrorDialogFragment
W/dalvikvm(12369): VFY: unable to resolve check-cast 149 (Landroid/support/v4/app/FragmentActivity;) in Lcom/google/android/gms/common/GooglePlayServicesUtil;
D/dalvikvm(12369): VFY: replacing opcode 0x1f at 0x000c
D/InputTransport(  934): Input channel constructed: name='441ed7d0 com.steenriver.Biplane/android.app.NativeActivity (server)', fd=401
D/InputTransport(  934): Input channel constructed: name='441ed7d0 com.steenriver.Biplane/android.app.NativeActivity (client)', fd=435
D/InputTransport(  934): Input channel destroyed: name='441ed7d0 com.steenriver.Biplane/android.app.NativeActivity (client)', fd=435
D/InputTransport(12369): Input channel constructed: name='441ed7d0 com.steenriver.Biplane/android.app.NativeActivity (client)', fd=67
D/PhoneStatusBar( 1283): setSemiTransparentMode=false, mTransparentMode=false, mSemiTransparentMode=false, mMultiWindowMode=false
D/KeyguardUpdateMonitor( 1283): sendKeyguardVisibilityChanged(true)
I/SurfaceFlinger(  414): id=518 createSurf (1440x2560),4 flag=404, com.steenriver.Biplane/android.app.NativeActivity
I/SpenGestureManager(  934): setFocusWindow21020
D/KeyguardUpdateMonitor( 1283): sendKeyguardVisibilityChanged(true)
D/InputDispatcher(  934): Focus entered window: Window{441ed7d0 u0 com.steenriver.Biplane/android.app.NativeActivity}
D/PointerIcon(  934): setMouseIconStyle1 pointerType: 1001iconType:101 flag:0
D/PointerIcon(  934): setMouseCustomIcon IconType is same.101
D/PointerIcon(  934): setHoveringSpenIconStyle1 pointerType: 10001iconType:1 flag:0
D/PointerIcon(  934): setHoveringSpenCustomIcon IconType is same.1
D/ViewSystem(12369): >> surfaceCreated
D/ViewSystem(12369): >> surfaceChanged W=1440, H=2560)
I/Adreno-EGL(12369): <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build:  ()
I/Adreno-EGL(12369): OpenGL ES Shader Compiler Version: E031.24.02.06
I/Adreno-EGL(12369): Build Date: 06/10/14 Tue
I/Adreno-EGL(12369): Local Branch: LA.3.6_018_20140610_r780815_593820
I/Adreno-EGL(12369): Remote Branch: 
I/Adreno-EGL(12369): Local Patches: 
I/Adreno-EGL(12369): Reconstruct Branch: 
I/qdutils (12369): PartialUpdate status: Disabled
I/qdutils (12369): Left Align: 8
I/qdutils (12369): Width Align: 8
I/qdutils (12369): Top Align: 1
I/qdutils (12369): Height Align: 1
I/qdutils (12369): Min ROI Width: 1
I/qdutils (12369): Min ROI Height: 2
I/qdutils (12369): Needs ROI Merge: 0
I/qdutils (12369): Left Split=720
I/qdutils (12369): Right Split=720
D/KeyguardUpdateMonitor( 1283): handleKeyguardVisibilityChanged(1)
D/KeyguardUpdateMonitor( 1283): handleKeyguardVisibilityChanged(1)
D/InputTransport(  934): Input channel constructed: name='ClientState{43724bd0 uid 10254 pid 12369} (server)', fd=435
D/InputTransport(  934): Input channel constructed: name='ClientState{43724bd0 uid 10254 pid 12369} (client)', fd=436
D/InputTransport(  934): Input channel destroyed: name='ClientState{43724bd0 uid 10254 pid 12369} (client)', fd=436
D/InputTransport( 2181): Input channel constructed: name='ClientState{43724bd0 uid 10254 pid 12369} (client)', fd=80
D/InputTransport( 1480): Input channel destroyed: name='ClientState{442e4a78 uid 10011 pid 1480} (server)', fd=79
W/ContextImpl(  934): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1512 com.android.server.InputMethodManagerService$4.run:2728 java.lang.Thread.run:841 <bottom of call stack> <bottom of call stack> 
D/InputTransport(  934): Input channel constructed: name='ClientState{43724bd0 uid 10254 pid 12369} (server)', fd=436
D/InputTransport(  934): Input channel destroyed: name='ClientState{43724bd0 uid 10254 pid 12369} (server)', fd=436
D/InputTransport(12369): Input channel constructed: name='ClientState{43724bd0 uid 10254 pid 12369} (server)', fd=72
D/KeyguardUpdateMonitor( 1283): sendKeyguardVisibilityChanged(true)
D/KeyguardUpdateMonitor( 1283): handleKeyguardVisibilityChanged(1)
D/KeyguardUpdateMonitor( 1283): sendKeyguardVisibilityChanged(true)
I/ActivityManager(  934): Displayed com.steenriver.Biplane/android.app.NativeActivity: +285ms
I/Sensors (  934): Acc old sensor_state 8192, new sensor_state : 8193 en : 1
D/KeyguardUpdateMonitor( 1283): sendKeyguardVisibilityChanged(true)
D/InputTransport(  934): Input channel destroyed: name='43e07cf8 Starting com.steenriver.Biplane (server)', fd=389
D/KeyguardUpdateMonitor( 1283): handleKeyguardVisibilityChanged(1)
V/GamesNativeSDK(12369): Play Games callback indicates connection failure.
D/InputTransport(  934): Input channel destroyed: name='43e07cf8 Starting com.steenriver.Biplane (client)', fd=399
I/GamesNativeSDK(12369): UI interaction required to connect to Google Play.
I/TeapotNativeActivity(12369): Sign in finished with a result of -3
I/native-activity(12369): OnAuthActionFinished
I/native-activity(12369): You are not logged in!
I/TeapotNativeActivity(12369): Fetching all blocking
I/TeapotNativeActivity(12369): --------------------------------------------------------------
I/TeapotNativeActivity(12369): Fetching all nonblocking
I/TeapotNativeActivity(12369): --------------------------------------------------------------
I/TeapotNativeActivity(12369): Achievement response status: -3

Requested ID not returned from GmsCore -- ERROR_INTERNAL

I do a Fetch on a player id, like so:

 game_services_->Players().Fetch( id, fetchcallback );

On one party, this works fine.
On the device of the other party, I get ERROR_INTERNAL as Fetch result.

In the logs I see:
Requested ID not returned from GmsCore
What could be the cause of this?

I/swaag   (19043): Our opponent in slot 0 has id 110078821488315885564
I/libjingle( 9661): IbbDataTask::ProcessStart() called:
I/libjingle( 9661): Got Xmpp data back: <ibb:data ibb:seq="1" ibb:sid="0" xmlns:ibb="http://jabber.org/protocol/ibb"/>
I/libjingle( 9661): static void gtalk::LibjingleJniHelper::DispatchIbbSendResult(jobject, const string&, const string&, bool): Dispatch ID:1
I/libjingle( 9661): IbbDataTask::ProcessStart() called:
E/GamesNativeSDK(19043): Requested ID not returned from GmsCore.
E/swaag   (19043): Players().Fetch() failed for slot 0, id 110078821488315885564
E/swaag   (19043): Status ERROR_INTERNAL

ButtonClicker crash: Invalid indirect reference 0x4196dc20 in decodeIndirectRef

When starting ButtonClicker, the app crashes with:
Invalid indirect reference 0x4196dc20 in decodeIndirectRef

I/Adreno-EGL(11001): <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: ()
I/Adreno-EGL(11001): OpenGL ES Shader Compiler Version: E031.24.00.08+13
I/Adreno-EGL(11001): Build Date: 05/12/14 Mon
I/Adreno-EGL(11001): Local Branch: 0512_AU200_patches
I/Adreno-EGL(11001): Remote Branch:
I/Adreno-EGL(11001): Local Patches:
I/Adreno-EGL(11001): Reconstruct Branch:
D/SSRMv2:TSP:AirViewOnOff( 934): DeviceInfo:: 00000000000
D/SSRMv2:TSP:AirViewOnOff( 934): SettingsAirViewInfo:: 000000000
D/KeyguardUpdateMonitor( 1218): sendKeyguardVisibilityChanged(true)
D/KeyguardUpdateMonitor( 1218): sendKeyguardVisibilityChanged(true)
D/KeyguardUpdateMonitor( 1218): handleKeyguardVisibilityChanged(1)
D/PhoneStatusBar( 1218): Status bar WINDOW_STATE_HIDING
D/KeyguardUpdateMonitor( 1218): handleKeyguardVisibilityChanged(1)
D/KeyguardUpdateMonitor( 1218): sendKeyguardVisibilityChanged(true)
D/CustomFrequencyManagerService( 934): releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT frequency : 1958400 uid : 1000 pid : 934 tag : ACTIVITY_RESUME_BOOSTER@6
W/ActivityManager( 934): mDVFSHelper.release()
W/ContextImpl( 934): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1501 com.android.server.InputMethodManagerService$4.run:2827 java.lang.Thread.run:841
D/CustomFrequencyManagerService( 934): acquireDVFSLockLocked : type : DVFS_MIN_LIMIT frequency : 1958400 uid : 1000 pid : 934 pkgName : ACTIVITY_RESUME_BOOSTER@9
I/ServiceKeeper( 934): In getappinfo pid = 934 pkgName = android appinfo = null
I/ServiceKeeper( 934): In getseinfo pid = 934 uid = 1000 seinfo= system
D/ChimeraCfgMgr( 7496): Loading module com.google.android.gms.games from APK com.google.android.play.games
D/ChimeraModuleLdr( 7496): Module APK com.google.android.play.games already loaded
D/KeyguardUpdateMonitor( 1218): handleKeyguardVisibilityChanged(1)
D/KeyguardUpdateMonitor( 1218): handleKeyguardVisibilityChanged(1)
V/GamesNativeSDK(11001): Play Games callback indicates connection failure.
I/GamesNativeSDK(11001): UI interaction required to connect to Google Play.
I/com.steenriver.example.games.bc3(11001): Initialized Java UI
W/dalvikvm(11001): Invalid indirect reference 0x4196dc20 in decodeIndirectRef
I/dalvikvm(11001): "main" prio=5 tid=1 RUNNABLE
I/dalvikvm(11001): | group="main" sCount=0 dsCount=0 obj=0x4174dea0 self=0x416454c8
I/dalvikvm(11001): | sysTid=11001 nice=0 sched=0/0 cgrp=apps handle=1074237780
I/dalvikvm(11001): | state=R schedstat=( 102945948 56663276 376 ) utm=3 stm=7 core=1
I/dalvikvm(11001): at com.sample.helper.NDKHelper.RunOnUiThreadHandler(Native Method)
I/dalvikvm(11001): at com.sample.helper.NDKHelper$1.run(NDKHelper.java:228)
I/dalvikvm(11001): at android.os.Handler.handleCallback(Handler.java:733)
I/dalvikvm(11001): at android.os.Handler.dispatchMessage(Handler.java:95)
I/dalvikvm(11001): at android.os.Looper.loop(Looper.java:136)
I/dalvikvm(11001): at android.app.ActivityThread.main(ActivityThread.java:5476)
I/dalvikvm(11001): at java.lang.reflect.Method.invokeNative(Native Method)
I/dalvikvm(11001): at java.lang.reflect.Method.invoke(Method.java:515)
I/dalvikvm(11001): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
I/dalvikvm(11001): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
I/dalvikvm(11001): at dalvik.system.NativeStart.main(Native Method)
I/dalvikvm(11001):
E/dalvikvm(11001): VM aborting
F/libc (11001): Fatal signal 6 (SIGABRT) at 0x00002af9 (code=-6), thread 11001 (main)
I/NDKHelper(11001): Activity does not have android:configChanges='orientation|screenSize' attributes in AndroidManifest.xml.
I/com.steenriver.example.games.bc3(11001): Attribute 'MinimumWidth' updating
I/com.steenriver.example.games.bc3(11001): Attribute 'MinimumWidth' updating
I/com.steenriver.example.games.bc3(11001): Attribute 'MinimumWidth' updating
I/com.steenriver.example.games.bc3(11001): Attribute 'MinimumWidth' updating
I/com.steenriver.example.games.bc3(11001): Attribute 'Gravity' updating
I/com.steenriver.example.games.bc3(11001): Attribute 'TextColor' updating
E/cutils ( 338): Failed to mkdirat(/storage/extSdCard/Android): Read-only file system
W/ContextImpl(11001): Failed to ensure directory: /storage/extSdCard/Android/data/com.steenriver.example.games.bc3/files
W/Vold ( 338): Returning OperationFailed - no handler for errno 30
E/cutils ( 338): Failed to mkdirat(/storage/extSdCard/Android): Read-only file system
W/ContextImpl(11001): Failed to ensure directory: /storage/extSdCard/Android/data/com.steenriver.example.games.bc3/files
W/Vold ( 338): Returning OperationFailed - no handler for errno 30
I/com.steenriver.example.games.bc3(11001): Program link log:
I/com.steenriver.example.games.bc3(11001): --From Vertex Shader:
I/com.steenriver.example.games.bc3(11001): --From Fragment Shader:
I/com.steenriver.example.games.bc3(11001): Link was successful.
I/com.steenriver.example.games.bc3(11001): Created Shader 1
I/com.steenriver.example.games.bc3(11001): message 6
I/com.steenriver.example.games.bc3(11001): The window has not been suspended
I/SELinux ( 351): Function: selinux_android_load_priority [0], There is no sepolicy file.
I/SELinux ( 351):
I/SELinux ( 351): Function: selinux_android_load_priority [1], There is no sepolicy version file.
I/SELinux ( 351):
I/SELinux ( 351): Function: selinux_android_load_priority , priority version is VE=SEPF_SM-G900X_4.4.2_0016
I/SELinux ( 351):
I/SELinux ( 351):
I/SELinux ( 351): get_selabel_handle: file_contexts is loaded from /file_contexts
I/DEBUG ( 351): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 351): Build fingerprint: 'samsung/kwifixx/kwifi:4.4.2/KOT49H/G900XXXU0ANE5_LLK:user/release-keys'
I/DEBUG ( 351): Revision: '14'
I/DEBUG ( 351): pid: 11001, tid: 11001, name: main >>> com.steenriver.example.games.bc3 <<<
I/DEBUG ( 351): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
E/LightSensor( 934): RED : 2, GREEN : 2, BLUE : 2, CLEAR : 5, CALCULATED LUX : 0.000000, CCT : 4939.000000, REAL LUX : 0.000000 a_time = 238, gain = 64, ir=1, rp1=1, gp1=1, bp1=1, cp1=4, cpl=3202560
D/KeyguardUpdateMonitor( 1218): sendKeyguardVisibilityChanged(true)
D/KeyguardUpdateMonitor( 1218): handleKeyguardVisibilityChanged(1)
I/SurfaceFlinger( 360): id=182 Removed cc3 (8/10)
I/SurfaceFlinger( 360): id=182 Removed cc3 (-2/10)
D/KeyguardUpdateMonitor( 1218): sendKeyguardVisibilityChanged(true)
D/KeyguardUpdateMonitor( 1218): handleKeyguardVisibilityChanged(1)
D/CustomFrequencyManagerService( 934): releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT frequency : 1958400 uid : 1000 pid : 934 tag : ACTIVITY_RESUME_BOOSTER@9
E/LightSensor( 934): RED : 2, GREEN : 2, BLUE : 2, CLEAR : 5, CALCULATED LUX : 0.000000, CCT : 4939.000000, REAL LUX : 0.000000 a_time = 238, gain = 64, ir=1, rp1=1, gp1=1, bp1=1, cp1=4, cpl=3202560
D/KeyguardUpdateMonitor( 1218): sendKeyguardVisibilityChanged(true)
D/KeyguardUpdateMonitor( 1218): handleKeyguardVisibilityChanged(1)
D/PhoneStatusBar( 1218): Status bar WINDOW_STATE_HIDDEN
I/DEBUG ( 351): r0 00000000 r1 00002af9 r2 00000006 r3 00000000
I/DEBUG ( 351): r4 00000006 r5 00000016 r6 00002af9 r7 0000010c
I/DEBUG ( 351): r8 beed0248 r9 a510002d sl fffff744 fp 00000000
I/DEBUG ( 351): ip a5400029 sp beecff58 lr 400a41ad pc 400b3154 cpsr 000f0010
I/DEBUG ( 351): d0 0000000000000000 d1 0000000000000000
I/DEBUG ( 351): d2 0000000000000000 d3 0000000000000000
I/DEBUG ( 351): d4 3ff0000000000000 d5 3fe62e42fefa39ef
I/DEBUG ( 351): d6 3ff306fe0a31b715 d7 3f90000000000000
I/DEBUG ( 351): d8 0000000000000000 d9 0000000000000000
I/DEBUG ( 351): d10 0000000000000000 d11 0000000000000000
I/DEBUG ( 351): d12 0000000000000000 d13 0000000000000000
I/DEBUG ( 351): d14 0000000000000000 d15 0000000000000000
I/DEBUG ( 351): d16 2065766974614e28 d17 0a29646f6874654d
I/DEBUG ( 351): d18 002e006900750067 d19 0070007300690044
I/DEBUG ( 351): d20 004500790061006c d21 0074006e00650076
I/DEBUG ( 351): d22 006e006e006f0043 d23 0069007400630065
I/DEBUG ( 351): d24 3f56c16c16c76a94 d25 3f81a8f2df8150d4
I/DEBUG ( 351): d26 3fa555555555551c d27 3fc67e6ae37693f5
I/DEBUG ( 351): d28 3fe0000000000000 d29 0000000000000001
I/DEBUG ( 351): d30 fff0000000000000 d31 fffffffeffffffd0
I/DEBUG ( 351): scr 88000010
I/DEBUG ( 351):
I/DEBUG ( 351): backtrace:
I/DEBUG ( 351): #00 pc 00022154 /system/lib/libc.so (tgkill+12)
I/DEBUG ( 351): #1 pc 000131a9 /system/lib/libc.so (pthread_kill+48)
I/DEBUG ( 351): #2 pc 000133bd /system/lib/libc.so (raise+10)
I/DEBUG ( 351): #3 pc 000120f3 /system/lib/libc.so
I/DEBUG ( 351): #4 pc 00021a08 /system/lib/libc.so (abort+4)
I/DEBUG ( 351): #5 pc 0004963f /system/lib/libdvm.so (dvmAbort+78)
I/DEBUG ( 351): #6 pc 0004dfa7 /system/lib/libdvm.so (dvmDecodeIndirectRef(Thread_, jobject)+146)
I/DEBUG ( 351): #7 pc 00050d5f /system/lib/libdvm.so
I/DEBUG ( 351): #8 pc 000773e1 /data/app-lib/com.steenriver.example.games.bc3-2/libButtonClickerNativeActivity.so (jui_helper::JUIToast::InitToast()+224)
I/DEBUG ( 351): #9 pc 000774b3 /data/app-lib/com.steenriver.example.games.bc3-2/libButtonClickerNativeActivity.so (jui_helper::JUIToast::JUIToast(char const_)+58)
I/DEBUG ( 351): #10 pc 000705eb /data/app-lib/com.steenriver.example.games.bc3-2/libButtonClickerNativeActivity.so
I/DEBUG ( 351): #11 pc 000fc727 /data/app-lib/com.steenriver.example.games.bc3-2/libButtonClickerNativeActivity.so (Java_com_sample_helper_NDKHelper_RunOnUiThreadHandler+10)
I/DEBUG ( 351): #12 pc 00020e4c /system/lib/libdvm.so (dvmPlatformInvoke+112)
I/DEBUG ( 351): #13 pc 00051aef /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const_, JValue_, Method const_, Thread_)+398)
I/DEBUG ( 351): #14 pc 000534d1 /system/lib/libdvm.so (dvmResolveNativeMethod(unsigned int const_, JValue_, Method const_, Thread_)+184)
I/DEBUG ( 351): #15 pc 0002a2e0 /system/lib/libdvm.so
I/DEBUG ( 351): #16 pc 00031790 /system/lib/libdvm.so (dvmMterpStd(Thread_)+76)
I/DEBUG ( 351): #17 pc 0002ee28 /system/lib/libdvm.so (dvmInterpret(Thread_, Method const_, JValue_)+184)
I/DEBUG ( 351): #18 pc 00064239 /system/lib/libdvm.so (dvmInvokeMethod(Object_, Method const_, ArrayObject_, ArrayObject_, ClassObject_, bool)+392)
I/DEBUG ( 351): #19 pc 0006c50f /system/lib/libdvm.so
I/DEBUG ( 351): #20 pc 0002a2e0 /system/lib/libdvm.so
I/DEBUG ( 351): #21 pc 00031790 /system/lib/libdvm.so (dvmMterpStd(Thread_)+76)
I/DEBUG ( 351): #22 pc 0002ee28 /system/lib/libdvm.so (dvmInterpret(Thread_, Method const_, JValue_)+184)
I/DEBUG ( 351): #23 pc 00063f55 /system/lib/libdvm.so (dvmCallMethodV(Thread_, Method const_, Object_, bool, JValue_, std::va_list)+336)
I/DEBUG ( 351): #24 pc 0004d6d7 /system/lib/libdvm.so
I/DEBUG ( 351): #25 pc 000529af /system/lib/libandroid_runtime.so
I/DEBUG ( 351): #26 pc 00053f43 /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const
, char const
)+354)
I/DEBUG ( 351): #27 pc 0000105b /system/bin/app_process
I/DEBUG ( 351): #28 pc 0000e513 /system/lib/libc.so (__libc_init+50)
I/DEBUG ( 351): #29 pc 00000d7c /system/bin/app_process
I/DEBUG ( 351):
I/DEBUG ( 351): stack:
I/DEBUG ( 351): beecff18 dead4321
I/DEBUG ( 351): beecff1c 00000000
I/DEBUG ( 351): beecff20 a5400029
I/DEBUG ( 351): beecff24 beed0248 [stack]
I/DEBUG ( 351): beecff28 a510002d
I/DEBUG ( 351): beecff2c fffff744
I/DEBUG ( 351): beecff30 00000000
I/DEBUG ( 351): beecff34 400b75d1 /system/lib/libc.so (snprintf+80)
I/DEBUG ( 351): beecff38 33313833
I/DEBUG ( 351): beecff3c 20302036
I/DEBUG ( 351): beecff40 beecffb4 [stack]
I/DEBUG ( 351): beecff44 00000000
I/DEBUG ( 351): beecff48 00000000
I/DEBUG ( 351): beecff4c 30203020
I/DEBUG ( 351): beecff50 00004000
I/DEBUG ( 351): beecff54 beecffc2 [stack]
I/DEBUG ( 351): #00 beecff58 00000006
I/DEBUG ( 351): beecff5c 00000016
I/DEBUG ( 351): beecff60 00002af9
I/DEBUG ( 351): beecff64 a5400029
I/DEBUG ( 351): beecff68 a5400029
I/DEBUG ( 351): beecff6c 400a41ad /system/lib/libc.so (pthread_kill+52)
I/DEBUG ( 351): #1 beecff70 00000006
I/DEBUG ( 351): beecff74 00000000
I/DEBUG ( 351): beecff78 00000000
I/DEBUG ( 351): beecff7c 400a43c1 /system/lib/libc.so (raise+14)
I/DEBUG ( 351): #2 beecff80 beecff8c [stack]
I/DEBUG ( 351): beecff84 400a30f7 /system/lib/libc.so
I/DEBUG ( 351):
I/DEBUG ( 351): memory near r1:
I/DEBUG ( 351): 00002ad8 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002ae8 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002af8 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002b08 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002b18 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002b28 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002b38 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002b48 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002b58 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002b68 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002b78 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002b88 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002b98 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002ba8 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002bb8 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002bc8 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351):
I/DEBUG ( 351): memory near r6:
I/DEBUG ( 351): 00002ad8 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002ae8 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002af8 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002b08 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002b18 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002b28 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002b38 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002b48 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002b58 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002b68 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002b78 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002b88 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002b98 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002ba8 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002bb8 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): 00002bc8 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351):
I/DEBUG ( 351): memory near r8:
I/DEBUG ( 351): beed0228 6d5f1df4 416454d8 beed0294 77f074b7
I/DEBUG ( 351): beed0238 beed0248 fffff744 00000000 77f005ef
I/DEBUG ( 351): beed0248 7804d57c 00000000 00000000 00000000
I/DEBUG ( 351): beed0258 00000000 3f800000 00000000 0645d484
I/DEBUG ( 351): beed0268 7273c490 416454c8 beed0294 77f8c729
I/DEBUG ( 351): beed0278 6d9eb570 41667e50 6d5f1df0 00000001
I/DEBUG ( 351): beed0288 00000000 42918468 428b9a84 41698af3
I/DEBUG ( 351): beed0298 6d5f1df0 77d9a3c2 77f8c71d 416454d8
I/DEBUG ( 351): beed02a8 7912703d 78f3df30 00000000 00000000
I/DEBUG ( 351): beed02b8 78f3def0 400df394 77f8c71d 400a241f
I/DEBUG ( 351): beed02c8 400db000 79127008 00000000 78f3def0
I/DEBUG ( 351): beed02d8 00000000 4009ed35 72771128 4169a717
I/DEBUG ( 351): beed02e8 00000000 00000018 00000018 428ae008
I/DEBUG ( 351): beed02f8 00000018 41667fc0 00000022 41713ea0
I/DEBUG ( 351): beed0308 428b9a84 4298a270 41641b48 41641b48
I/DEBUG ( 351): beed0318 4298a270 416be487 00000002 6fa251a5
I/DEBUG ( 351):
I/DEBUG ( 351): memory near r9:
I/DEBUG ( 351): a510000c ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a510001c ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a510002c ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a510003c ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a510004c ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a510005c ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a510006c ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a510007c ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a510008c ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a510009c ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a51000ac ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a51000bc ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a51000cc ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a51000dc ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a51000ec ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a51000fc ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351):
I/DEBUG ( 351): memory near ip:
I/DEBUG ( 351): a5400008 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a5400018 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a5400028 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a5400038 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a5400048 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a5400058 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a5400068 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a5400078 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a5400088 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a5400098 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a54000a8 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a54000b8 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a54000c8 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a54000d8 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a54000e8 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351): a54000f8 ffffffff ffffffff ffffffff ffffffff
I/DEBUG ( 351):
I/DEBUG ( 351): memory near sp:
I/DEBUG ( 351): beecff38 33313833 20302036 beecffb4 00000000
I/DEBUG ( 351): beecff48 00000000 30203020 00004000 beecffc2
I/DEBUG ( 351): beecff58 00000006 00000016 00002af9 a5400029
I/DEBUG ( 351): beecff68 a5400029 400a41ad 00000006 00000000
I/DEBUG ( 351): beecff78 00000000 400a43c1 beecff8c 400a30f7
I/DEBUG ( 351): beecff88 00000000 ffffffdf 400db2c4 400db22c
I/DEBUG ( 351): beecff98 00000000 400a5cb7 41713ea0 41713ea0
I/DEBUG ( 351): beecffa8 dead4321 400b2a0c 00000000 41690643
I/DEBUG ( 351): beecffb8 beed0040 6c756e28 0000296c 00000000
I/DEBUG ( 351): beecffc8 00000000 00000000 00000000 00000000
I/DEBUG ( 351): beecffd8 00000000 00000000 00000000 00000000
I/DEBUG ( 351): beecffe8 00000000 00000000 00000000 00000000
I/DEBUG ( 351): beecfff8 00000000 00000000 00000000 00000000
I/DEBUG ( 351): beed0008 00000000 00000000 00000000 00000000
I/DEBUG ( 351): beed0018 00000000 00000000 00000000 00000000
I/DEBUG ( 351): beed0028 00000000 00000000 00000000 00000000
I/DEBUG ( 351):
I/DEBUG ( 351): code around pc:
I/DEBUG ( 351): 400b3134 e8bd00f0 e3700a01 912fff1e e2600000
I/DEBUG ( 351): 400b3144 ea006e48 e92d50f0 e3a07f43 ef000000
I/DEBUG ( 351): 400b3154 e8bd50f0 e3700a01 912fff1e e2600000
I/DEBUG ( 351): 400b3164 ea006e40 e92d50f0 e3a070ee ef000000
I/DEBUG ( 351): 400b3174 e8bd50f0 e3700a01 912fff1e e2600000
I/DEBUG ( 351): 400b3184 ea006e38 f200429a bf0080b9 f040f891
I/DEBUG ( 351): 400b3194 4001e92d f2c02a04 2a1080a5 8093f2c0
I/DEBUG ( 351): 400b31a4 f2c02a20 2a408088 ea4fdb7f f1bc1c92
I/DEBUG ( 351): 400b31b4 dd6c0f0a 0600e92d 0f40f1bc f500dd4a
I/DEBUG ( 351): 400b31c4 f5016e80 ebae7920 ea4f0e09 ea4f5e4e
I/DEBUG ( 351): 400b31d4 f50e5e5e ebbc7e20 dd3b1f9e f04fbfc4
I/DEBUG ( 351): 400b31e4 ebd9090a dd35199e 0a0eeb01 0a3ff02a
I/DEBUG ( 351): 400b31f4 1c9eebac bfd245e1 0c09ebac f04f46e1
I/DEBUG ( 351): 400b3204 f8910c00 f891f240 f921f280 f921028d
I/DEBUG ( 351): 400b3214 f8da428d f1b93000 f9000901 f900028d
I/DEBUG ( 351): 400b3224 f10a428d d1ee0a40 0f00f1bc f5bcd02b
I/DEBUG ( 351):
I/DEBUG ( 351): code around lr:
I/DEBUG ( 351): 400a418c 447b4b13 42b3e010 6a1ed10e 44784811
I/DEBUG ( 351): 400a419c ec84f7fb ea0cf00d 46224631 efcef00e
I/DEBUG ( 351): 400a41ac d00a3001 e00b2400 2b00681b 480ad1eb
I/DEBUG ( 351): 400a41bc 44782403 ec72f7fb f001e002 6804fa23
I/DEBUG ( 351): 400a41cc fa20f001 46206005 bf00bd70 0003b226
I/DEBUG ( 351): 400a41dc 0003b21a 0003b212 0003b1ee bf7ef7ff
I/DEBUG ( 351): 400a41ec 4a3e4b3d e92d447b b08b43f0 4606589c
I/DEBUG ( 351): 400a41fc 6823460d 930946a1 fa04f001 8000f8d0
I/DEBUG ( 351): 400a420c d0482d00 f0104628 280ff91b d8444604
I/DEBUG ( 351): 400a421c ffe4f7ff d1064286 4629200f e8d6f00d
I/DEBUG ( 351): 400a422c d03c2800 482ee02e f7fb4478 482debb6
I/DEBUG ( 351): 400a423c e0154478 d11342b0 482b6a06 f7fb4478
I/DEBUG ( 351): 400a424c 4a2aec2e 46332120 a801447a f992f013
I/DEBUG ( 351): 400a425c a8012101 fcb0f01a 46061c42 e011d104
I/DEBUG ( 351): 400a426c 28006800 e02cd1e6 46294630 f00d4622
I/DEBUG ( 351): 400a427c 1c43e912 d11e4607 f9c4f001 29046801

MultiPlayerParticipant always has generic DisplayName()

I only get generic DisplayName() values for participants.
Regardless whether it is 'in circle of friends' or not.

        auto showcallback = [fetchcallback]( gpg::RealTimeMultiplayerManager::WaitingRoomUIResponse const& waitresult )
        {
                view_enabled[ VIEWBUTN ] = true;
                if (gpg::IsSuccess(waitresult.status))
                {
                        std::vector<gpg::MultiplayerParticipant> participants = waitresult.room.Participants();
                        ASSERT( participants.size() >= 2 );
                        const char* creating_participant = waitresult.room.CreatingParticipant().DisplayName().c_str();
                        const char* room_desc = waitresult.room.Valid() ? waitresult.room.Description().c_str() : "-";
                        LOGI( "Succesfully showed room (created by %s): %s", creating_participant, room_desc );
                        int slot=-1;
                        for ( int i=0; i<participants.size(); ++i )
                        {
                                const gpg::MultiplayerParticipant& participant = participants[ i ];
                                LOGI( "Participant %d: %s (%s)", i, participant.DisplayName().c_str(), participant.Id().c_str() );
                                if ( PARTICIPANT_IS_ME( participant ) )
                                        slot = i;
                                //game_services_->Players().Fetch( participant.Id(), fetchcallback );
                        }
                        ASSERT( slot >= 0 );
                        static char msg[ 256 ];
                        snprintf( msg, sizeof(msg), "paired slot=%d pc=1", slot );
                        launchmessage = msg;
                }
                else
                {
                        LOGI( "We cannot play, as we failed to show the waiting room ui." );
                }
        };

Will yield something like Player 1234 for all remote parties, instead of the real display name.

Where should ./gpg-cpp-sdk directory be located?

The How-to run a sample says that the developper must download the Google Play Game Services C++ SDK and unzip it to the ./gpg-cpp-sdk directory.

I'm sorry that I cannot figure out where that folder should go...

Thanks for clarifying this instruction for me.

Occasional crash in GameServices::IsAuthorized()

On one of my devices, I see this behaviour:

  • sign out of game services.
  • back ground the game.
  • fore ground the game again.
  • sign in.

Then my app will crash in:
(gpg::GameServices::IsAuthorized()+9)

From the docs at https://developers.google.com/games/services/cpp/GettingStartedNativeClient:

In most implementations, a given GameServices object will persist as long as your C environment does; you do not need to reinitialize it when your Android Activity pauses and resumes or when your iOS ViewController loads and unloads.

So I initialize only once, similar to the minimalist example code here: https://github.com/playgameservices/cpp-android-basic-samples/blob/master/samples-android/Minimalist/jni/StateManager.cpp

My InitServices() method:

void StateManager::InitServices
(
        gpg::PlatformConfiguration const &pc,
        gpg::GameServices::Builder::OnAuthActionStartedCallback started_callback,
        gpg::GameServices::Builder::OnAuthActionFinishedCallback finished_callback
)
{
        LOGI("Initializing Services");
        LOGI( "thread id is %d, pid is %d", gettid(), getpid() );

        // Players().FetchSelf() response
        auto pcallback = [&]( gpg::PlayerManager::FetchSelfResponse const& response )
        {
                if ( gpg::IsSuccess( response.status ) )
                {
                        self_id_ = response.data.Id();
                        const std::string& url = response.data.AvatarUrl( gpg::ImageResolution::ICON );
                        LOGI( "Our self id = %s", self_id_.c_str() );
                        LOGI( "Our url = %s", url.c_str() );
                        DownloadAvatar( url, 0 );
                }
        };
        // AuthActionStarted callback
        auto scallback = [started_callback]( gpg::AuthOperation op )
        {
                is_auth_in_progress_ = true;
                if ( started_callback != nullptr ) started_callback( op );
        };
        // AuthActionFinished callback
        auto fcallback = [finished_callback, pcallback]( gpg::AuthOperation op, gpg::AuthStatus status )
        {
                LOGI("Sign in finished with a result %s", gpg::DebugString( status ).c_str() );
                is_auth_in_progress_ = false;
                if ( finished_callback != nullptr ) finished_callback( op, status );
                if ( status == gpg::AuthStatus::VALID )
                {
                        ASSERT( game_services_ );
                        game_services_->Players().FetchSelf( pcallback );       // find out what our own Id is.
                        FetchLeaderboards();
                }
        };

        if (!game_services_)
        {
                LOGI("Uninitialized services, so creating");
                game_services_ = gpg::GameServices::Builder()
                        .SetOnAuthActionStarted( scallback )
                        .SetOnAuthActionFinished( fcallback )
                        .SetOnMultiplayerInvitationEvent( invitationcallback )
                        .Create(pc);
        }

Can't link with NDK r12 libc++

Using latest Android NDK r12 one can't build the samples.

APP_STL := c++_static
NDK_TOOLCHAIN_VERSION := clang

There are a bunch of linking errors when using libc++.
For example:
libgpg.a:all.cc:function gpg::StateMachine::~StateMachine(): error: undefined reference to 'std::__1::recursive_mutex::~recursive_mutex()'

Authentication crash since updating to 3.0.1

Hi,
I recently updated our app to use the 3.0.1 libraries. Since then I'm seeing lots of crashes stemming from
gpg::GetThreadDebugName() it looks like it's being spat out from

gpg::OperationQueue4Impl7RunLoopENS_16InternalCallbackIJNS_8LogLevel

Can anyone shed any light on this please?

Many thanks,

Steve.

backtrace:
#00 pc 00000000003acc6c /data/app/com.rubicon.dev.yachty-1/lib/arm/libapp.so (ZNSt6__ndk16__treeINS_12__value_typeINS_11__thread_idENS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEEENS_19__map_value_compareIS2_S9_NS_4lessIS2_EELb1EEENS6_IS9_EEE4findIS2_EENS_15__tree_iteratorIS9_PNS_11__tree_nodeIS9_PvEEiEERKT+11)
#1 pc 00000000003ac9d7 /data/app/com.rubicon.dev.yachty-1/lib/arm/libapp.so (_ZN3gpg18GetThreadDebugNameEv+22)
#2 pc 000000000036f2db /data/app/com.rubicon.dev.yachty-1/lib/arm/libapp.so
#3 pc 000000000036f679 /data/app/com.rubicon.dev.yachty-1/lib/arm/libapp.so
#4 pc 000000000036f63f /data/app/com.rubicon.dev.yachty-1/lib/arm/libapp.so
#5 pc 000000000036f26f /data/app/com.rubicon.dev.yachty-1/lib/arm/libapp.so
#6 pc 000000000036f1d3 /data/app/com.rubicon.dev.yachty-1/lib/arm/libapp.so (_ZN3gpg9GetJNIEnvEv+2)
#7 pc 000000000036e5df /data/app/com.rubicon.dev.yachty-1/lib/arm/libapp.so (_ZNK3gpg13JavaReference11CallBooleanEPKcS2_z+18)
#8 pc 000000000036ec1f /data/app/com.rubicon.dev.yachty-1/lib/arm/libapp.so (_ZNK3gpg13JavaReference11CallBooleanEPKc+6)
#9 pc 00000000003541e5 /data/app/com.rubicon.dev.yachty-1/lib/arm/libapp.so (_ZN3gpg23AndroidGameServicesImpl15ConnectBlockingEv+152)
#10 pc 0000000000396053 /data/app/com.rubicon.dev.yachty-1/lib/arm/libapp.so (_ZN3gpg16GameServicesImpl23ResolveAuthenticationIdEy+286)
#11 pc 0000000000350f85 /data/app/com.rubicon.dev.yachty-1/lib/arm/libapp.so
#12 pc 00000000003980fd /data/app/com.rubicon.dev.yachty-1/lib/arm/libapp.so
#13 pc 000000000039d773 /data/app/com.rubicon.dev.yachty-1/lib/arm/libapp.so
#14 pc 000000000039d303 /data/app/com.rubicon.dev.yachty-1/lib/arm/libapp.so (_ZN3gpg14OperationQueue4Impl7RunLoopENS_16InternalCallbackIJNS_8LogLevelERKNSt6__ndk112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEEE+350)
#15 pc 000000000039d673 /data/app/com.rubicon.dev.yachty-1/lib/arm/libapp.so (ZNSt6__ndk114__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEMN3gpg14OperationQueue4ImplEFvNS7_16InternalCallbackIJNS7_8LogLevelERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEEEEEPS9_SK_EEEEEPvSP+66)
#16 pc 0000000000047f83 /system/lib/libc.so (_ZL15__pthread_startPv+22)
#17 pc 000000000001a151 /system/lib/libc.so (__start_thread+6)

Does this mean google play services will not work with ndk r10 or above?

Android studio which is maintained by Google can integrate the latest version of ndk. Luckily the game engine I was interested in managed to integrate itself to both android studio and ndk, their latest version. Now google play services which is also maintained by Google cannot keep their c++ SDK up to date with android ndk?
Please explain to me what am I missing here! appreciate it.

P.S. Tried to build the sample game in android studio, not only the .mk file in core bundle fires errors, but the .mk files in the sample game itself were pointing to non-existing directories namely "gpg-cpp-sdk". I however copied the necessary files into the game folder and it worked. But still the makefile inside the ndk bundle error was persistent (it has to have something to do with the ndk r10 or earlier thing..)

Building Button Clicker Native with sh build.sh wont install

I think it's pretty silly that this sample is configured by default to run with APP_ABI := arm64-v8a and that this isn't documented anywhere.

Most other samples are not done this way. x86 devices can emulate armeabi just fine. It should target armeabi and there is no reason otherwise.

Play Game Services does not provide an x86_64 library

The Google Play Games Services only provide libraries for arm64-v8a, armeabi-v7a and x86. I.e it does not provide x86_64. This means that my application cannot support x86 at all as 64bit support is required in the future. Please provide an x86_64 library.

gpgs login error (crash)

Hi ,I'm a game developer in korea.
I have the following issues.

  1. It works without trouble for about one week after launch.
  2. A week after the end of the week (June 15), some users reported that the game was running without any problems, the game suddenly crashed and could not run again.
  3. Android Vital has recorded the following logs.

java.lang.IllegalStateException:
at com.google.android.gms.common.internal.zze.zzw (Unknown Source: 60)
at com.google.android.gms.common.internal.zzi.zzamc (Unknown Source: 51)
at com.google.android.gms.common.internal.zzh.handleMessage (Unknown Source: 270)
at android.os.Handler.dispatchMessage (Handler.java:105)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6938)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.Zygote $ MethodAndArgsCaller.run (Zygote.java:327)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)

4)On June 15th, two people were reported to have had this issue on Android vital. And, over the weekend, the number increased to about 20 people.
4) On June 18, one of the developer's devices encountered this issue. And it happened in the device of the designer....
6) Debugging the app to the Android studio from the device where the issue occurred, and checking that it is crashing after GPGS login processing.
7) We replaced the GooglePlayGameService sample file (Java / C ++ version) provided by Google with the APPID and PackageID of the issueed app, then build and run it on the device where the issue occurred.(Overwrite)
8) Exception 8 is logged in the logcat, or the app crashes.
9) We changed the sample's APPID and PackageID to APPID and PackageID of other apps that do not have issues. In this case, the app worked well.
10) Sometimes, after uninstalling and reinstalling the app, it works fine.
11) From June 19, the number of issues in the Android Vital has suddenly decreased.
12) The issue does not occur for two weeks.
13) The issue occurred again on Saturday (about 7th) last week.
14) The problem occurred in the previous version without problems.
15) Issue records have continuously increased in Android vital. After all, I updated the version that removed GPGS.
16) Yesterday (Monday) After 7 pm, GPG login is not available in all versions.
(No code modification).

I want to know the cause and solution of this issue.

I need help urgently.
(The game has been launched.)

arm64-v8a build fails: no .eh_frame_hdr table will be created

Using gpg-cpp-sdk v2.3, I was able to create an armeabi-v7a build.
Yet, when linking for arm64-v8a, it fails on no .eh_frame_hdr table will be created

Which compiler was used to create libgpg.a for 64bit arm?

  [176/176] Linking CXX shared library /home/bram/apps/Buggy/AndroidStudio/app/build/intermediates/cmake/debug/obj/arm64-v8a/libbuggy.so
  FAILED: : && /home/bram/android-sdk-linux/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++  --target=aarch64-none-linux-android --gcc-toolchain=/home/bram/android-sdk-linux/ndk-bundle/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64 --sysroot=/home/bram/android-sdk-linux/ndk-bundle/sysroot -fPIC -isystem /home/bram/android-sdk-linux/ndk-bundle/sysroot/usr/include/aarch64-linux-android -D__ANDROID_API__=21 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security  -std=c++11 -DANDROID=1 -DPLAY=1 -DUSEES2=1 -DLOGTAG=swaag -O0 -fno-limit-debug-info  -Wl,--exclude-libs,libgcc.a --sysroot /home/bram/android-sdk-linux/ndk-bundle/platforms/android-21/arch-arm64 -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libbuggy.so -o /home/bram/apps/Buggy/AndroidStudio/app/build/intermediates/cmake/debug/obj/arm64-v8a/libbuggy.so CMakeFiles/buggy.dir/main.cpp.o CMakeFiles/buggy.dir/android_native_app_glue.c.o CMakeFiles/buggy.dir/StateManager.cpp.o CMakeFiles/buggy.dir/http_lib.c.o CMakeFiles/buggy.dir/leaderboardmanager.cpp.o  /home/bram/src/gpg-cpp-sdk/android/lib/gnustl/arm64-v8a/libgpg.a /home/bram/apps/Buggy/AndroidStudio/app/.externalNativeBuild/cmake/PI/outputs/libpi.a /home/bram/apps/GBase/src/output/libgbase.a /home/bram/src/opende/output/libopende.a /home/bram/src/GPGOAP/libgpgoap.a /home/bram/src/ip2ensign/libip2ensign.a -lEGL -lGLESv2 -lOpenSLES -landroid -llog -lz -lm -lm "/home/bram/android-sdk-linux/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/libgnustl_static.a" && :
  /home/bram/android-sdk-linux/ndk-bundle/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: error in /home/bram/src/gpg-cpp-sdk/android/lib/gnustl/arm64-v8a/libgpg.a(.eh_frame); no .eh_frame_hdr table will be created.
  clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Play Games C++ SDK Version 3.0.1. TurnBasedMatch: Callbacks do not trigger

Dependencies:
NDK: android-ndk-r18b (win 64x)

GPG libraries: gpg-cpp-sdk.v3.0.1\gpg-cpp-sdk\android\lib\c++$(TARGET_ARCH_ABI)

Gradle dependencies:
implementation 'com.google.android.gms:play-services-ads:16.0.0'
implementation 'com.android.billingclient:billing:1.1'

implementation 'com.google.android.gms:play-services-games:16.0.0'
implementation 'com.google.android.gms:play-services-nearby:16.0.0'
implementation 'com.android.support:support-v4:27.0.2' 

Issue: I set my callbacks by calling SetOnMultiplayerInvitationEvent and SetOnTurnBasedMatchEvent. After starting a match OnMultiplayerInvitationEventCallback and OnTurnBasedMatchEventCallback do not trigger. As only possible way to check match's current state is call ShowMatchInboxUI() and check MatchInboxUIResponse - but it is not an option.

This issue at least at armeabi-v7a and x86 abis. I did not try arm64-v8a.

Error from mediasession.cc after accepted MP invite.

Occasionally after inviting a friend, a MP match starts and immediately aborts.
In the logs I get a libjingle error from mediasession.cc:529 about cricket?

I/RoomServiceStateMachine(20236): Attempting to reconnect to: p_CJHH0rGIsLz-EhAC
I/libjingle(20236): worker_thread:0x7980fc18 initialized=1
I/libjingle(20236): Channel disabled
I/libjingle(20236): Changing data state, recv=0 send=0
I/libjingle(20236): Destroyed channel
I/libjingle(20236): Attempting to create a session, with data only.
I/libjingle(20236): CompleteInitiateCall_w:[email protected]/games_andr240E7819
I/libjingle(20236): void gtalk::LibjingleClient::OnCallCreate(cricket::Call*): Connecting to OnAddSession
E/libjingle(20236): Error(mediasession.cc:529): cricket::SessionDescription* cricket::MediaSessionDescriptionFactory::CreateOffer(const cricket::MediaSessionOptions&, const cricket::SessionDescription*): Creating Data offer.

This is with gpg v 2.0 on ARM 32bit between two Samsung S5 devices.

WaitingRoomUIResponse with too few participants.

I have observed that occasionally, my WaitingRoomUIResponse comes back as Succes, yet when checking the room participants, there is only 1 participant.
Whereas I specified the minimum number of participants to be 2.

I show the room as follows (numplayers is 2):

            StateManager::game_services_->RealTimeMultiplayer().ShowWaitingRoomUI
            (
                    StateManager::room_,
                    numplayers,
                    showcallback
            );

Most of the times it works, but yet, sometimes I see just one participant.

I also have a 2vs2 version of my online matches, where I supply a minimum of players of 4.

Is it to be expected to have the show waiting room callback return success, yet not have enough players?

Incorrect advice in android_support.h file from SDK.

In the gpg-cpp-sdk v 3.0.1 there is a file android/include/gpg/android_support.h

This file mentions:

* <h1>Example code for an Android 4.0+ game using a Java Activity</h1>
 * In your Java Activity, please add the following. You may need to merge this
 * code with your existing lifecycle functions.
 * \code
 * public class YourActivity extends Activity {
 *   protected void onActivityResult(int requestCode,
 *                                   int resultCode,
 *                                   Intent data) {
 *     super.onActivityResult(requestCode, resultCode, data);
 *     nativeOnActivityResult(this, requestCode, resultCode, data);
 *   }
 *
 *   // Implemented in C++.
 *   private static native void nativeOnActivityResult(
 *       Activity activity,
 *       int requestCode,
 *       int resultCode,
 *       Intent data);
 * }
 * \endcode
 * Then, in your native library, add the following forwarding functions.
 * \code
 * void Java_com_example_yourapp_YourActivity_nativeOnActivityResult(
 *     JNIEnv* env,
 *     jobject thiz,
 *     jobject activity,
 *     jint request_code,
 *     jint result_code,
 *     jobject data) {
 *   gpg::AndroidSupport::OnActivityResult(
 *       env, activity, request_code, result_code, data);
 * }
 * \endcode

These code snippets are incorrect.

The Java part of the code defines a static function, without a 'thiz' pointer.

The C part of the code defines a non static function, with a 'thiz' pointer.

These do not rhyme.

Causing android studio to warn:

image

Please address, @hak

gpg playgame downloading in gradle is not efficient

every time when I do clean from android studio, I gpg_cpp_sdk.zip is removed from my disk; when I build again, it get downloaded again:
-rw-r--r-- 1 gfan eng 50072904 Apr 18 15:25 gpg_cpp_sdk.zip
so every time I click a "rebuild", I am re-downloading this 50MB file for nothing.

need add if (file_not_existing) do this download thing logical into gradle.

google-play-services_lib rev29 causes resource not found.

After upgrading my google-play-services_lib to the latest (rev29), I now get this error when building:

[aapt] /home/bram/apps/Buggy/Android/google-play-services_lib/res/values-v21/appinvite_styles.xml:5:
error: Error retrieving parent for item: No resource found that matches the given name 
 '@android:style/Theme.Material.Light.DialogWhenLarge.NoActionBar'.

I tried setting AndroidManifest.xml's android:targetSdkVersion to 21, to no avail.

I tried setting project.properties target=android-21, to no avail.

Moving to older version of google-play-services_lib fixes this issue.

Achievements in iOS not properly showing XP

Hi,

Using sdk 1.3 or 1.4, if I open the achievements UI (the default one), I'm not seeing the XP associated with the achievements (I have a "0 XP" string instead).
The same code on android works fine and I see the correct XP value.

Got the same "bug" from the toasts on iOS (if it helps).
Thanks

Class not found exception on Samsung Ace/Zte/Tabs

Game works fine on most Android devices but it crashes on the ones listed above.

I get this exception:
E/GamesNativeSDK(7238): Exception in dalvik/system/DexClassLoader.loadClass: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.games.NativeSdkEntryPoints" on path: /data/data/com.bennettracingsimulations.dirttrackin/app_.gpg.classloader/4da25210572e7e07ea67142ded62c42e.jar.

W/PopupManager(7238): 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.
I/GamesNativeSDK(7238): Auth operation started: SIGN IN
I/GamesNativeSDK(7238): Connecting to Google Play...

Could it be that the Unity plugin uses deprecated APIs?
Thanks.

Minimalist example uses deprecated functionality.

When building StateManager.cpp of the minimalistic exampe, I get:

[armeabi-v7a] Compile++ thumb: biplane <= StateManager.cpp
/home/bram/apps/Proto/Biplane/Android/jni/StateManager.cpp: In static member function 'static void StateManager::ShowAchievements()':
/home/bram/apps/Proto/Biplane/Android/jni/StateManager.cpp:99:46: warning: 'void gpg::AchievementManager::ShowAllUI()' is deprecated (declared at /home/bram/src/gpg-cpp-sdk/android/include/gpg/achievement_manager.h:297) [-Wdeprecated-declarations]
/home/bram/apps/Proto/Biplane/Android/jni/StateManager.cpp: In static member function 'static void StateManager::ShowLeaderboard(char const*)':
/home/bram/apps/Proto/Biplane/Android/jni/StateManager.cpp:106:57: warning: 'void gpg::LeaderboardManager::ShowUI(const string&)' is deprecated (declared at /home/bram/src/gpg-cpp-sdk/android/include/gpg/leaderboard_manager.h:685) [-Wdeprecated-declarations]
/home/bram/apps/Proto/Biplane/Android/jni/StateManager.cpp: In static member function 'static void StateManager::InitServices(const PlatformConfiguration&, gpg::GameServices::Builder::OnAuthActionStartedCallback, gpg::GameServices::Builder::OnAuthActionFinishedCallback)':
/home/bram/apps/Proto/Biplane/Android/jni/StateManager.cpp:120:64: warning: 'gpg::GameServices::Builder& gpg::GameServices::Builder::SetLogging(gpg::GameServices::Builder::OnLogCallback, gpg::LogLevel)' is deprecated (declared at /home/bram/src/gpg-cpp-sdk/android/include/gpg/builder.h:57) [-Wdeprecated-declarations]

This example needs to be rewritten to conform to the current API.

Crash In participant.Id().compare

Hey there,
This code is crashing with a segfault. This is in a RealTimeRoomListener, which is trying to send an unreliable message to a single player using a playerId

void NCRTMatchGoogleImpl::sendUnreliableMessageToPlayer(std::string playerId, ncrtgpgdata data)
{
  if (m_room.Valid()) {
    const std::vector<gpg::MultiplayerParticipant> participants = m_room.Participants();
    for (gpg::MultiplayerParticipant participant : participants) {
      if (participant.Valid()) {
        if (participant.Id().compare(playerId) == 0) {
        ......
Program received signal SIGSEGV, Segmentation fault.
0x7501e518 in NCRTMatchGoogleImpl::sendUnreliableMessageToPlayer(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >) (this=0x822fd5e8, playerId=..., data=...) at /Volumes/jkncvault/repos/triton/Source/Realtime/NCRT/Google/NCRTMatchGoogleImpl.mm:213
213         if (participant.Id().compare(playerId) == 0) {

Seems like the participant is invalid, even though participant.Valid() returns true.

We are also setting m_room = room on all of the RealTimeRoom listener callbacks that supply a room (including OnDataReceived). I believe setting m_room = room must be destroying this. I noticed that in ButtonClickerExample they only save the room variable in OnRoomStatusChanged, but I am saving it in OnP2PConnected/Disconnected, ParticipantStatusChanged etc.

Duplicate md5_block_data_order symbol

Hi,

I can't link with the new version of the sdk (cpp v1.4) on android, I'm having duplicate symbols during link phase:
ld: error: libcurl.a(md5_dgst.o): multiple definition of 'md5_block_data_order'
gpg-cpp-sdk/android/lib/gnustl/armeabi/libgpg.a: previous definition here

With sdk 1.3, it was linking just fine on both iOS and Android
With sdk 1.4, it links fine on iOS, but I've that error on Android

I'm using a prebuilt version of libcurl on my project. I tried to remove the md5_dgst.o file from my libcurl file without success.

Any advice?

Deprecated examples: TurnBasedMultiplayerEvent deprecated.

Is there a cpp multi player example that does not use deprecated API calls?

When building cpp version of ButtonClicker, I get:

bram@ubuntu64:~/src/cpp-android-basic-samples/samples-android/ButtonClicker$ ndk-build
[armeabi-v7a] Compile++ thumb: ButtonClickerNativeActivity <= ButtonClickerNativeActivity.cpp
In file included from jni/ButtonClickerNativeActivity.cpp:28:
In file included from jni/ButtonClickerNativeActivity.h:28:
In file included from /home/bram/android-ndk-r10e-64/sources/cxx-stl/llvm-libc++/libcxx/include/sstream:174:
In file included from /home/bram/android-ndk-r10e-64/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:131:
In file included from /home/bram/android-ndk-r10e-64/sources/cxx-stl/llvm-libc++/libcxx/include/ios:216:
In file included from /home/bram/android-ndk-r10e-64/sources/cxx-stl/llvm-libc++/libcxx/include/__locale:21:
In file included from /home/bram/android-ndk-r10e-64/sources/cxx-stl/llvm-libc++/../../android/support/include/locale.h:39:
/home/bram/android-ndk-r10e-64/platforms/android-9/arch-arm/usr/include/locale.h:55:1: warning: >empty struct has size 0 in C,
size 1 in C++ [-Wextern-c-compat]
struct lconv { };
^
jni/ButtonClickerNativeActivity.cpp:71:48: warning: 'TurnBasedMultiplayerEvent' is deprecated >[-Wdeprecated-declarations]
gpg::TurnBasedMultiplayerEvent::UPDATED_FROM_APP_LAUNCH) {
^
/home/bram/src/gpg-cpp-sdk/android/include/gpg/types.h:247:26: note: >'TurnBasedMultiplayerEvent' has been explicitly marked
deprecated here
typedef MultiplayerEvent TurnBasedMultiplayerEvent GPG_DEPRECATED;
^
2 warnings generated.

Reliable Messages Arriving Out of Order

We are seeing messages arriving out of order when using the SendReliableMessage API.

Device A (Server) is sending messages with the following identifiers: 21, 22, 16, 17, 17.

Device B (Client) is receiving messages with the following identifiers: 21, 16, 17, 22, 17.

These are the logs from device A:

Server:
Sends messages with order: 21, 22, 16, 17, 17
=====
D/ssg3    (20503): 2016-04-19 04:27:03.800 ssg3[20503:2874] [NCRTMatchGoogle] sendDataToAllPlayers reliable:(YES) msgType: 21 msglength 13
I/libjingle(28263): IbbDataTask::ProcessStart() called:
I/libjingle(28263): Got Xmpp DATA: <ibb:data ibb:seq="0" ibb:sid="1" xmlns:ibb="http://jabber.org/protocol/ibb">ARUIABABGAElAAAAAA==</ibb:data>
I/libjingle(28263): IbbDataTask::ProcessStart() called:
D/ssg3    (20503): 2016-04-19 04:27:03.975 ssg3[20503:2874] [NCRTMatchGoogle] OnDataReceived reliable:(YES) msgType: 21
D/ssg3    (20503): 2016-04-19 04:27:03.977 ssg3[20503:2874] [NCRTMatchGoogle] sendDataToAllPlayers reliable:(YES) msgType: 22 msglength 2
D/ssg3    (20503): 2016-04-19 04:27:03.977 ssg3[20503:2874] [NCRTMatchGoogle] sendDataToAllPlayers reliable:(YES) msgType: 16 msglength 2
D/ssg3    (20503): 2016-04-19 04:27:03.978 ssg3[20503:2874] [NCRTMatchGoogle] sendDataToAllPlayers reliable:(YES) msgType: 17 msglength 42
D/ssg3    (20503): 2016-04-19 04:27:04.012 ssg3[20503:2874] [NCRTMatchGoogle] sendDataToAllPlayers reliable:(YES) msgType: 17 msglength 122
I/libjingle(28263): IbbDataTask::ProcessStart() called:
I/libjingle(28263): Got Xmpp data back: <ibb:data ibb:seq="0" ibb:sid="1" xmlns:ibb="http://jabber.org/protocol/ibb"/>
I/libjingle(28263): static void gtalk::LibjingleJniHelper::DispatchIbbSendResult(jobject, const string&, const string&, bool): Dispatch ID:1
I/libjingle(28263): IbbDataTask::ProcessStart() called:
I/libjingle(28263): IbbDataTask::ProcessStart() called:
I/libjingle(28263): Got Xmpp data back: <ibb:data ibb:seq="0" ibb:sid="3" xmlns:ibb="http://jabber.org/protocol/ibb"/>
I/libjingle(28263): static void gtalk::LibjingleJniHelper::DispatchIbbSendResult(jobject, const string&, const string&, bool): Dispatch ID:3
I/libjingle(28263): IbbDataTask::ProcessStart() called:
I/libjingle(28263): IbbDataTask::ProcessStart() called:
I/libjingle(28263): Got Xmpp data back: <ibb:data ibb:seq="0" ibb:sid="5" xmlns:ibb="http://jabber.org/protocol/ibb"/>
I/libjingle(28263): static void gtalk::LibjingleJniHelper::DispatchIbbSendResult(jobject, const string&, const string&, bool): Dispatch ID:5
I/libjingle(28263): IbbDataTask::ProcessStart() called:
I/libjingle(28263): Got Xmpp data back: <ibb:data ibb:seq="0" ibb:sid="4" xmlns:ibb="http://jabber.org/protocol/ibb"/>
I/libjingle(28263): static void gtalk::LibjingleJniHelper::DispatchIbbSendResult(jobject, const string&, const string&, bool): Dispatch ID:4
I/libjingle(28263): IbbDataTask::ProcessStart() called:
I/libjingle(28263): Got Xmpp data back: <ibb:data ibb:seq="0" ibb:sid="2" xmlns:ibb="http://jabber.org/protocol/ibb"/>
I/libjingle(28263): static void gtalk::LibjingleJniHelper::DispatchIbbSendResult(jobject, const string&, const string&, bool): Dispatch ID:2
I/libjingle(28263): IbbDataTask::ProcessStart() called:

These are the logs from Device B

Client:
Receives messages with order: 21, 16, 17, 22, 17
=====
I/libjingle(10546): IbbDataTask::ProcessStart() called:
I/libjingle(10546): Got Xmpp DATA: <ibb:data ibb:seq="0" ibb:sid="1" xmlns:ibb="http://jabber.org/protocol/ibb">ARUIABABGAElAAAAAA==</ibb:data>
I/libjingle(10546): IbbDataTask::ProcessStart() called:
D/ssg3    (24194): 2016-04-18 15:27:05.379 ssg3[24194:292d] [NCRTMatchGoogle] OnDataReceived reliable:(YES) msgType: 21
W/GamesServiceBroker( 1584): Client connected with SDK 8487000, Services 8703238, and Games 37200038
W/GamesServiceBroker( 1584): Client connected with SDK 8487000, Services 8703238, and Games 37200038    
I/libjingle(10546): IbbDataTask::ProcessStart() called:
I/libjingle(10546): Got Xmpp data back: <ibb:data ibb:seq="0" ibb:sid="1" xmlns:ibb="http://jabber.org/protocol/ibb"/>
I/libjingle(10546): static void gtalk::LibjingleJniHelper::DispatchIbbSendResult(jobject, const string&, const string&, bool): Dispatch ID:1
I/libjingle(10546): Got Xmpp DATA: <ibb:data ibb:seq="0" ibb:sid="3" xmlns:ibb="http://jabber.org/protocol/ibb">ARA=</ibb:data>
I/libjingle(10546): IbbDataTask::ProcessStart() called:
I/libjingle(10546): IbbDataTask::ProcessStart() called:
I/libjingle(10546): Got Xmpp DATA: <ibb:data ibb:seq="0" ibb:sid="5" xmlns:ibb="http://jabber.org/protocol/ibb">AREKJEQwMTQ5N0VFLUFDNEQtNEFCQS1BRTZFLTgwQTc5MUY4OEZCMhAAGiQ4MEQwRjc1MS05NkM2LTQyNUYtODUwNS05QTg4REUyNTE1MjIgASokOEI1MEExOEYtRDVERC00MDVCLTk0M0QtQ0FGRkUzMjFFQzBGMAU=</ibb:data>
I/libjingle(10546): IbbDataTask::ProcessStart() called:
D/ssg3    (24194): 2016-04-18 15:27:05.581 ssg3[24194:292d] [NCRTMatchGoogle] OnDataReceived reliable:(YES) msgType: 16
I/libjingle(10546): Got Xmpp DATA: <ibb:data ibb:seq="0" ibb:sid="2" xmlns:ibb="http://jabber.org/protocol/ibb">ARY=</ibb:data>
I/libjingle(10546): IbbDataTask::ProcessStart() called:
D/ssg3    (24194): 2016-04-18 15:27:05.583 ssg3[24194:292d] [NCRTMatchGoogle] OnDataReceived reliable:(YES) msgType: 17
D/ssg3    (24194): 2016-04-18 15:27:05.583 ssg3[24194:292d] [NCRTMatchGoogle] OnDataReceived reliable:(YES) msgType: 22
D/ssg3    (24194): 2016-04-18 15:27:05.591 ssg3[24194:292d] SSGEventHandler received MSG_SERVER_CLIENT_GOTO_PREGAME
I/libjingle(10546): IbbDataTask::ProcessStart() called:
I/libjingle(10546): Got Xmpp DATA: <ibb:data ibb:seq="0" ibb:sid="4" xmlns:ibb="http://jabber.org/protocol/ibb">AREKJDkwNjNCM0E4LUNBMjAtNEI5MC04RDk4LUQ5QzlGMDJENUNBMBAA</ibb:data>
I/libjingle(10546): IbbDataTask::ProcessStart() called:
D/ssg3    (24194): 2016-04-18 15:27:05.595 ssg3[24194:292d] [NCRTMatchGoogle] OnDataReceived reliable:(YES) msgType: 17
D/ssg3    (24194): 2016-04-18 15:27:05.810 ssg3[24194:292d] SSGEventHandler received MSG_SERVER_CLIENT_PUSH_WORLDNAME
D/ssg3    (24194): 2016-04-18 15:27:05.811 ssg3[24194:292d] SSGEventHandler received MSG_BROADCAST_CLAIM_HOST
D/ssg3    (24194): 2016-04-18 15:27:05.812 ssg3[24194:292d] Broadcast msg claiming host in wrong state. state: 0

Another user has reported this problem: http://stackoverflow.com/questions/27199974/sendreliable-message-sometimes-not-received-by-opposite-peer

Iit seems like the SendReliable pathway does not meet the in-order gaurentee outlined here: https://developers.google.com/games/services/common/concepts/realtimeMultiplayer#sending_game_data

Any information or confirmation on this bug is greatly appreciated.

EDIT:

I've modified the ButtonClicker sample on a fork of this project to demonstrate that the reliable messaging system delivers messages out of order:

https://github.com/jknight-nc/cpp-android-basic-samples/tree/outoforder

The commit is located here: jknight-nc@b3c62c8

.Create causes SIGABRT crash

I've been trying out the SDK, but have ended up stuck with a hard to debug crash.
I would have filed this on the SDK repo but there isn't one, so this is the next best option since I'm using the code here as direct reference :)

The following line causes the crash, but only after it returns:
service = builder.Create(conf);

If I don't call create (but configure everything before it) it continues without issue.

Possibly relevant information:

  • I am running a Nexus 5x, Android 6.0.1 (latest updates)
  • Building on NDK r10e, SDK is up to date, compileSdkVersion 23
  • Building with gradle/android studio
    • using compile 'com.google.android.gms:play-services:8.4.0'
    • I don't have any apply lines related to the play services
  • I am using SDL 2.0.4 stable as the basis of the app
  • The app ID is set up and configured on the developer console
  • checkJNI is enabled
  • I use JNI_OnLoad initialization

The code below is a bit verbose because I have been trying to debug this a while.

static std::unique_ptr< ::gpg::GameServices> service;

void init() {

    if(service == nullptr) {

        LOGI("INIT JVM:%p", jvm);

        JNIEnv* env;

        int state = jvm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6);
        if (state == JNI_EDETACHED) {
            LOGI("INIT: GetEnv: not attached, attaching ... ");
            if (jvm->AttachCurrentThread(&env, NULL) != 0) {
                LOGI("INIT: GetEnv: FAILED TO ATTACH");
            } else {
                LOGI("INIT: GetEnv: ATTACHED OK");
            }
        } else if (state == JNI_OK) {
            LOGI("INIT: GetEnv: JNI_OK");
        } else if (state == JNI_EVERSION) {
            LOGI("INIT: GetEnv: JNI_EVERSION: version not supported");
        }

        LOGI("INIT ENV:%p", env);

        jclass localclass = env->FindClass("org/snowkit/snowbasic/AppActivity");                          LOGI("local class %p",localclass);
        jclass globalclass = reinterpret_cast<jclass>(env->NewGlobalRef(localclass));                     LOGI("global class %p",globalclass);

        jmethodID mid = env->GetStaticMethodID(globalclass, "getActivity","()Landroid/app/Activity;");    LOGI("mid %p",mid);
        jobject localactivity = env->CallStaticObjectMethod(globalclass, mid);                            LOGI("local activity %p",localactivity);
        jobject globalactivity = reinterpret_cast<jobject>(env->NewGlobalRef(localactivity));             LOGI("global activity %p",globalactivity);

        ::gpg::AndroidPlatformConfiguration conf;
        conf.SetActivity(globalactivity);

        ::gpg::GameServices::Builder builder;

            builder.SetDefaultOnLog(::gpg::LogLevel::VERBOSE);

            builder.SetOnAuthActionStarted([&](::gpg::AuthOperation op) {
                LOGI("OnAuthActionStarted");
            });

            builder.SetOnAuthActionFinished([&](::gpg::AuthOperation op, ::gpg::AuthStatus status) {
                LOGI("AuthActionFinished, status: %d", status);
            });

        service = builder.Create(conf);

        LOGI("INIT: DONE");

    } //service != null

} //init

I have explicitly added the getActivity function to check that it was sane.
The selfActivity instance is set inside of onCreate.

    public static Activity getActivity() {
        Log.i("APP",">>>>>>>>/ Get Activity / " + selfActivity);
        return selfActivity;
    }

And finally, here is the logcat output at the time of the crash.
In case it's not clear:
GPG = the native code above
app = C++ code of the app, from a touch event (happens no matter where I call from)
APP = java code of the app

I app     : touch released, GPG not inited, calling init()
I GPG     : INIT JVM:0xf4ebc000
I GPG     : INIT: GetEnv: JNI_OK
I GPG     : INIT ENV:0xeb311e40
I GPG     : local class 0x200005
I GPG     : global class 0x706
I GPG     : mid 0xf08730c8
I APP     : >>>>>>>>/ Get Activity / org.snowkit.snowbasic.AppActivity@640263b
I GPG     : local activity 0x200009
I GPG     : global activity 0x70a
V GamesNativeSDK: Using classes from /data/user/0/org.snowkit.snowbasic/app_.gpg.classloader/7756dc0d15d18341bd94e20177d1a3f8.jar.
W PopupManager: You have not specified a View to use as content view for popups. Falling back to the Activity content view. Note that this may not work as expected in multi-screen environments
I GPG     : INIT: DONE
I app     : touch released, done
F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 29282 (SDLThread)
F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
F DEBUG   : Build fingerprint: 'google/bullhead/bullhead:6.0.1/MMB29K/2419427:user/release-keys'
F DEBUG   : Revision: 'rev_1.0'
F DEBUG   : ABI: 'arm'
F DEBUG   : pid: 29111, tid: 29282, name: SDLThread  >>> org.snowkit.snowbasic <<<
F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
W debuggerd: type=1400 audit(0.0:3326): avc: denied { search } for name="org.snowkit.snowbasic" dev="dm-2" ino=1545295 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
F DEBUG   :     r0 00000000  r1 00007262  r2 00000006  r3 dcdef978
F DEBUG   :     r4 dcdef980  r5 dcdef930  r6 00000000  r7 0000010c
F DEBUG   :     r8 eefbf980  r9 eefbe680  sl dccf1000  fp e044d520
F DEBUG   :     ip 00000006  sp dcdef888  lr f6e24f85  pc f6e27374  cpsr 400e0010
F DEBUG   : 
F DEBUG   : backtrace:
F DEBUG   :     #00 pc 00042374  /system/lib/libc.so (tgkill+12)
F DEBUG   :     #01 pc 0003ff81  /system/lib/libc.so (pthread_kill+32)
F DEBUG   :     #02 pc 0001c73f  /system/lib/libc.so (raise+10)
F DEBUG   :     #03 pc 000198f1  /system/lib/libc.so (__libc_android_abort+34)
F DEBUG   :     #04 pc 000174b0  /system/lib/libc.so (abort+4)
F DEBUG   :     #05 pc 00679304  /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__gnu_cxx::__verbose_terminate_handler()+344)
F DEBUG   :     #06 pc 00631300  /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__cxxabiv1::__terminate(void (*)())+4)
F DEBUG   :     #07 pc 00631340  /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (std::terminate()+16)
F DEBUG   :     #08 pc 00631700  /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__cxa_pure_virtual+24)
F DEBUG   :     #09 pc 0066c53c  /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (execute_native_thread_routine+28)
F DEBUG   :     #10 pc 0003f883  /system/lib/libc.so (__pthread_start(void*)+30)
F DEBUG   :     #11 pc 00019f75  /system/lib/libc.so (__start_thread+6)
F DEBUG   : 
F DEBUG   : Tombstone written to: /data/tombstones/tombstone_01
E DEBUG   : AM write failed: Broken pipe
I WindowState: WIN DEATH: Window{8961fdf u0 org.snowkit.snowbasic/org.snowkit.snowbasic.AppActivity}
W WindowManager: Force-removing child win Window{13cdf65 u0 SurfaceView} from container Window{8961fdf u0 org.snowkit.snowbasic/org.snowkit.snowbasic.AppActivity}
I Zygote  : Process 29111 exited due to signal (6)

Debugging via Android studio with NDK debugging yields minimal help,
Because it's an abort, I can't get lldb or gdb (via android studio or otherwise) to break properly once it triggers. All other stepping through prior is fine until it does, but the code reaches the end of it's execution before crashing (note the code prints done from inside the app on return of the init call).

Due to the nature of the abort it also makes it difficult to search for help, and all the common thread related issues are (or should be) accounted for above.

I have noticed this verbose log in other peoples issues on this repo: V/GamesNativeSDK(12369): Attached to JVM on thread 1927939016 but I never see this in my logcat, the only line from the sdk is the above one about the jar file.

Any help is appreciated!

CRASH: com.google.android.gms.games.NativeSdkCallbacks

I have a working and published game that I recently migrated from Ant to AndroidStudio.
After conversion, the game crashes on launch:


06-17 19:48:18.187 30372-30417/com.steenriver.buggy E/GamesNativeSDK: Exception in dalvik/system/DexClassLoader.loadClass: java.lang.IncompatibleClassChangeError: Class com.google.android.gms.games.NativeSdkCallbacks implements non-interface class com.google.android.gms.nearby.connection.Connections$ConnectionRequestListener (declaration of 'com.google.android.gms.games.NativeSdkCallbacks' appears in /data/user/0/com.steenriver.buggy/app_.gpg.classloader/d75c8e1bbeab9e1ddffb9d332585db71.jar).
06-17 19:48:18.207 30372-30417/com.steenriver.buggy A/art: art/runtime/java_vm_ext.cc:410] JNI DETECTED ERROR IN APPLICATION: RegisterNatives received NULL jclass
06-17 19:48:18.207 30372-30417/com.steenriver.buggy A/art: art/runtime/java_vm_ext.cc:410]     in call to RegisterNatives

My device is running latest Google Play Games 3.9.08

In my Gradle file, I have these dependencies:

    compile 'com.android.support:support-v4:26.0.+'

    compile 'com.android.support:appcompat-v7:26.0.+'

    compile 'com.google.android.gms:play-services:11.0.1'

This is from a previously working code base, that didn't use Gradle, but used google-play-services_lib from sep 2015.

Invitation handler hit before authentication finishes

This is an API issue, not with the actual samples themselves but I've heard that other people are submitting GPG bugs to the AOSP database and getting them rejected for being in the wrong location.

This issue pertains to the C++ SDK (v1.4) on Android using NDK 10d.

If I accept an invitation notification from outside of the application and I accept it, the following events occur in order:

  1. Application is Launched
  2. OnAuthActionStarted callback runs
  3. OnMultiplayerInvitationEvent runs
  4. OnAuthActionFinished callback runs

Events 3 and 4 are out of order. Until our app sees its GPG authentication, it's in no way prepared to handle the chain of events that are going to occur when the invitation is handled.

Old play games services are used by cpp example code.

The cpp examples use old version of the java and cpp libraries.

In cpp-android-basic-samples/samples-android/Common/gpg-sdk/build.gradle this file is downloaded:

https://developers.google.com/games/services/downloads/gpg-cpp-sdk.v2.1.zip

Whereas gpg-cpp-sdk.v2.3.zip is now available.

Similarly, the examples are built against com.google.android.gms:play-services-games:10.0.0 whereas version 11.0.0 is now available.

GamesNativeSDK Not authorizing: no client

There is a new release of Google Play Services (8.3) or rev28 as the android installer calls it.

I dropped in the google-play-services_lib as a replacement in my project, and now, the login no longer works.

I/GamesNativeSDK( 322): Connecting to Google Play...
E/GamesNativeSDK( 322): Not authorizing: no client.

Is the cpp SDK v 2.0 compatible with the latest Google Play Services (8.3)?
It does not seem to be the case!

bram

No 64 bit binaries

Google Play Games CPP SDK does not come with 64 bit binaries for ARM.

It only comes for Android x86, Android arm, Android ARMv7.
(And for some iOS targets.)

But there is no 64 bit arm version available.

Calling Leaderboards().ShowAllUIBlocking() causes lifecycle issue with player profile.

Hi there,

Our app has implemented many of the game services function using the native API and it all works correctly and is on the store.

However we have an issue when the player checks out a leaderboard players profile:

  1. Head to leaderboards (we call GoogleGameServices->Leaderboards().ShowAllUIBlocking() )
  2. Pick a leaderboard
  3. Highlight a player on the leaderboard.
  4. Tap on that player (get profile)
  • App gets onPause and onStop calls.
  1. Back out of player profile
  2. Back out of player highlight,
  3. back out of leaderboards to the app
  • App does NOT get onRestart, onStart, onResume calls as this is a blocking call. Therefore the
    game sits there in an onStop state.

Is this expected behaviour? Using the non-blocking call fixes this, surely this renders the
blocking call unusable?

Steve.

data leak in com.google.android.gms.common.data.DataHolder

A data leak is reported for com.google.android.gms.common.data.DataHolder

W/GamesServiceBroker( 1907): Client connected with SDK 8115000, Services 10084030, and Games 39080030
I/ActivityManager(  953): Killing 7873:com.sec.android.app.mss/u0a26 (adj 15): empty #43
W/GamesServiceBroker( 1907): Client connected with SDK 8487000, Services 10084030, and Games 39080030
W/GamesServiceBroker( 1907): Client connected with SDK 8487000, Services 10084030, and Games 39080030
E/DataBuffer( 1907): Internal data leak within a DataBuffer object detected!  Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder@42b732c8)
V/GamesNativeSDK( 8346): Play Games callback indicates connection.
I/GamesNativeSDK( 8346): Successfully connected to Google Play.

REGISTER_WAITING_ROOM_LISTENER_RESTRICTED

We trigger a load from the cloud when the app is reforegrounded. We get a foreground event on return from Google Play's Invite Player to Realtime activity. So when we return from Googles Matchmaker UI, we trigger a load from Google Play Games Snapshot API. This Cloud Load is breaking the Realtime matchmaking with the following error message:

11-16 16:54:35.175 20353 15760 E RSCStateMachine: REGISTER_WAITING_ROOM_LISTENER_RESTRICTED: when not in room
11-16 16:54:35.178 21851 21851 E WaitingRoom: Room ChAKCAjX5PbJThACEAEYAyABEOCqlPPQ6sG_uQE invalid. Finishing activity.

The waiting room UI fails suddenly and silently, delivering no useful information to the client app through the SDK's error callbacks. The Matchmaker returns through the success callback with the room in AUTOMATCHING state or INVITING state. No one ever joins the room, and the client times out.

If we dont cloud load at that time. Everything works. The bug seems to be internal to the Google SDK. At the very least the waiting room UI callback should contain an ERROR for this. Currently it reports a "success".

'releasing leaked death recipient' caused by gms.

Please audit the gms code.
I see this on the console log when a room gets connected:

W/JavaBinder( 2154): BinderProxy is being destroyed but the application did not call unlinkToDeath to unlink all of its death recipients beforehand.  Releasing leaked death recipient: com.google.android.gms.games.service.statemachine.roomclient.WaitServiceSetupState$1

It's an issue caused by com.google.android.gms

Bad Call

When I fetch leaderboard entries, I get this error for each fetch:

Bad call: specified package com.google.android.play.games under uid 10197 but it is really 10142

What's the significance of this error?
The leaderboard fetch does work though.

cpp sdk v2.0
latest play games app on device.

Changelog / release notes missing.

When I integrated leader boards / achievements, the gpg-cpp-sdk was at version 1.3
Currently it is at 1.4.1

But there is no changelog, and there are no release notes.

I would like to know what has changed from release to release, especially changes in the API, or usage.

gpg::DebugString() for room status sometimes returns garbled string.

When I print out the room status with gpg::DebugString() I sometimes get a garbled string.
For instance, this showed up in my device log:

I/swaag   ( 4856): The Connected Set Changed for room id ChoKCQj1jOXnmhsQAhABGAEg____________ARDDhoHYheWp5WY, status ACTIVE. Currently connected: 2
I/swaag   ( 4856): The Connected Set Changed for room id ChoKCQj1jOXnmhsQAhABGAEg____________ARDDhoHYheWp5WY, status ACTI�. Currently connected: 2
I/WaitingRoom( 7294): CALLBACK: onRoomConnected()...

Note that the fact of the connected-set change getting called twice is strange in the first place.
The first occurrence shows a valid 'ACTIVE' value, but the second shows garbled characters.

I print the room status with this code:

void StateManager::OnConnectedSetChanged( gpg::RealTimeRoom const& room )
{
        room_ = room;
        if ( !room.Valid() )
        {
                LOGE( "OnConnectedSetChanged for invalid room with Id %s", room.Id().c_str() );
                return;
        }
        std::vector<gpg::MultiplayerParticipant> participants = room.Participants();
        int numConnected = 0;
        for ( int i=0; i<participants.size(); ++i )
        {
                const gpg::MultiplayerParticipant& participant = participants[ i ];
                if ( participant.IsConnectedToRoom() )
                        numConnected += 1;
        }
        const char* rs = gpg::DebugString( room.Status() ).c_str();
        LOGI( "The Connected Set Changed for room id %s, status %s. Currently connected: %d", room.Id().c_str(), rs, numConnected );
        ...

gpg c++ sdk v2.1

play game app 3.9.08

device runs Android 4.4.4 (Galaxy Note4)

ButtonClicker: Class not found when unmarshalling

When I build and run the c++ ButtonClicker example, and create a room, I get this in the device log.
(Note: the room creation does seem to succeed, and I can see the room, and launch the match.)

device: Samsung Galaxy Note 4.
model nr: SM-N910F
android: 4.4.4
device log:

I/libjingle( 6512): virtual int games_rtmp::BuzzSubscriptionsTask::SetOnDisconnectTask::ProcessStart(): Send-on-disconnect: <cli:message to="[email protected]" type="headline" xmlns:cli="jabber:client">Q2hvS0NRanotNGptaVJrUUFoQUJHQUFnX19fX19fX19fX19fQVJEQ3h1R25zY0c1ekNZOmdhbWVzQG9iLnRhbGsuZ29vZ2xlLmNvbS9nYW1lc19hbmRyOTVDNUFFOTk=/cli:message
I/com.steenriver.example.games.bc3(25980): created a room 1
E/Parcel ( 935): Class not found when unmarshalling: com.google.android.gms.games.multiplayer.realtime.RoomEntity
E/Parcel ( 935): java.lang.ClassNotFoundException: com.google.android.gms.games.multiplayer.realtime.RoomEntity
E/Parcel ( 935): at java.lang.Class.classForName(Native Method)
E/Parcel ( 935): at java.lang.Class.forName(Class.java:251)
E/Parcel ( 935): at java.lang.Class.forName(Class.java:216)
E/Parcel ( 935): at android.os.Parcel.readParcelableCreator(Parcel.java:2133)
E/Parcel ( 935): at android.os.Parcel.readParcelable(Parcel.java:2097)
E/Parcel ( 935): at android.os.Parcel.readValue(Parcel.java:2013)
E/Parcel ( 935): at android.os.Parcel.readArrayMapInternal(Parcel.java:2314)
E/Parcel ( 935): at android.os.Bundle.unparcel(Bundle.java:249)
E/Parcel ( 935): at android.os.Bundle.getString(Bundle.java:1118)
E/Parcel ( 935): at android.content.Intent.getStringExtra(Intent.java:5285)
E/Parcel ( 935): at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:1586)
E/Parcel ( 935): at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:1167)
E/Parcel ( 935): at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:4507)
E/Parcel ( 935): at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:4389)
E/Parcel ( 935): at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:161)
E/Parcel ( 935): at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3013)
E/Parcel ( 935): at android.os.Binder.execTransact(Binder.java:404)
E/Parcel ( 935): at dalvik.system.NativeStart.run(Native Method)
E/Parcel ( 935): Caused by: java.lang.NoClassDefFoundError: com/google/android/gms/games/multiplayer/realtime/RoomEntity
E/Parcel ( 935): ... 18 more
E/Parcel ( 935): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.games.multiplayer.realtime.RoomEntity" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
E/Parcel ( 935): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
E/Parcel ( 935): at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
E/Parcel ( 935): at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
E/Parcel ( 935): ... 18 more
V/ApplicationPolicy( 935): isApplicationStateBlocked userId 0 pkgname com.google.android.play.games

Detected incorrect implementation

Hello

I use GPG C++ in my game.
The android dev console give me this warning for my game:

Detected incorrect implementation
Your game has incorrectly implemented the following Play Games services: Achievements.

But all achievements works fine in the game...
Is it because google automatic check only try to find java API achievements called, or something like that? Or is there really an "issue" in my code and somebody knows what I can do?

thanks

Crash in ARM64 app linked with gnustl/arm64-v8a/libgpg.a

We recently updated to Google Play Game native C++ SDK 2.1 from 1.1 and it now has libraries for ARM64 so I enabled the gnustl one lib/gnustl/arm64-v8a/libgpg.a. I have tested NDK r11c and r12b.

Just linking this library is causing a crash during the initialization during dlopen. I was able to trace it to gpg::proto::AchevementImpl::SharedCtor()() with GDB. Here is the GDB callstack:

[0x0000007F88B0453C] libUE4.so!gpg::proto::AchievementImpl::SharedCtor()()  C++
[0x0000007F88B045F4] libUE4.so!gpg::proto::protobuf_AddDesc_achievement_5fimpl_2eproto()()  C++
[0x0000007FA432ECF8] linker64!__dl__ZN6soinfo13call_functionEPKcPFvvE() C++
[0x0000007FA432EE4C] linker64!__dl__ZN6soinfo10call_arrayEPKcPPFvvEmb() C++
[0x0000007FA43350D8] linker64!__dl__Z9do_dlopenPKciPK17android_dlextinfo()  C++
[0x0000007FA432E440] linker64!__dl_dlopen() C++
[0x0000007FA005AC34] libart.so!art::JavaVMExt::LoadNativeLibrary(_JNIEnv*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, _jobject*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*)()   C++
[0x0000007FA00FA3A8] libart.so!art::Runtime_nativeLoad(_JNIEnv*, _jclass*, _jstring*, _jobject*, _jstring*)()   C++

Here is the disassembly:

0x0000007F88B0453C ldr x1, [x1,#20928]
0x0000007F88B04540 str x1, [x0,#8]
0x0000007F88B04544 str x1, [x0,#16]
0x0000007F88B04548 str x1, [x0,#24]
0x0000007F88B0454C str w2, [x0,#32]
0x0000007F88B04550 str w2, [x0,#36]
0x0000007F88B04554 str wzr, [x0,#40]
0x0000007F88B04558 str wzr, [x0,#44]
0x0000007F88B0455C str xzr, [x0,#48]
0x0000007F88B04560 str x1, [x0,#56]
0x0000007F88B04564 str x1, [x0,#64]
0x0000007F88B04568 str xzr, [x0,#72]
0x0000007F88B0456C str wzr, [x0,#84]
0x0000007F88B04570 ret

And the registers:

x0 = 0x0000007f99cfd440 x1 = 0x0000007f8f7b9000 x2 = 0x0000000000000001 x3 = 0x0000000000000010 x4 = 0x0000000000000000 x5 = 0x0000000000004001 x6 = 0x0000000000000000 x7 = 0xcdcdcdcdcdcdcdcd x8 = 0x0000007f99cfd498 x9 = 0x0000000000000916 x10 = 0x0000007f9ed40318 x11 = 0x0000000000004000 x12 = 0x0000000000004001 x13 = 0x0000000000000000 x14 = 0x0000000000000001 x15 = 0x00000000002a6570 x16 = 0x0000007f8a588d48 x17 = 0x0000007fa3e979c0 x18 = 0x000000000000002b x19 = 0x0000007f99cfd440 x20 = 0x0000007f85b24ce8 x21 = 0x0000007fa4351458 x22 = 0x0000007fa436e000 x23 = 0x0000007fa4351458 x24 = 0x0000007fa4351440 x25 = 0x0000007fa4351250 x26 = 0x00000000000001c1 x27 = 0x0000007fa436ea20 x28 = 0x0000007fa43514f0 x29 = 0x0000007ff998d580 x30 = 0x0000007f88b045f4 sp = 0x0000007ff998d570
pc = 0x0000007f88b0453c cpsr = 0x80000000

Anyone else seeing this, or have any suggestions?

OnRoomStatusChanged not called for all states.

This is an API issue, not with the actual samples themselves but I've heard that other people are submitting GPG bugs to the AOSP database and getting them rejected for being in the wrong location.

This issue pertains to the C++ SDK (v1.4) on Android using NDK 10d. I've emailed Hak Matsuda about this and he has a logcat but I thought it would be good to have all issues I've found written down somewhere.

The docs state that OnRoomStatusChanged will report "ACTIVE" when all players are connected to the room. I have never seen any state ever appear in OnRoomStatusChanged except for "CONNECTING". Instead, I'm forced to rely on a successful callback from the ShowWaitingRoomUI in order to know that everyone's connected.

gpg::RealTimeRoom::Description() returns "(null)"

I don't see a meaningful description when calling gpg::RealTimeRoom::Description()
despite the fact that gpg::RealTimeRoom::Valid() returns true.

Instead, I just get a string containing the characters '(null)'.

I call the Description() method after I have a match ready in the room ui, getting the room from WaitingRoomUIResponse.

Latest android SDK, API 23, with gpg 1.4.1.

No way of detecting when a RTM player disconnects.

I'm using v 2.1 of the cpp gpg SDK.

My app runs perfectly, sending and receiving data between player A and B.

If B switches his WIFI off, there is no callback to let A know that he has left the game.

OnP2PDisconnected() isn't triggered.
OnRoomStatusChanged() isn't triggered.
OnParticipantStatusChanged isn't triggered.

Surely this isn't correct? I don't really want to have to add keep-alive ping packets to my game when it seems like there is facility already available using these callbacks.

Why don't they work?

BTW:I tried updating to v3.0 of the SDK, this causes masses of linker errors.

Regards,

Steve.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.