Last year, I commissioned Biswajit to write a library for the new Google Play Games Services library. To manage the complexity of the code, I wrote a class called GamePlayLeaderboardsAndAchievements. I put together an example app that demonstrates the functionality of the library and class. There is an additional class and code module that is included that might have some things you will find useful (Map_B4X and ListHelper). Map_B4X is like an extended version of Erel's B4XOrderedMap class. ListHelper is a code module that has a variety of list functions including mathematical (from calculating the mean or sum of list values to linear regression). It also does things like ListSubtract, which removes the items in the second list from the first list.
Features of the attached example app:
To get the example app working for you, at a minimum, you will need to replace the manifest code that creates the games-ids.xml resource file. You will also need to change the package name in build configurations.
Features of the attached example app:
- Sign in and Sign out
- Show normal achievements
- Show incremental type achievements
- Unlock/Reveal normal achievements
- Increment incremental type
- Submit score to a leaderboard
- Show all leaderboards
- Show specific leaderboard
To get the example app working for you, at a minimum, you will need to replace the manifest code that creates the games-ids.xml resource file. You will also need to change the package name in build configurations.