No hay resultados
Jeremy Cath, Kindle Technical Evangelist, is our author for this post.
The Amazon GameCircle API gives players more ways to connect with your game and with each other using Achievements, Leaderboards, andcloud-to-device Sync. Achievements add an engaging way for players to track their progress in your game, Leaderboards let them see how they stack up against their peers, and Sync allows users to save progress to the cloud so they can resume their progress across their devices.
One issue we have seen developers encounter with GameCircle integration is the CANNOT_AUTHORIZE exception when they are initializing the AmazonGamesClient service. This message can occur even if developers have registered the signature for their application with the GameCircle whitelist.
If you encounter this error, there are a number of things worth checking:
1. Are you testing on Kindle Fire or on a Kindle Fire Emulator?
Amazon GameCircle features are only available on Kindle Fire and in the Kindle Fire emulator.
2. Is the device signed in with an Amazon account?
GameCircle uses the account that the device is signed in with to authenticate the player against the service. Most physical devices will be registered and signed in, but if you are using the emulator, by default it is not registered or signed in (you can do that from the Settings | My Account option)
3. Make sure the device has been updated to the latest version of the Fire OS.
It is important that you are running the latest version of the OS. To check this, go to the top menu, tap More, tap Device, click the Update your Kindle button if it is enabled.
4. Make sure you're using the latest version of the GameCircle API.
The current version is 1.2.1, but you can check if this has changed in the GameCircle API documentation.
5. Make sure you got a valid result from the key tool command you used to get the signature.
To do this, run the first part of the command line separately:
keytool -exportcert -alias androiddebugkey -keystore
[path to your keystore file]
This command should return a very long string that represents your certificate. If the path to your keystone is wrong, it will return an error message. After you get valid results from this command, run the full command line to get the signature:
keytool -exportcert -alias androiddebugkey -keystore
[path to your keystore file] | openssl sha1 -binary |openssl base64
This will return your signature string. Please check that this is the string that you have registered in the GameCircle Portal.
1. Are youtesting on Kindle Fire or on a Kindle Fire Emulator?
Amazon GameCircle features are only available on Kindle Fire and in the Kindle Fire emulator.
2. Is thedevice signed in with an Amazon account?
GameCircle uses the account that the device is signed in with to authenticate the player against the service. Most physical devices will be registered and signed in, but if you are using the emulator, by default it is not registered or signed in (you can do that from the Settings | My Account option)
3. Make surethe device has been updated to the latest version of the Fire OS.
It is important that you are running the latest version of the OS. To check this, go to the top menu, tap More, tap Device, click the Update your Kindle button if it is enabled.
4. Make sureyou're using the latest version of the GameCircle API.
The current version is 1.2.1, but you can check if this has changed in the[GameCircle API documentation][link to API doc]
5. Make sure you got a valid result from the keytool command you used to get the signature.
To do this, run the first part of the command line separately:
keytool -exportcert -alias androiddebugkey -keystore
[pathto your keystore file]
This command should return a very long string that represents your certificate. If the path to your keystone is wrong, it will return an error message. After you get valid results from this command, run the full command line to get the signature:
keytool -exportcert -aliasandroiddebugkey -keystore
[path to your keystorefile] | openssl sha1 -binary | openssl base64
This will return your signature string. Please check that this is the string that you have registered in the GameCircle Portal.