question

soapdev avatar image
soapdev asked

Unity: How to detect a Kindle device

In the FAQ is says -- At this time, Amazon GameCircle is only available on Kindle tablets. It is possible that your Amazon GameCircle supported app could be loaded on a device that does not support Amazon GameCircle. You can either make one binary that handles both environments (Kindle and general Android), or you can make a separate binary for each environment. -- 2 Questions: A.) How do I detect a Kindle device from within Unity? I would like to show or hide a achievements button based on if the devices can even deal with Game circle. Many of the players on our stats play our games on non- kindle devices, yet Amazon has a strong interest in us using the new API. But if I can't detect for sure if the device is a native Kindle device or just another android phone/ tablet I am likely to screw the experience for most players. B.) I don't remember a special field in the app submitting where one can specify non Kindle devices and Kindle devices. So how would it even work when I choose the 2nd option going for 2 separate Binaries?
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sachin@Amazon avatar image
Sachin@Amazon answered
A) Whenever we initialize the GameCircle, an asynchronous callback is registered. For Non-Amazon devices, the callback object will be notified by calling the onServiceNotReady() function with the reason code "CANNOT_BIND". B) We provide a device targeting feature which enables you to take a single app and target specific APKs to specific Amazon devices, as well as target a single, general APK that covers all other non-Amazon Android devices. While submitting a new app on mobile distribution portal, under the "Binary File(s)" tab, you get "Device Support" option to select target devices for the uploaded binary. As you have uploaded your first APK with selected targeting, click "Save and Add a binary". Then, upload your second binary and select the second binary targeting. Click "Save and Add a Binary" until you have the number of desired binaries and respective device targeting selected for each. Once all the binaries are uploaded, click on the "Save" button. Be sure to follow the versionName and versionCode requirements in your manifest. For more information, please follow our FAQ on submitting apps https://developer.amazon.com/help/faq.html#AppBinary
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Bruce Smith avatar image
Bruce Smith answered
You can detect if you are on a kindle by looking at the build. e.g., android.os.Build.MODEL.toLowerCase().equals("kindle fire"); For other more device specific things it is better to look if the feature is supported via PackageManager. Cheers
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dixith@Amazon avatar image
Dixith@Amazon answered
Hi, Thank you for your answer. This information would help other developers in the forum. The methods Build. Model( ) returns visible name of the product and Build. Manufacturer( ) returns manufacturer of the product/hardware .
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.