I am trying to create a custom Leaderboard, instead of just showing the Google Play one.
The authentication used in the Google Play Games plugin for Unity works when I only use the standard leaderboard from Google.
What I am trying, is to use the Google Web API (Scores: list | Serviços relacionados a jogos do Google Play | Google for Developers) to get the values I need.
I have used the WWW class in Unity to try to achieve this. The WWW class works for GET requests on www.google.com for example, but when I use it on the google Web API url, it returns a weird error.
If I run my program in the editor, I get the expected 401 error.
But when I run the program on my Android device, I get “Java.IO.FileNotFoundException” instead.
I have tried the following URL’s
https://www.googleapis.com/games/v1/leaderboards/leaderboardId/scores/collection
https://www.googleapis.com/games/v1/players/playerId/leaderboards/leaderboardId/scores/timeSpan
https://www.googleapis.com/games/v1/leaderboards/leaderboardId/window/collection
substituting “leaderboardId”, “playerId”, “timeSpan” and “collection” with the actual values.
All these calls return the “Java.IO.FileNotFoundException”.
I am guessing it has something to do with authentication, but I am unsure on what exactly is happening.
I hope I’ve explained the issue well enough, otherwise please feel free to ask for a more detailed explanation.
Thank you.