B4A Library [New] Google Play Games Services

Hi everyone,

This is a complete wrapper of the latest Google Play Games Services (v17.2.1). I made this for @Jack Cole and he allowed me to post it on the forum to help other users.

Though the functionalities are almost the same but the implementation is a little different than the old wrapper made by @Informatix . There are many methods that have been removed from the new version of GPGS libraries. For more details check this reference.

Important: The main difference is you cannot store the list of the achievements, events, leaderboards, scores, players and snapshots retrieved from their respective clients. When you want the list you have to call the load method to populate the buffer and after using the data you must have to release the buffer else you will get errors while accessing different classes. For example, if you fetch the achievement list and forgot to release the buffer and after that if you fetch the leaderboard list you will get an error.

The wrapper contains almost all (99%) the functionalities and methods that the new GPGS SDK has. Though not all the functionalities are tested. If you encounter any issue please post the complete log.

As the wapper has a huge number of functionalities it's not possible to publish the entire library reference here. I have attached an HTML file in the zip file for reference.

Classes:
  • GPGSAbstractDataBuffer
  • GPGSAchievement
  • GPGSAchievementsClient
  • GPGSEvent
  • GPGSEventsClient
  • GPGSGame
  • GPGSGames
  • GPGSGamesClient
  • GPGSGamesMetadataClient
  • GPGSLeaderboard
  • GPGSLeaderboardScore
  • GPGSLeaderboardVariant
  • GPGSLeaderboardsClient
  • GPGSNearbyConnections
  • GPGSNetworkInfo
  • GPGSPlayGamesService
  • GPGSPlayer
  • GPGSPlayerLevel
  • GPGSPlayerLevelInfo
  • GPGSPlayerStats
  • GPGSPlayerStatsClient
  • GPGSPlayersClient
  • GPGSScoreSubmissionData
  • GPGSScoreSubmissionDataResult
  • GPGSSnapshot
  • GPGSSnapshotContents
  • GPGSSnapshotMetadata
  • GPGSSnapshotMetadataChange
  • GPGSSnapshotsClient
  • GPGSUserAccount
  • GPGSVideoCapabilities
  • GPGSVideoCaptureState
  • GPGSVideosClient

Installation:
  1. Download latest IDE and Android SDK (Skip if already using the latest ones)
  2. Copy the attached jar and xml file to the additional libs folder.
  3. Open B4A SDK Manager and wait for the list to load.
  4. Deselect all.
  5. Only install these following libraries (installing other libraries may cause compilation error, do it at your own risk),
    1. firebase-abt
    2. play-services-games
    3. play-services-location
    4. play-services-tasks
  6. Now close the SDK Manager
  7. If you are going to integrate this to an existing project then remember to clean the project.
    IDE > Tools > Clean project.

Setup GPGS: Check this documentation to set up and configure the GPGS.

Manifest Code:
B4X:
'GAMES SERVICES
AddApplicationText(
<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="@string/app_id" />
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
<activity android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity" android:windowSoftInputMode="stateHidden|adjustPan"/>
)
'The xml file content generated from play console
CreateResource(values, game-ids.xml,  <?xml version="1.0" encoding="utf-8"?>
<resources>
  <string name="app_id" translatable="false">******</string>
  ....
</resources>
)
Usage:
Sign-in:
Sub Class_Globals
    Public GPlayGamesService As GPGSPlayGamesService 'This is the main entry point
    Public GGames As GPGSGames 'will be auto initialized on successful signin

    Public gc As GPGSGamesClient
    Public lbc As GPGSLeaderboardsClient
    Public pc As GPGSPlayersClient
    Public ac As GPGSAchievementsClient
End Sub

Private Sub B4XPage_Created (Root1 As B4XView)
    ...
    GPlayGamesService.Initialize("GPGS") 'this eventname prefix will be used for all the classes for this library.
    GPlayGamesService.SilentSignIn("",False)
End Sub

Sub GPGS_Connected
    Log($"GPGS_Connected"$)
    'After login get all the clients required from GPGSGames
    gc = GGames.GetGamesClient
    lbc = GGames.GetLeaderboardsClient
    pc = GGames.GetPlayersClient
    ac = GGames.GetAchievementsClient
End Sub

Sub GPGS_OnGPGSActivityResult(RequestCode As String, ResultCode As Int, ResultIntent As Intent) 
    If ResultCode = GPlayGamesService.RESULT_RECONNECT_REQUIRED Then
        'signed out from popup activity
        'internally it will clear the user login session so you dont have to call SignOut again.
        'you can signin again or do any other activity related to signout event
    End If
End Sub

Sub GPGS_SignInFailed(code As Int, status As String)
    Log($"GPGS_SignInFailed(code=${code}, status=${status})"$)
End Sub

Example of fetching achievement list and releasing the buffer after usage:
Private Sub Button_UnlockAchievement_Click
    ac.Load(False)
    Wait For GPGS_AchievementsLoaded(count As Int, statusCode As Int)
    'check if the process was successful or not
    If statusCode  = GPlayGamesService.RESULT_SUCCESS Then
        'the buffer will be accessible from ac.GetAchievementsBuffer
        Dim achd As GPGSAchievement = ac.GetAchievementFromBuffer(0)
        If achd.GetState = achd.STATE_HIDDEN Then
            ac.RevealImmediate(achd.GetAchievementId)
            ac.UnlockImmediate(achd.GetAchievementId)
        End If
        If achd.GetState = achd.TYPE_INCREMENTAL And achd.GetCurrentSteps<achd.GetTotalSteps Then
            ac.SetStepsImmediate(achd.GetAchievementId, achd.GetCurrentSteps+1)
        End If

        'Important: if you are done with the buffer then release it
        ac.GetAchievementsBuffer.Release '<- Important
    Else
        Log(GPlayGamesService.GetStatusCodeString(statusCode))
    End If
End Sub


Update 1.01: Fixed an issue related to the sign-out event triggered from popup activities (Achievements/Leaderboard) You can check the resultCode received from OnGPGSActivityResult event. If the resultCode = RESULT_RECONNECT_REQUIRED, then it means the user clicked on the sign-out button from the popup activities. Check the example code.

