oneseedfruit/PGSGP

Error on init

CompassDevs opened this issue ยท 11 comments

Hi, i'm using your latest 3.1.1 version for Godot 3.3+ (also tried the previous 3.1.0), and i do have an error when calling the init method. GooglePlayServices are installed on the phone and i can use them in other games.
The singleton is found but the error says no init in it.

Any idea?

Hi @CompassDevs, I am also getting the same error, did you find the fix for it?

Thanks, I found the solution. If anyone else is looking for the same thing. You need to change the init method. Use the following.

play_games_services.init(true,false,false,"")
play_games_services.initWithSavedGames(true, "SAVE_GAME_NAME",false, false, "") # Use this init if you want saved games feature to be enabled

@oneseedfruit You can close this issue. This is causing confusion because people are following the readme from cgisca/PGSGP. It's probably a better idea to use this repo instead, as it doesn't seem like the parent repo is supported anymore.

Thanks, I found the solution. If anyone else is looking for the same thing. You need to change the init method. Use the following.

play_games_services.init(true,false,false,"")
play_games_services.initWithSavedGames(true, "SAVE_GAME_NAME",false, false, "") # Use this init if you want saved games feature to be enabled

Yo, on your example, you didnt pass the request_token. is it okay not to input it?

Request token isn't required when you are deploying on Android, as it takes the value from Strings.xml for other platforms it is required

@vipulbehl Can you help me with the sign. I am getting a 12501 error. I am passing play_games_services.initWithSavedGames(true, "SAVE_GAME_NAME", false, false, "") this for initializing. I checked the error codes and it shows the message is displayed when user cancels the sign-in request (The sign in was cancelled by the user. i.e. user cancelled some of the sign in resolutions, e.g. account picking or OAuth consent) But, I am 100% sure, there's no request for cancellation in my code. As it was working in 3.3.3 before I updated to 3.3. Can you help, please? I can provide you with additional code .

Whenever I have the init method not commented out the app instantly crashes. Im using the new play_games_services.init(true,false,false,"") with godot 3.2.3 (because I tried newer versions and got the same issue)

Does openjdk version matters ? Do we need to downgrade the jdk to openjdk8 ? Im on version 11 right now.

Does openjdk version matters ? Do we need to downgrade the jdk to openjdk8 ? Im on version 11 right now.

You must use jdk 8.

I tried it but gradle requres Java11 for godot 3.4 godotengine/godot#53610

I would not worry about JDK 11 I am using it in 3.4 for a tutorial and its fine.