question

"cured_one" avatar image
"cured_one" asked

ADM contructor throws

I am trying to initialize new instance of ADM in my application's main activity, and contructor throws RuntimeException with getMessage() = "Stub!". Would appreciate any poimters! 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

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Cured_one, Basically, adm jar only provides the compilation support to your implementation codebase. This jar should not be packaged with your apk as the run time is already on the devices. So you should not export the library with the apk. In eclipse, in the Properties window, there is also an "Order and Export" tab for the Java Build Path for your project. Do NOT mark the ADM .jar file as exported in this tab. Marking the .jar file as an exported entry causes your APK to use the stub implementations of the ADM API from the .jar file, rather than the actual implementations of the ADM classes that are on the device itself. Refer this link for more information. https://developer.amazon.com/sdk/adm/setup.html#IDE
10 |5000

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