Update 1.02: Added StatusCode to almost all the events to check whether the task was successful or not. Check the attached HTML file for event signature changes.

Update 1.03:
  1. Added IsSignedIn method to check if the user is signed in or not.
  2. Added GetLastSignedInAccount method that will return a GPGSUserAccount object or null if not signed in.
Update 1.04:
  1. Fixed IsSignedIn and GetLastSignedInAccount method where those were returning null when using SnapshotAPI.
  2. Fixed crashing issue while creating a snapshot with existing snapshot name. Update your project's SnapshotConflictOccurred event signature. It has been changed.
Update 1.05: Fixed unused permission issue when using GPGSGamesClient.
 

Attachments

  • GooglePlayGameService_v1.05.zip
    219.2 KB · Views: 370
Last edited:

Biswajit

Active Member
Licensed User
Longtime User
It turns out to create a GPGSAchievement object. You need to load all the achievements and iterate over them until GetAchievementId is equal to the desired value.
Yes as I said that the implementation is different than the old library. You can search on google or you can go through this link for more information.

Previously, to unlock an achievement, I did not check its status. I just did this:
B4X:
ac.UnlockImmediate(AchievementId)
How did you get the AchievementId previously?

As a workaround, you can create a map and store the achievement ids and other details after successful login. And use them whenever you need those.

Does this need to be called separately?
Yes
 

Biswajit

Active Member
Licensed User
Longtime User
Does this need to be called separately?
I think you have to use GameClient.SetViewForPopups and GameClient.SetGravityForPopups for showing those pop-ups
 
Last edited:

coldteam

Active Member
Licensed User
Longtime User
I think you have to use GameClient.SetViewForPopups and GameClient.SetGravityForPopups for showing those pop-ups

Yes I already tried it. This works great.
B4X:
gc.SetViewForPopups(Activity)
gravity by default top center. I see no reason to change. This is a classic place in most applications.

With regard to AchievementId, I have always loaded codes into the application. I made an analogue of the map as you wrote above.
I wrote about the numbering so that anyone who reads about the library will immediately see it.
I think the most convenient way to activate is by code. And check the status only when necessary.
 

coldteam

Active Member
Licensed User
Longtime User
What have I noticed!
I do sign in:
B4X:
GPlayGamesService.SilentSignIn("",False)
Open the achievements window and click Sign Out.

After that I restart the application and surprisingly "SilentSignIn" returns "GPGS_Connected".
But achievement clients and others are not available.

After several restarts, the situation changes to
B4X:
GPGS_SignInFailed(code=4, status=SIGN_IN_REQUIRED)
 

Biswajit

Active Member
Licensed User
Longtime User
What have I noticed!
I do sign in:
B4X:
GPlayGamesService.SilentSignIn("",False)
Open the achievements window and click Sign Out.

After that I restart the application and surprisingly "SilentSignIn" returns "GPGS_Connected".
But achievement clients and others are not available.

After several restarts, the situation changes to
B4X:
GPGS_SignInFailed(code=4, status=SIGN_IN_REQUIRED)
It seems that you have closed the google's session by click on the sign-out button from the google's activity (achievements window). But the user data is still available for the app. I'm posting an update in a moment that will raise sign-in failed event if the user data is available but the google's session is ended.
 

Biswajit

Active Member
Licensed User
Longtime User
What have I noticed!
I do sign in:
B4X:
GPlayGamesService.SilentSignIn("",False)
Open the achievements window and click Sign Out.

After that I restart the application and surprisingly "SilentSignIn" returns "GPGS_Connected".
But achievement clients and others are not available.

After several restarts, the situation changes to
B4X:
GPGS_SignInFailed(code=4, status=SIGN_IN_REQUIRED)
Fixed. Download the updated wrapper.
B4X:
Sub GPGS_OnGPGSActivityResult(RequestCode As String, ResultCode As Int, ResultIntent As Intent)       
    If ResultCode = GPlayGamesService.RESULT_RECONNECT_REQUIRED Then
        'signed out from popup activity
        'internally it will clear the user login session so you dont have to call SignOut again.
        'you can signin again or do any other activity related to signout event
    End If
End Sub
 

coldteam

Active Member
Licensed User
Longtime User
Here's another thing I noticed.

I have an empty Leaderboard.
I opened it without any problems in the emulator and on the phone with different google accounts.

Then I decided to add the first data there:
B4X:
Dim longValue As Long = 100
lbc.SubmitScoreImmediate("LeaderboardId",longValue)

i was expecting completion of data entry here:
B4X:
Sub GPGS_ScoreSubmitted(submissionData As GPGSScoreSubmissionData)
    'here
End Sub

But the event didn't return.
Then I tried to open the table again, but it no longer opens. Eternal loading.
B4X:
lbc.GetLeaderboardIntent("LeaderboardId")

gpgs.jpg


p.s
the same thing happened on 2 devices.
 

Biswajit

Active Member
Licensed User
Longtime User
Check the unfiltered log.
 

coldteam

Active Member
Licensed User
Longtime User
Check the unfiltered log.

Maybe this? Appears after:
B4X:
lbc.GetLeaderboardIntent("CgkI3vbZhasdEAIQOg")
.....

....
GGames.StartActivityForResult(intent,1)

B4X:
onGetService() from Client SDK version [210304000], Module version [210265032], PGA version [242130082], Account [Account {name=<<default account>>, type=com.google}], Calling package [com.google.android.play.games], Game package [com.google.android.play.games] [CONTEXT service_id=1 ]
Load failed for ImageManagerUri{uri=} with size [72x72]
class bfs: Failed to load resource
There was 1 root cause:
java.io.IOException(Failed to load data for )
call GlideException#logRootCauses(String) for more detail
  Cause (1 of 1): class bfs: Fetching data failed, class android.graphics.drawable.Drawable, LOCAL
There was 1 root cause:
java.io.IOException(Failed to load data for )
call GlideException#logRootCauses(String) for more detail
    Cause (1 of 1): class java.io.IOException: Failed to load data for
