Reputation: 93
I am receiving the following exception when trying to use any of the save functionality in the latest Google Play Games api for Unity (0.9.11)
Exception in
com/google/android/gms/games/snapshot/Snapshots.getSelectSnapshotIntent: java.lang.IllegalStateException: Cannot use snapshots without enabling the 'Saved Game' feature in the Play console.
However, both my producer and I have verified that the toggle is indeed set to on in the Developer Console. We have also ensured that Google Play Game Services and Drive API are toggled to "on" in the dashboard as well.
So, at this point, I am at a bit of a loss as to why this system doesn't function properly, and lacks the documentation to correctly set it up.
Upvotes: 2
Views: 1953
Reputation: 321
In my project everything works fine! All you have to do:
GoogleApiClient connection:
mGoogleApiClient = new GoogleApiClient.Builder(this) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .addApi(Games.API) .addScope(Games.SCOPE_GAMES) .addScope(Drive.SCOPE_APPFOLDER) .build();
mGoogleApiClient.connect();
At your Google Play Console:
Game Services / Details:
Saved Games - ON
APIs required for basic Games Services to work: Google Play Game Services and Google Play Game Management
APIs required for Saved Games to work: Drive API
Upvotes: 0
Reputation: 1408
You have to test with test users.
Add test user to your Game Service->Your Game-> Testing-> Add testers. Wait 5 minute. It will work with until 24 hour passed with test users
Google says: After saved game activated and published, it may take up to 24 hours for Google Play games services to activate the Saved Games feature for your game. Afted clearing Google Play Services app it has to work (In Android: Settings > Apps > Google Play services, click on Manage Space, then click on Clear All Data.)
Upvotes: 5
Reputation: 4572
Is the Drive API enabled?
On the Game details section at the bottom there is a section called "API CONSOLE PROJECT". This lists all the APIs that are enabled for your game application. There should be a section for Saved Games and the Drive API should be enabled. If it is not there, then it needs to be enabled.
Click the API console project link, then click on APIs (under the APIs & auth section). Once there find the "Drive API" entry and turn it on. (disclaimer: i have not verified this works if the game is published)
Upvotes: 0