Reputation: 440
I don't have an Amazon Fire device but I would like an Android App to be available on Amazon.
Some functions (not essential to the correct behaviour of the app) which are correctly working on Android, are crashing the App when tested by the approuval team.
I understand that
device.platform
returns "Android" for Amazon fire.
How can I recognize Amazon Fire through Cordova code so that I can avoid calling the "offending" code?
(Finally the offending segment seems to be linked to camera flash
07-16 13:29:57.931 E/AndroidRuntime( 7767): FATAL EXCEPTION: Thread-356
07-16 13:29:57.931 E/AndroidRuntime( 7767): java.lang.NullPointerException
07-16 13:29:57.931 E/AndroidRuntime( 7767): at nl.xservices.plugins.Flashlight$1.run(Flashlight.java:84)
07-16 13:29:57.931 E/AndroidRuntime( 7767): at java.lang.Thread.run(Thread.java:856)
in case someone found and solved a similar issue)
Upvotes: 0
Views: 436
Reputation: 199
Provided you have Cordova 3.4 or higher, device.platform should return "amazon-fireos"
Upvotes: 1