Hi! First off, thank you so much for maintaining this fantastic plugin! I have been using it in my Godot game without much issue so far.
I encountered a crash however that I think should be easily fixable:
11-24 20:55:49.147 5480 5480 E AndroidRuntime: FATAL EXCEPTION: main
11-24 20:55:49.147 5480 5480 E AndroidRuntime: Process: com.pank0.usagishima, PID: 5480
11-24 20:55:49.147 5480 5480 E AndroidRuntime: java.lang.IllegalArgumentException: Invalid arguments count. Should be 1 but is 0
11-24 20:55:49.147 5480 5480 E AndroidRuntime: at org.godotengine.godot.plugin.GodotPlugin.emitSignal(GodotPlugin.java:368)
11-24 20:55:49.147 5480 5480 E AndroidRuntime: at org.godotengine.godot.plugin.GodotPlugin.emitSignal(GodotPlugin.java:343)
11-24 20:55:49.147 5480 5480 E AndroidRuntime: at io.cgisca.godot.gpgs.PlayGameServicesGodot.onAchievementInfoLoadingFailed(PlayGameServicesGodot.kt:375)
11-24 20:55:49.147 5480 5480 E AndroidRuntime: at io.cgisca.godot.gpgs.achievements.AchievementsController.loadAchievementInfo(AchievementsController.kt:113)
11-24 20:55:49.147 5480 5480 E AndroidRuntime: at io.cgisca.godot.gpgs.PlayGameServicesGodot.loadAchievementInfo$lambda-10(PlayGameServicesGodot.kt:268)
11-24 20:55:49.147 5480 5480 E AndroidRuntime: at io.cgisca.godot.gpgs.PlayGameServicesGodot.$r8$lambda$Lj4qxSyZ7Gf4YV_JHXpPDQ4X9pY(Unknown Source:0)
11-24 20:55:49.147 5480 5480 E AndroidRuntime: at io.cgisca.godot.gpgs.PlayGameServicesGodot$$ExternalSyntheticLambda9.run(Unknown Source:4)
11-24 20:55:49.147 5480 5480 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:883)
11-24 20:55:49.147 5480 5480 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:100)
11-24 20:55:49.147 5480 5480 E AndroidRuntime: at android.os.Looper.loop(Looper.java:214)
11-24 20:55:49.147 5480 5480 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7397)
11-24 20:55:49.147 5480 5480 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-24 20:55:49.147 5480 5480 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
11-24 20:55:49.147 5480 5480 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
11-24 20:55:49.294 2947 6825 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
11-24 20:55:49.312 2947 10102 W ActivityTaskManager: Force finishing activity com.pank0.usagishima/com.godot.game.GodotApp
The cause of the crash seems to be an incorrect number of arguments passed to the _on_achievement_info_load_failed signal. It appears that the number of arguments declared for this signal is incorrect in PlayGameServicesGodot.kt. The following change seemed to fix the crashes for me:
--- a/app/src/main/java/io/cgisca/godot/gpgs/PlayGameServicesGodot.kt
+++ b/app/src/main/java/io/cgisca/godot/gpgs/PlayGameServicesGodot.kt
@@ -65,7 +65,7 @@ class PlayGameServicesGodot(godot: Godot) : GodotPlugin(godot), AchievementsList
val SIGNAL_ACHIEVEMENT_STEPS_SET_FAILED =
SignalInfo("_on_achievement_steps_setting_failed", String::class.java)
val SIGNAL_ACHIEVEMENT_INFO_LOAD = SignalInfo("_on_achievement_info_loaded", String::class.java)
- val SIGNAL_ACHIEVEMENT_INFO_LOAD_FAILED = SignalInfo("_on_achievement_info_load_failed", String::class.java)
+ val SIGNAL_ACHIEVEMENT_INFO_LOAD_FAILED = SignalInfo("_on_achievement_info_load_failed")
val SIGNAL_LEADERBOARD_SCORE_SUBMITTED = SignalInfo("_on_leaderboard_score_submitted", String::class.java)
val SIGNAL_LEADERBOARD_SCORE_SUBMITTED_FAILED =
SignalInfo("_on_leaderboard_score_submitting_failed", String::class.java)
If someone could confirm the fix is indeed correct, I can submit a pull request if you want.
Thanks a lot!