I am trying to integrate ADM into my application for the first time. Building with ant and followed the directions at
https://developer.amazon.com/sdk/adm/setup.html Everything was compiling with the ADM Receiver importing the com.amazon.device.messaging.* package, so I thought things were ok. Shortly after app init I run the ADMManifest.checkManifestAuthoredProperly function. As soon as this happens my app crashes. I've seen some other cases where people were incorrectly linking in the amazon-device-messaging-1.0.1.jar file in the /libs directory, and the crash warns about the function being a 'Stub!'. This is not my case. Being suspicious of the ext_lib working correctly, I removed the declaration from the build.xml file and the reference to the jar file. After a clean and build again, I was able to compile again this time without the reference to the jar archive. This seemed really suspicious to me, but I don't really know what I'm doing. Any advice would be greatly appreciated. Here are a few things for you: .classpath :
http://hastebin.com/difuhutaki.tex build.xml :
using the .jar file as an internal 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. This is the only reason. I have used the dependencies of the amazon-device-messaging-1.0.1.jar scope as "provided" in the device. I have used the below code in oncreate -- Log.i(TAG, "before check manifest"); ADMManifest.checkManifestAuthoredProperly(this); Log.i(TAG, "after check manifest"); /* Register app with ADM. */ register(); the app don't crash. Can you check if the jar has slipped inside the apk, while packing. Do not copy the amazon-device-messaging-1.0.1.jar file to the libs directory for your project, because this bundles the stub classes into your app, causing your app to crash. Hope this info helps
Hi Bipin, Thanks for the reply. Firstly, one thing that I did forget to mention is that I am using the Unity plugin to implement ADM, though I am compiling with ant. I understand the jar file only contain stub implementations. I am also 100% positive it is [b]not[/b] being brought into the APK because of my ant output. Here's a link to my output:
http://hastebin.com/tidifadogu.coffee My previous post had a copy of my build.xml, is that the appropriate usage for including the jar?
The previous link are no more valid, I need to understand How the project is getting build I see the build.xml is not taking the amazon-device-messaging-XXX.jar in the packaging process. I need to deep dive into the project and check the logs and debug, Can you raise a contact us:
https://developer.amazon.com/help/contactus.html Please mention in detail the work environment, i will replicate your scenario. Thanks