Developer Pham Dinh Hai from DeuxSoftware has published a wrapper for the Google Play Game Services API on Android for Delphi XE6 (and XE7) Firemonkey. The wrapper gives you access to the Leaderboard and Achievement services provided by Google. The developer originally built this code for his Delphi Firemonkey game which is called Rolling Sheep. You can see screenshots of the leaderboards and achievements on his game page. In any event he translated the JNI code by hand and is provided the full source for the Game Services wrapper for free. It has a helper JAR file called basegameutils.jar which then utilizes the google-play-services.jar. Now it does require that you modify the classes.dex file to get access to the Game Services. There is an included bat file and readme instructions which will help you compile your own classes.dex file for Delphi XE5 and Delphi XE6. In Delphi XE7 and Appmethod I think you can skip that step and add the JAR files directly to the Android Library section in your project. Here is a sample JNI class from the source code:
JGameHelper = interface(JObject)
procedure onActivityResult(requestCode:integer; resultCode:integer; data:JIntent);cdecl;
TJGameHelper = class(TJavaGenericImport<JGameHelperClass, JGameHelper>) end;
Leaderboards And Achievements With Google Play Game Services In Delphi XE5 XE6 XE7 Firemonkey On Android by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Tokyo Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.