onStartInput() : Dummy InputConnection bound
Dropping event due to no window focus: KeyEvent { action=ACTION_MULTIPLE, keyCode=KEYCODE_UNKNOWN, scanCode=0, characters="§", metaState=0, flags=0x0, repeatCount=0, eventTime=171384401, downTime=171384401, deviceId=-1, source=0x101 }
Displayed com.google.android.play.games/com.google.android.gms.games.ui.clientv2.leaderboards.LeaderboardActivity: +161ms
onBind: Intent { act=com.google.android.gms.signin.service.INTERNAL_START dat=internal_signin://57624762-7a1b-40e5-aebd-18de67b4fe95 pkg=com.google.android.gms (has extras) }
onGetService() from Client SDK version [210304000], Module version [210265032], PGA version [242130082], Account [Account {name=<<default account>>, type=com.google}], Calling package [com.google.android.gms], Game package [com.google.android.gms] [CONTEXT service_id=1 ]
Loading bound service for intent: Intent { act=com.google.android.gms.signin.service.INTERNAL_START dat=internal_signin://57624762-7a1b-40e5-aebd-18de67b4fe95 pkg=com.google.android.gms (has extras) }
 

Biswajit

Active Member
Licensed User
Longtime User
lbc.SubmitScoreImmediate("LeaderboardId",longValue)
No. After this. As you wrote the success event wasn't raised after calling this.
 

coldteam

Active Member
Licensed User
Longtime User
No. After this. As you wrote the success event wasn't raised after calling this.
Yes, it doesn't get to GPGS_ScoreSubmitted.
I don't even know what will tell the reason in this log.

This is the log immediately after the call: lbc.SubmitScore("id",longValue)

IOmx service obtained
makeComponentInstance(OMX.google.mp3.decoder) in omx@1.0-service process
getConfig(0xe7ea6c60:google.mp3.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
Unable to resync. Signalling end of stream.
WakeLock acquired by sendMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@de1698d)
WakeLock released by handleMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@de1698d)
IOmx service obtained
makeComponentInstance(OMX.google.mp3.decoder) in omx@1.0-service process
getConfig(0xe7ea6c60:google.mp3.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
Unable to resync. Signalling end of stream.
IOmx service obtained
makeComponentInstance(OMX.google.mp3.decoder) in omx@1.0-service process
getConfig(0xe7ea6c60:google.mp3.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
IOmx service obtained
makeComponentInstance(OMX.google.mp3.decoder) in omx@1.0-service process
getConfig(0xe7ea6d20:google.mp3.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
Unable to resync. Signalling end of stream.
IOmx service obtained
makeComponentInstance(OMX.google.mp3.decoder) in omx@1.0-service process
getConfig(0xe7ea6d20:google.mp3.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
Unable to resync. Signalling end of stream.
[2] afrl.onStartJob(3): SCH: onJobSchedulerWakeup with jobId 9002
[2] afmi.handleMessage(4): SCH: DeviceState: DeviceState{currentTime=1615483653338, isCharging=false, isIdle=false, netAny=true, netNotRoaming=true, netUnmetered=true, batteryPercent=100.0}
[213] afos.b(5): SCH: Jobs in database: 1-1337 3-226 3-227 3-228 3-229 3-230 10-78 12-1 20-23232323 24-77777777 26-1414141414 34-43 34-44 34-45
[2] afmj.m(9): SCH: Running job: 12-1
[2] ContentSyncJob.s(1): [ContentSync] job started
IOmx service obtained
makeComponentInstance(OMX.google.mp3.decoder) in omx@1.0-service process
[2] afmi.handleMessage(29): SCH: RunningQueue size: 1, PendingQueue size: 0
[2] afmi.handleMessage(32): SCH: Running queue: 12-1
getConfig(0xe7ea6d20:google.mp3.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
IOmx service obtained
makeComponentInstance(OMX.google.mp3.decoder) in omx@1.0-service process
getConfig(0xe7ea6d20:google.mp3.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
[222] hig.b(1): Completed 0 account content syncs with 0 successful.
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
[2] ContentSyncJob.a(1): [ContentSync] Installation state replication succeeded.
[2] afnj.n(4): SCH: jobFinished: 12-1. TimeElapsed: 125ms.
[2] afmj.b(3): SCH: Job 12-1 finished. Not rescheduling.
[2] afmi.handleMessage(29): SCH: RunningQueue size: 0, PendingQueue size: 0
[2] afmi.handleMessage(10): SCH: Executor finished
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
[2] afos.b(5): SCH: Jobs in database: 1-1337 3-226 3-227 3-228 3-229 3-230 10-78 20-23232323 24-77777777 26-1414141414 34-43 34-44 34-45
Task com.google.android.gms/com.google.android.gms.netrec.module.NetRecGcmTaskService started execution. cause:4 exec_start_elapsed_seconds: 1026 [CONTEXT service_id=218 ]
[2] afmw.g(37): SCH: ConstraintMapping: 24-77777777, -> L: 0ms, D: 74169762ms, C: false, I: true, N: 0
[2] afmw.g(37): SCH: ConstraintMapping: 1-1337, 34-45, -> L: 34374558ms, D: 77574558ms, C: false, I: false, N: 1
[2] afmw.g(37): SCH: ConstraintMapping: 10-78, -> L: 0ms, D: 77762747ms, C: false, I: true, N: 1
[2] afmw.g(37): SCH: ConstraintMapping: 3-228, 3-230, 20-23232323, -> L: 0ms, D: 74168711ms, C: true, I: false, N: 2
[2] afmw.g(37): SCH: ConstraintMapping: 3-226, 3-229, 34-43, 34-44, -> L: 0ms, D: 85420040ms, C: false, I: true, N: 2
[2] afmw.g(37): SCH: ConstraintMapping: 3-227, 34-43, 34-44, -> L: 0ms, D: 85420050ms, C: true, I: true, N: 2
[2] afmw.g(37): SCH: ConstraintMapping: 26-1414141414, -> L: 13035138ms, D: 13935138ms, C: false, I: false, N: 0
[2] afmw.i(7): SCH: Cancelling existing jobscheduler jobs: 9006 9003 9004 9005 9001 9007
[2] afmw.d(4): SCH: Throttling wakeup for job 9000 (expected to run in 0 ms) due to recent wakeup
[2] afmw.h(11): SCH: Scheduling job Id: 9000, L: 30000, D: 74169762, C: false, I: true, N: 0
[2] afmw.h(11): SCH: Scheduling job Id: 9008, L: 34374558, D: 77574558, C: false, I: false, N: 1
[64] anru.a: Refreshing scores for 1 networks.
[2] afmw.d(4): SCH: Throttling wakeup for job 9009 (expected to run in 0 ms) due to recent wakeup
[2] afmw.h(11): SCH: Scheduling job Id: 9009, L: 30000, D: 77762747, C: false, I: true, N: 1
[2] afmw.d(4): SCH: Throttling wakeup for job 9010 (expected to run in 0 ms) due to recent wakeup
[2] afmw.h(11): SCH: Scheduling job Id: 9010, L: 30000, D: 74168711, C: true, I: false, N: 2
[2] afmw.d(4): SCH: Throttling wakeup for job 9011 (expected to run in 0 ms) due to recent wakeup
[2] afmw.h(11): SCH: Scheduling job Id: 9011, L: 30000, D: 85420040, C: false, I: true, N: 2
onBind: Intent { act=com.google.android.gms.phenotype.service.START cmp=com.google.android.gms/.chimera.PersistentApiService }
Loading bound service for intent: Intent { act=com.google.android.gms.phenotype.service.START cmp=com.google.android.gms/.chimera.PersistentApiService }
[2] afmw.d(4): SCH: Throttling wakeup for job 9012 (expected to run in 0 ms) due to recent wakeup
[2] afmw.h(11): SCH: Scheduling job Id: 9012, L: 30000, D: 85420050, C: true, I: true, N: 2
[2] afmw.h(11): SCH: Scheduling job Id: 9013, L: 13035138, D: 13935138, C: false, I: false, N: 0
onBind: Intent { act=com.google.android.gms.auth.service.START pkg=com.google.android.gms }
Loading bound service for intent: Intent { act=com.google.android.gms.auth.service.START pkg=com.google.android.gms }
 

Biswajit

Active Member
Licensed User
Longtime User
Yes, it doesn't get to GPGS_ScoreSubmitted.
I don't even know what will tell the reason in this log.

This is the log immediately after the call: lbc.SubmitScore("id",longValue)
I've updated the wrapper. Download the latest one. Now almost all the events of the client type classes will return a status code to check whether the task was successful or not. Check the attached HTML file for the event signature changes.

Thank you for testing the wrapper.
 
Last edited:

Jack Cole

Well-Known Member
Licensed User
Longtime User
Here is how I handle the sign in failing. Seems to work fine.

B4X:
Sub GPGS_SignInFailed(code As Int, status As String)
    Log($"GPGS_SignInFailed(code=${code}, status=${status})"$)
    If GPlayGamesService.HasResolution Then
        Log("trying to resolve issue")
        GPlayGamesService.StartResolutionForResult
    Else
        Log("trying manual sign in")
        SignIn(UsingSnapshotAPI)
    End If
End Sub


Sub SignIn(UseSnapshotApi As Boolean)
    GPlayGamesService.ManualSignIn("", UseSnapshotApi)
End Sub
 

coldteam

Active Member
Licensed User
Longtime User
Here is how I handle the sign in failing. Seems to work fine.

B4X:
Sub GPGS_SignInFailed(code As Int, status As String)
    Log($"GPGS_SignInFailed(code=${code}, status=${status})"$)
    If GPlayGamesService.HasResolution Then
        Log("trying to resolve issue")
        GPlayGamesService.StartResolutionForResult
    Else
        Log("trying manual sign in")
        SignIn(UsingSnapshotAPI)
    End If
End Sub


Sub SignIn(UseSnapshotApi As Boolean)
    GPlayGamesService.ManualSignIn("", UseSnapshotApi)
End Sub

I guess it's not a good idea to use ManualSignIn this way. It turns out a looped authorization process.
And according to the rules of google, the player should be able to play without authorization.
I see authorization as a good solution in case:
B4X:
Sub GPGS_SignInFailed(code As Int, status As String)
    Select status
        Case "SIGN_IN_REQUIRED"
            GPlayGamesService.ManualSignIn("",False)
        .....
.......

End Select
End Sub

And if the player is Sign Out.
B4X:
Sub GPGS_OnGPGSActivityResult(RequestCode As String, ResultCode As Int, ResultIntent As Intent)       
    If ResultCode = GPlayGamesService.RESULT_RECONNECT_REQUIRED Then
       Ask the player if he wants to reconnect
    End If
End Sub
 

coldteam

Active Member
Licensed User
Longtime User
I've updated the wrapper. Download the latest one. Now almost all the events of the client type classes will return a status code to check whether the task was successful or not. Check the attached HTML file for the event signature changes.

Thank you for testing the wrapper.

Unfortunately the event "GPGS_ScoreSubmitted" is not returned.
I corrected the event for the new version.
B4X:
Sub GPGS_ScoreSubmitted(submissionData As GPGSScoreSubmissionData, statusCode As Int)
    Log("#Submitted " & statusCode)
End Sub

And my leaderboard won't load either
B4X:
Sub GPGS_ReceivedLeaderboardsIntent(intent As Intent, statusCode As Int)
    Log("ReceivedLeaderboardsIntent " & statusCode)
    GGames.StartActivityForResult(intent,10)
End Sub

Log....
    ReceivedLeaderboardsIntent 0
START u0 {act=com.google.android.gms.games.VIEW_LEADERBOARD_SCORES dat=version:12451000 flg=0x4000000 pkg=com.google.android.play.games cmp=com.google.android.play.games/com.google.android.gms.games.ui.clientv2.leaderboards.LeaderboardActivity (has extras)} from uid 10092

B4X:
ReceivedLeaderboardsIntent 0
getConfig(0xe7aa2300:google.mp3.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
START u0 {act=com.google.android.gms.games.VIEW_LEADERBOARD_SCORES dat=version:12451000 flg=0x4000000 pkg=com.google.android.play.games cmp=com.google.android.play.games/com.google.android.gms.games.ui.clientv2.leaderboards.LeaderboardActivity (has extras)} from uid 10092
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
Unable to resync. Signalling end of stream.
** Activity (main) Pause, UserClosed = false **
sensor listener tear down
sensor listener tear down
pause(0xe97ff900)
notifyListener_l(0xe97ff900), (7, 0, 0, -1), loop setting(0, 0)
notifyListener_l(0xe97ff900), (211, 0, 0, 20), loop setting(0, 0)
Application.pause
paused
paused
notifyListener_l(0xe97ff900), (211, 0, 0, 20), loop setting(0, 0)
IOmx service obtained
makeComponentInstance(OMX.google.mp3.decoder) in omx@1.0-service process
getConfig(0xe7aa2360:google.mp3.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
handleWindowVisibility: no activity for token android.os.BinderProxy@528a6b6
Couldn't load memtrack module
failed to get memory consumption info: -1
Couldn't load memtrack module
failed to get memory consumption info: -1
IOmx service obtained
makeComponentInstance(OMX.google.mp3.decoder) in omx@1.0-service process
getConfig(0xe7aa2360:google.mp3.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
IOmx service obtained
makeComponentInstance(OMX.google.mp3.decoder) in omx@1.0-service process
notifyListener_l(0xe97ff900), (211, 0, 0, 20), loop setting(0, 0)
getConfig(0xe7aa2360:google.mp3.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
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
Received query Google Sans:500, URI content://com.google.android.gms.fonts [CONTEXT service_id=132 ]
Query [Google Sans:500] resolved to {Google Sans, wdth 100.0, wght 500, ital 0.0, bestEffort false} [CONTEXT service_id=132 ]
Font PFD returned from cache for {Google Sans, wdth 100.0, wght 500, ital 0.0, bestEffort false} [CONTEXT service_id=132 ]
Fetch {Google Sans, wdth 100.0, wght 500, ital 0.0, bestEffort false} end status Status{statusCode=SUCCESS, resolution=null} [CONTEXT service_id=132 ]
Pulling font file for id = 6, cache size = 5 [CONTEXT service_id=132 ]
IOmx service obtained
makeComponentInstance(OMX.google.mp3.decoder) in omx@1.0-service process
getConfig(0xe7aa2360:google.mp3.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
Skia GL Pipeline
ro.sf.lcd_density must be defined as a build property
onGetService() from Client SDK version [210304000], Module version [210265032], PGA version [242130082], Account [Account {name=mytestacc@gmail.com, type=com.google}], Calling package [com.google.android.play.games], Game package [com.MyTestGame] [CONTEXT service_id=1 ]
onGetService() from Client SDK version [210304000], Module version [210265032], PGA version [242130082], Account [Account {name=<<default account>>, type=com.google}], Calling package [com.google.android.play.games], Game package [com.google.android.play.games] [CONTEXT service_id=1 ]
onGetService() from Client SDK version [210304000], Module version [210265032], PGA version [242130082], Account [Account {name=<<default account>>, type=com.google}], Calling package [com.google.android.gms], Game package [com.google.android.gms] [CONTEXT service_id=1 ]
onBind: Intent { act=com.google.android.gms.signin.service.INTERNAL_START dat=internal_signin://16757ce6-4661-452b-8a21-b46788c85def pkg=com.google.android.gms (has extras) }
Loading bound service for intent: Intent { act=com.google.android.gms.signin.service.INTERNAL_START dat=internal_signin://16757ce6-4661-452b-8a21-b46788c85def pkg=com.google.android.gms (has extras) }
onUnbind: Intent { act=com.google.android.gms.signin.service.INTERNAL_START dat=internal_signin://16757ce6-4661-452b-8a21-b46788c85def pkg=com.google.android.gms (has extras) }
gralloc_alloc: Creating ashmem region of size 1642496
HostConnection::get() New Host Connection established 0x7a18ba037e00, tid 14460
Successfully connected. Game [com.MyTestGame], Account [Account {name=mytestacc@gmail.com, type=com.google}], Account Resolution Requested [2] [CONTEXT service_id=1 ]
gralloc_alloc: Creating ashmem region of size 1642496
android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
Initialized EGL, version 1.4
Swap behavior 1
Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
gralloc_alloc: Creating ashmem region of size 1642496
Swap behavior 0
eglCreateContext: 0x7a18ba111a80: maj 3 min 0 rcv 3
eglMakeCurrent: 0x7a18ba111a80: ver 3 0 (tinfo 0x7a18b8743180)
ro.sf.lcd_density must be defined as a build property
onGetService() from Client SDK version [210304000], Module version [210265032], PGA version [242130082], Account [Account {name=mytestacc@gmail.com, type=com.google}], Calling package [com.google.android.play.games], Game package [com.MyTestGame] [CONTEXT service_id=1 ]
[DeviceKeyStore] Cannot load key: Device key file not found.
[DeviceKeyStore] Cannot load key: Device key file not found.
eglMakeCurrent: 0x7a18ba111a80: ver 3 0 (tinfo 0x7a18b8743180)
WakeLock acquired by sendMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@d66e170)
WakeLock released by handleMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@d66e170)
onBind: Intent { act=com.google.android.gms.signin.service.INTERNAL_START dat=internal_signin://a88b693d-e6c8-4208-aa98-7a363d562b59 pkg=com.google.android.gms (has extras) }
Loading bound service for intent: Intent { act=com.google.android.gms.signin.service.INTERNAL_START dat=internal_signin://a88b693d-e6c8-4208-aa98-7a363d562b59 pkg=com.google.android.gms (has extras) }
onUnbind: Intent { act=com.google.android.gms.signin.service.INTERNAL_START dat=internal_signin://a88b693d-e6c8-4208-aa98-7a363d562b59 pkg=com.google.android.gms (has extras) }
Successfully connected. Game [com.MyTestGame], Account [Account {name=mytestacc@gmail.com, type=com.google}], Account Resolution Requested [2] [CONTEXT service_id=1 ]
Displayed com.google.android.play.games/com.google.android.gms.games.ui.clientv2.leaderboards.LeaderboardActivity: +751ms
No image store record found for image ID 
Failed LoadImageOperation
onGetService() from Client SDK version [210304000], Module version [210265032], PGA version [242130082], Account [Account {name=mytestacc@gmail.com, type=com.google}], Calling package [com.google.android.play.games], Game package [com.google.android.play.games] [CONTEXT service_id=1 ]
gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
HostConnection::get() New Host Connection established 0x77271b82e480, tid 1738
gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
HostConnection::get() New Host Connection established 0x77271b82e480, tid 1738
gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
HostConnection::get() New Host Connection established 0x77271b82e480, tid 1738
gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
HostConnection::get() New Host Connection established 0x77271b82e480, tid 1738
gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
HostConnection::get() New Host Connection established 0x77271b82e480, tid 1738
gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
HostConnection::get() New Host Connection established 0x77271b82e480, tid 1738
IOmx service obtained
makeComponentInstance(OMX.google.mp3.decoder) in omx@1.0-service process
getConfig(0xe7aa2300:google.mp3.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
onBind: Intent { act=com.google.android.gms.signin.service.INTERNAL_START dat=internal_signin://80b89030-a263-4ef1-b89d-1b118780f692 pkg=com.google.android.gms (has extras) }
Loading bound service for intent: Intent { act=com.google.android.gms.signin.service.INTERNAL_START dat=internal_signin://80b89030-a263-4ef1-b89d-1b118780f692 pkg=com.google.android.gms (has extras) }
Dropping event due to no window focus: KeyEvent { action=ACTION_MULTIPLE, keyCode=KEYCODE_UNKNOWN, scanCode=0, characters="§", metaState=0, flags=0x0, repeatCount=0, eventTime=17468344, downTime=17468344, deviceId=-1, source=0x101 }
onStartInput() : Dummy InputConnection bound
onUnbind: Intent { act=com.google.android.gms.signin.service.INTERNAL_START dat=internal_signin://80b89030-a263-4ef1-b89d-1b118780f692 pkg=com.google.android.gms (has extras) }
Successfully connected. Game [com.google.android.play.games], Account [Account {name=mytestacc@gmail.com, type=com.google}], Account Resolution Requested [2] [CONTEXT service_id=1 ]
Load failed for ImageManagerUri{uri=} with size [32x32]
class bfs: Failed to load resource
There was 1 root cause:
java.io.IOException(Failed to load data for )
 call GlideException#logRootCauses(String) for more detail
  Cause (1 of 1): class bfs: Fetching data failed, class android.graphics.drawable.Drawable, LOCAL
There was 1 root cause:
java.io.IOException(Failed to load data for )
 call GlideException#logRootCauses(String) for more detail
    Cause (1 of 1): class java.io.IOException: Failed to load data for 
Load failed for ImageManagerUri{uri=} with size [72x72]
class bfs: Failed to load resource
There was 1 root cause:
java.io.IOException(Failed to load data for )
 call GlideException#logRootCauses(String) for more detail
  Cause (1 of 1): class bfs: Fetching data failed, class android.graphics.drawable.Drawable, LOCAL
There was 1 root cause:
java.io.IOException(Failed to load data for )
 call GlideException#logRootCauses(String) for more detail
    Cause (1 of 1): class java.io.IOException: Failed to load data for 
[405] NetworkUtility.d: Unexpected response code 401 for https://www.googleapis.com/games/v1/applications/played
Volley error when reporting played
com.android.volley.AuthFailureError
    at com.android.volley.toolbox.NetworkUtility.d(:com.google.android.gms@210265032@21.02.65 (100800-353715811):5)
    at com.android.volley.toolbox.BasicNetwork.performRequest(:com.google.android.gms@210265032@21.02.65 (100800-353715811):12)
    at m.ccp.performRequest(:com.google.android.play.games.services@242130080@2021.01.24213 (353017112.353017112-000800):17)
    at com.android.volley.NetworkDispatcher.processRequest(:com.google.android.gms@210265032@21.02.65 (100800-353715811):5)
    at com.android.volley.GmsAbstractNetworkDispatcher.processRequest(:com.google.android.gms@210265032@21.02.65 (100800-353715811):0)
    at m.eel.a(:com.google.android.play.games.services@242130080@2021.01.24213 (353017112.353017112-000800):0)
    at m.eer.run(:com.google.android.play.games.services@242130080@2021.01.24213 (353017112.353017112-000800):0)
    at m.cfv.c(:com.google.android.play.games.services@242130080@2021.01.24213 (353017112.353017112-000800):6)
    at m.cfv.run(:com.google.android.play.games.services@242130080@2021.01.24213 (353017112.353017112-000800):7)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at tqp.run(:com.google.android.gms@210265032@21.02.65 (100800-353715811):0)
    at java.lang.Thread.run(Thread.java:764)
No service published for: persistent_data_block
 
Last edited:

Biswajit

Active Member
Licensed User
Longtime User
Unfortunately the event "GPGS_ScoreSubmitted" is not returned.
I corrected the event for the new version.
B4X:
Sub GPGS_ScoreSubmitted(submissionData As GPGSScoreSubmissionData, statusCode As Int)
    Log("#Submitted " & statusCode)
End Sub

And my leaderboard won't load either
B4X:
Sub GPGS_ReceivedLeaderboardsIntent(intent As Intent, statusCode As Int)
    Log("ReceivedLeaderboardsIntent " & statusCode)
    GGames.StartActivityForResult(intent,10)
End Sub

Log....
    ReceivedLeaderboardsIntent 0
START u0 {act=com.google.android.gms.games.VIEW_LEADERBOARD_SCORES dat=version:12451000 flg=0x4000000 pkg=com.google.android.play.games cmp=com.google.android.play.games/com.google.android.gms.games.ui.clientv2.leaderboards.LeaderboardActivity (has extras)} from uid 10092

B4X:
ReceivedLeaderboardsIntent 0
getConfig(0xe7aa2300:google.mp3.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
START u0 {act=com.google.android.gms.games.VIEW_LEADERBOARD_SCORES dat=version:12451000 flg=0x4000000 pkg=com.google.android.play.games cmp=com.google.android.play.games/com.google.android.gms.games.ui.clientv2.leaderboards.LeaderboardActivity (has extras)} from uid 10092
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
Unable to resync. Signalling end of stream.
** Activity (main) Pause, UserClosed = false **
sensor listener tear down
sensor listener tear down
pause(0xe97ff900)
notifyListener_l(0xe97ff900), (7, 0, 0, -1), loop setting(0, 0)
notifyListener_l(0xe97ff900), (211, 0, 0, 20), loop setting(0, 0)
Application.pause
paused
paused
notifyListener_l(0xe97ff900), (211, 0, 0, 20), loop setting(0, 0)
IOmx service obtained
makeComponentInstance(OMX.google.mp3.decoder) in omx@1.0-service process
getConfig(0xe7aa2360:google.mp3.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
handleWindowVisibility: no activity for token android.os.BinderProxy@528a6b6
Couldn't load memtrack module
failed to get memory consumption info: -1
Couldn't load memtrack module
failed to get memory consumption info: -1
IOmx service obtained
makeComponentInstance(OMX.google.mp3.decoder) in omx@1.0-service process
getConfig(0xe7aa2360:google.mp3.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
IOmx service obtained
makeComponentInstance(OMX.google.mp3.decoder) in omx@1.0-service process
notifyListener_l(0xe97ff900), (211, 0, 0, 20), loop setting(0, 0)
getConfig(0xe7aa2360:google.mp3.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
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
Received query Google Sans:500, URI content://com.google.android.gms.fonts [CONTEXT service_id=132 ]
Query [Google Sans:500] resolved to {Google Sans, wdth 100.0, wght 500, ital 0.0, bestEffort false} [CONTEXT service_id=132 ]
Font PFD returned from cache for {Google Sans, wdth 100.0, wght 500, ital 0.0, bestEffort false} [CONTEXT service_id=132 ]
Fetch {Google Sans, wdth 100.0, wght 500, ital 0.0, bestEffort false} end status Status{statusCode=SUCCESS, resolution=null} [CONTEXT service_id=132 ]
Pulling font file for id = 6, cache size = 5 [CONTEXT service_id=132 ]
IOmx service obtained
makeComponentInstance(OMX.google.mp3.decoder) in omx@1.0-service process
getConfig(0xe7aa2360:google.mp3.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
Skia GL Pipeline
ro.sf.lcd_density must be defined as a build property
onGetService() from Client SDK version [210304000], Module version [210265032], PGA version [242130082], Account [Account {name=mytestacc@gmail.com, type=com.google}], Calling package [com.google.android.play.games], Game package [com.MyTestGame] [CONTEXT service_id=1 ]
onGetService() from Client SDK version [210304000], Module version [210265032], PGA version [242130082], Account [Account {name=<<default account>>, type=com.google}], Calling package [com.google.android.play.games], Game package [com.google.android.play.games] [CONTEXT service_id=1 ]
onGetService() from Client SDK version [210304000], Module version [210265032], PGA version [242130082], Account [Account {name=<<default account>>, type=com.google}], Calling package [com.google.android.gms], Game package [com.google.android.gms] [CONTEXT service_id=1 ]
onBind: Intent { act=com.google.android.gms.signin.service.INTERNAL_START dat=internal_signin://16757ce6-4661-452b-8a21-b46788c85def pkg=com.google.android.gms (has extras) }
Loading bound service for intent: Intent { act=com.google.android.gms.signin.service.INTERNAL_START dat=internal_signin://16757ce6-4661-452b-8a21-b46788c85def pkg=com.google.android.gms (has extras) }
onUnbind: Intent { act=com.google.android.gms.signin.service.INTERNAL_START dat=internal_signin://16757ce6-4661-452b-8a21-b46788c85def pkg=com.google.android.gms (has extras) }
gralloc_alloc: Creating ashmem region of size 1642496
HostConnection::get() New Host Connection established 0x7a18ba037e00, tid 14460
Successfully connected. Game [com.MyTestGame], Account [Account {name=mytestacc@gmail.com, type=com.google}], Account Resolution Requested [2] [CONTEXT service_id=1 ]
gralloc_alloc: Creating ashmem region of size 1642496
android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
Initialized EGL, version 1.4
Swap behavior 1
Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
gralloc_alloc: Creating ashmem region of size 1642496
Swap behavior 0
eglCreateContext: 0x7a18ba111a80: maj 3 min 0 rcv 3
eglMakeCurrent: 0x7a18ba111a80: ver 3 0 (tinfo 0x7a18b8743180)
ro.sf.lcd_density must be defined as a build property
onGetService() from Client SDK version [210304000], Module version [210265032], PGA version [242130082], Account [Account {name=mytestacc@gmail.com, type=com.google}], Calling package [com.google.android.play.games], Game package [com.MyTestGame] [CONTEXT service_id=1 ]
[DeviceKeyStore] Cannot load key: Device key file not found.
[DeviceKeyStore] Cannot load key: Device key file not found.
eglMakeCurrent: 0x7a18ba111a80: ver 3 0 (tinfo 0x7a18b8743180)
WakeLock acquired by sendMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@d66e170)
WakeLock released by handleMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@d66e170)
onBind: Intent { act=com.google.android.gms.signin.service.INTERNAL_START dat=internal_signin://a88b693d-e6c8-4208-aa98-7a363d562b59 pkg=com.google.android.gms (has extras) }
Loading bound service for intent: Intent { act=com.google.android.gms.signin.service.INTERNAL_START dat=internal_signin://a88b693d-e6c8-4208-aa98-7a363d562b59 pkg=com.google.android.gms (has extras) }
onUnbind: Intent { act=com.google.android.gms.signin.service.INTERNAL_START dat=internal_signin://a88b693d-e6c8-4208-aa98-7a363d562b59 pkg=com.google.android.gms (has extras) }
Successfully connected. Game [com.MyTestGame], Account [Account {name=mytestacc@gmail.com, type=com.google}], Account Resolution Requested [2] [CONTEXT service_id=1 ]
Displayed com.google.android.play.games/com.google.android.gms.games.ui.clientv2.leaderboards.LeaderboardActivity: +751ms
No image store record found for image ID
Failed LoadImageOperation
onGetService() from Client SDK version [210304000], Module version [210265032], PGA version [242130082], Account [Account {name=mytestacc@gmail.com, type=com.google}], Calling package [com.google.android.play.games], Game package [com.google.android.play.games] [CONTEXT service_id=1 ]
gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
HostConnection::get() New Host Connection established 0x77271b82e480, tid 1738
gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
HostConnection::get() New Host Connection established 0x77271b82e480, tid 1738
gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
HostConnection::get() New Host Connection established 0x77271b82e480, tid 1738
gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
HostConnection::get() New Host Connection established 0x77271b82e480, tid 1738
gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
HostConnection::get() New Host Connection established 0x77271b82e480, tid 1738
gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
HostConnection::get() New Host Connection established 0x77271b82e480, tid 1738
IOmx service obtained
makeComponentInstance(OMX.google.mp3.decoder) in omx@1.0-service process
getConfig(0xe7aa2300:google.mp3.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(8192) returning hidl_memory(0x71c2e3a2c100, 8192)
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
uid=1000(system) allocator@1.0-s identical 2 lines
ashmem_create_region(9216) returning hidl_memory(0x71c2e3a2c100, 9216)
onBind: Intent { act=com.google.android.gms.signin.service.INTERNAL_START dat=internal_signin://80b89030-a263-4ef1-b89d-1b118780f692 pkg=com.google.android.gms (has extras) }
Loading bound service for intent: Intent { act=com.google.android.gms.signin.service.INTERNAL_START dat=internal_signin://80b89030-a263-4ef1-b89d-1b118780f692 pkg=com.google.android.gms (has extras) }
Dropping event due to no window focus: KeyEvent { action=ACTION_MULTIPLE, keyCode=KEYCODE_UNKNOWN, scanCode=0, characters="§", metaState=0, flags=0x0, repeatCount=0, eventTime=17468344, downTime=17468344, deviceId=-1, source=0x101 }
onStartInput() : Dummy InputConnection bound
onUnbind: Intent { act=com.google.android.gms.signin.service.INTERNAL_START dat=internal_signin://80b89030-a263-4ef1-b89d-1b118780f692 pkg=com.google.android.gms (has extras) }
Successfully connected. Game [com.google.android.play.games], Account [Account {name=mytestacc@gmail.com, type=com.google}], Account Resolution Requested [2] [CONTEXT service_id=1 ]
Load failed for ImageManagerUri{uri=} with size [32x32]
class bfs: Failed to load resource
There was 1 root cause:
java.io.IOException(Failed to load data for )
call GlideException#logRootCauses(String) for more detail
  Cause (1 of 1): class bfs: Fetching data failed, class android.graphics.drawable.Drawable, LOCAL
There was 1 root cause:
java.io.IOException(Failed to load data for )
call GlideException#logRootCauses(String) for more detail
    Cause (1 of 1): class java.io.IOException: Failed to load data for
Load failed for ImageManagerUri{uri=} with size [72x72]
class bfs: Failed to load resource
There was 1 root cause:
java.io.IOException(Failed to load data for )
call GlideException#logRootCauses(String) for more detail
  Cause (1 of 1): class bfs: Fetching data failed, class android.graphics.drawable.Drawable, LOCAL
There was 1 root cause:
java.io.IOException(Failed to load data for )
call GlideException#logRootCauses(String) for more detail
    Cause (1 of 1): class java.io.IOException: Failed to load data for
[405] NetworkUtility.d: Unexpected response code 401 for https://www.googleapis.com/games/v1/applications/played
Volley error when reporting played
com.android.volley.AuthFailureError
    at com.android.volley.toolbox.NetworkUtility.d(:com.google.android.gms@210265032@21.02.65 (100800-353715811):5)
    at com.android.volley.toolbox.BasicNetwork.performRequest(:com.google.android.gms@210265032@21.02.65 (100800-353715811):12)
    at m.ccp.performRequest(:com.google.android.play.games.services@242130080@2021.01.24213 (353017112.353017112-000800):17)
    at com.android.volley.NetworkDispatcher.processRequest(:com.google.android.gms@210265032@21.02.65 (100800-353715811):5)
    at com.android.volley.GmsAbstractNetworkDispatcher.processRequest(:com.google.android.gms@210265032@21.02.65 (100800-353715811):0)
    at m.eel.a(:com.google.android.play.games.services@242130080@2021.01.24213 (353017112.353017112-000800):0)
    at m.eer.run(:com.google.android.play.games.services@242130080@2021.01.24213 (353017112.353017112-000800):0)
    at m.cfv.c(:com.google.android.play.games.services@242130080@2021.01.24213 (353017112.353017112-000800):6)
    at m.cfv.run(:com.google.android.play.games.services@242130080@2021.01.24213 (353017112.353017112-000800):7)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at tqp.run(:com.google.android.gms@210265032@21.02.65 (100800-353715811):0)
    at java.lang.Thread.run(Thread.java:764)
No service published for: persistent_data_block
Maybe this comment can help you.
 

Biswajit

Active Member
Licensed User
Longtime User
I noticed that the GPGS SDK is not informing if the leaderboard id is wrong or not its just creating an intent using that leaderboard id and on the loading page its showing the loading progress bar infinitely.
 

coldteam

Active Member
Licensed User
Longtime User
I noticed that the GPGS SDK is not informing if the leaderboard id is wrong or not its just creating an intent using that leaderboard id and on the loading page its showing the loading progress bar infinitely.

it's not scary. I am sure that I am giving the correct data. Now I did as in the instructions and write after the changes are published.
 

Biswajit

Active Member
Licensed User
Longtime User
it's not scary. I am sure that I am giving the correct data. Now I did as in the instructions and write after the changes are published.
So the submit score and the leaderboard are working now?
 
Top