S
S
Staspost2020-05-14 20:23:59
Android
Staspost, 2020-05-14 20:23:59

How to authorize a user in Google Play?

Good afternoon!
There is a project on Unity for Android.
I'm trying to make authorization in GooglePlay in the project to use leaderboards and achievements.
To work with GooglePlay I use this plugin .
I did everything according to the instructions. I uploaded the plugin to the Assets folder, registered the keys and resources in the settings, created a leaderboard and achievements on GooglePlay itself, attached the application.
I made an authorization button in the application, on which I hung the following script:

PlayGamesPlatform.Activate();
//первый вариант авторизации
        PlayGamesPlatform.Instance.Authenticate((bool success) => { 
            Debug.Log("Authorization:" + success);
            results.text = success; 
        });

//второй вариант авторизации
        /*PlayGamesPlatform.Instance.Authenticate(SignInInteractivity.CanPromptOnce, (result) => {
            results.text = result;
        });*/

I tried to use 2 authorization options, displaying the result in a text field. When testing in Unity - success/result return false.
However, if you test on a real device, then nothing is returned at all (the text in the text field is not displayed), nothing happens when you click on the authorization button.
Logcat displays the following list of errors:
5ebd7e4f84324914423067.png
Actually, the question is: what am I doing wrong and how to properly set up authorization in Google Play?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question