Thank for your reply.
But I need get access token for authenticate with my backend server.
My game have ‘Login with Google’ and I need get access token and send to my server.
I will try sdkboxplay but I think it works. I need gpg because I want ‘Login with Google’ on both IOS and Android. (sdkboxplay only work on Android, I think).
Q1: Running sdkbox-sample-gpg - is it possible to connect with it to GP, if I’ve compiled it on my computer, so used mine debug.keystore, so new apk will have different SHA-1 signing-certificate fingerprint than yours, described for com.sdkbox.gpg in OAuth 2.0 client ID ?
Q2: I’ve tried to mix old sdkbox-sample-gpg and newer one, and get confused: both compiles ok. When running:
New sample can’t connect to GP. Then I change package_name (in AndroidManifest.xml) and string name="google_app_id"your_number_into_mine (in res\values\strings.xml) - then it’s crashes down just after the start.
Also I create the new empty project, add there sdkbox import gpg, and merge it with the old sample; it works ok and even successfully connects to GP, but when I change all files in “Classes” into files from newer sdkbox-sample-gpg version - it starts, tries to connect (some times success), and after few seconds crashes down.
Both crashes with log No such file or directory: system_server. Any hint, please?
Upd: When I have two devices, what should I do to create a common game match or at last a room? Both devices see each other, but end the Create / Join command with status ERROR_CANCELED = -6 - when I do on another device Create / Join or Invitations (then I see no invitations).
Upd2: Looks my problem is in RealTimeMultiplayerScene.cpp void RealTimeMultiplayerScene::CreateRoom(cocos2d::Ref *sender) {
… auto roomResponse = _game_services->RealTimeMultiplayer().CreateRealTimeRoomBlocking(config, this);
it returns -2 == ERROR_INTERNAL == BaseStatus::ERROR_INTERNAL via roomResponse.status;
then if(gpg::IsSuccess(roomResponse.status)){...block_1...}
there is no prompt/action if if condition is wrong.
Upd3: the log says:
9525 14814 E DataHolderOperation: There is no linked app associated with this client ID.: com.google.android.gms
proj.android\res\values\strings.xml : <string name="service_id">com.sdkbox.hugo.test.gpg.nearby</string>
also it is hard-coded in NearbyConnectionsScene.cpp : server_id = "com.sdkbox.hugo.test.gpg.nearby";
Also I’ve added there <string name="server_client_id">my_project_id-some_chars.apps.googleusercontent.com</string> - same error.
Where I could find a list of APIs I should enable in Google Play Games Services for realtime multiplayer?
My next question: two devices exchange messages, but then on one of them my App loose the focus - I get no error/prompt message, but after restore my messages sent status became “fail” - is it ok?
Hello, is it now that access token for gpg can get it?
“StateManager :: GetGameServices () -> FetchServerAuthCode” is to get the token?
But in Android there is no such method, compiled incorrect report.