question

utsav1 avatar image
utsav1 asked ·

Running app which uses ADM service on a non amazon device (Samsung+android)

hi I am trying t run my app on a google android device. I use amazon adm service in the app. The app runs fine on kindle device. But when I try to run the same on google android I get the following exception 07-06 15:32:36.648: E/AndroidRuntime(9279): java.lang.NoClassDefFoundError: com.amazon.device.messaging.ADM It seems that google android does not identify the amazon device messaging library. How to solve this problem. Thanks Utsav
amazon device messaging
10 |2000 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.

Sujoy@Amazon avatar image
Sujoy@Amazon answered ·
Hi Utsav1, Thank you for posting. ADM is supported on Kindle Fire HD 8.9" 4G, Kindle Fire HD 8.9", Kindle Fire HD 7", and Kindle Fire (2nd Generation) devices. Please refer this link : https://developer.amazon.com/post/Tx28SNZEVVQXNEE/Amazon-Device-Messaging-ADM-Now-Available.html To gracefully degrade your app if ADM Is Unavailable in run time please refer : https://developer.amazon.com/sdk/adm/integrating-app.html#Gracefully
10 |2000 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.

hvsclark avatar image
hvsclark answered ·
As a follow up to this, is it possible for the app to fall back on Google Cloud Messaging if the APK is installed on a non-Amazon device? Or would that be problematic in some way?
10 |2000 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.

Sujoy@Amazon avatar image
Sujoy@Amazon answered ·
Hi, Thank you for writing. You can fall back to Google Cloud Messaging if the device has a compatible Google Play services APK
10 |2000 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.

john brohan avatar image
john brohan answered ·
I'm facing exactly this problem. Do you have an approach or even code to share. It's so sad that they are building a walled garden. jbrohan@stay-in-touch.ca
10 |2000 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.

Sujoy@Amazon avatar image
Sujoy@Amazon answered ·
Hi John, Thank you for writing to us. In your manifest file, you declare whether your app can (android:required="false") or cannot (android:required="true") work without ADM. If you specify android:required="false", your app must degrade gracefully if ADM is unavailable. amazon:enable-feature android:name="com.amazon.device.messaging" android:required="false" / Use code similar to the following to check for ADM: boolean admAvailable = false ; try { Class.forName( "com.amazon.device.messaging.ADM" ); admAvailable = true ; } catch (ClassNotFoundException e) { // Handle the exception. } Add the following code to any of your code that requires the ADM library runtime. if (admAvailable ) { // Your code that requires ADM goes here. } This is already documented here : https://developer.amazon.com/appsandservices/apis/engage/device-messaging/tech-docs/04-integrating-your-app-with-adm#Gracefully%20Degrade%20if%20ADM%20Is%20Unavailable Please let us know what's the exact issue you have been facing to implement this.
10 |2000 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.

breakmachine avatar image
breakmachine answered ·
Would it be possible to gracefully downgrade to Google Cloud Messaging on a Kindle Fire 1st Gen?
10 |2000 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.

Amelia@Amazon avatar image
Amelia@Amazon answered ·
Hello breakmachine, Google Cloud Messaging is dependent on Google Play Services which is not available on Fire Tablet 1st Gen.
10 |2000 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.

anchal9 avatar image
anchal9 answered ·
hey,,i am having the same problem. Whenever i switch to google android this app doesn't work. Should i be worried or is it simply a normal problem?? http://www.technewsprovider.com
10 |2000 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.

NickG@Amazon avatar image
NickG@Amazon answered ·
Hi, Amazon Device Messaging is only available on Amazon devices. You can programatically detect what device you are running on. You can then use Amazon Device Messaging on Amazon devices, and other cloud messaging services on other devices as detected. Thanks, Nick
10 |2000 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.

Vladimir Davidovich avatar image
Vladimir Davidovich answered ·
Amazon App Testing Service emits "Caution: Google Cloud Messging Detected" when such setup is submitted. Currently, there is no way to get rid of this annoying issue and submit the same APK for all devices on Amazon Appstore. What are we supposed to do with this caution? Can Amazon remove this automated check? It makes no sense because Amazon Appstore is available on devices without ADM.
10 |2000 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.