question

Reliance Games avatar image
Reliance Games asked

How to disable ADM on Kindle phones having lower android version.

Hi, We have integrated ADM in our app which works fine on Kindle( 8.9 inch) which has Android 4.0.3. Same apk crashes on Kindle (7 inch ) which has Android 2.3.4. --> Could not find class 'com.amazon.device.messaging.ADM', referenced from method com.jumpgames.pn.RealSteelActivity.register How to disable ADM at runtime so that it will also work on low Android version devices? Thanks
amazon device messaging
10 |5000

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

1 Answer

Bipin@Amazon avatar image
Bipin@Amazon answered
Hi, 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. Designing your app to accommodate the absence of ADM allows you to build a single APK that can be installed and run on devices that may or may not include ADM. To modify your app to gracefully degrade, do the following: ADMAvailable = false ; try { Class.forName( "com.amazon.device.messaging.ADM" ); ADMAvailable = true ; } catch (ClassNotFoundException e) { // Handle the exception. } if (ADMAvailable) { // Your code that requires ADM goes here. } In your AndroidManifest.xml file, verify that the application element specifies: amazon:enable-feature android:name="com.amazon.device.messaging" android:required="false"
10 |5000

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