question

Marcel Tricolici avatar image
Marcel Tricolici asked

ADMManifest.checkManifestAuthoredProperly - RuntimeException: Stub!

I've started integration of ADM according to the documentation. 1. added amazon-device-messaging-1.0.1.jar to the project.... 2. created 2 classes : AdmReceiver extends ADMMessageReceiver & AdmService extends ADMMessageHandlerBase (as in sample) 3. Adjusted Manifest file according to the documentation and.. added ADMManifest.checkManifestAuthoredProperly(this) in method OnResume of the main activity (to verify manifest - as recommended in documentation). When I start the application in kindle .... application dies with error: ADMManifest.checkManifestAuthoredProperly - RuntimeException: Stub! Why?
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.

adm-support avatar image
adm-support answered
If you receive this exception it is because you are compiling the ADM jar directly into your APK instead of soft linking against it. Please see our integration guide: https://developer.amazon.com/public/apis/engage/device-messaging/tech-docs/03-setting-up-adm https://developer.amazon.com/public/apis/engage/device-messaging/tech-docs/04-integrating-your-app-with-adm
10 |5000

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

Marcel Tricolici avatar image
Marcel Tricolici answered
Thank you very much!
10 |5000

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

Jagriti Goyal avatar image
Jagriti Goyal answered
I am getting the same exception. "RuntimeException: Stub!" Cant understand with the error description what is the cause. I have not checked amazon-device-messaging-1.0.1.jar in Order and Export tab as written in documentation. But still getting the error. If some thing wrong with the manifest code it should give a proper understandable error !! Please Help
10 |5000

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

adm-support avatar image
adm-support answered
Hi u2opian, I am from ADM's dev team. This is not a manifest issue. Are you generating your APK through Eclipse or through ant or gradle? I'm thinking you might be getting the ADM jar compiled into your apk some other way besides Eclipse. The jar we provide has only stub implementations and the only way you'd ever get this exception is if the ADM classes were being built directly into your APK.
10 |5000

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

two1stnamz avatar image
two1stnamz answered
Was this ever resolved? I too am getting this exception. I understand that it is because the "SDK" jars are actually only for compile time and not to be built into the actual APK. I understand the the actual implementation resides on the devices them selves. With that said, I have not been able to successfully build an apk using Device Messaging. Could you provide a working build.gradle file?
10 |5000

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, Your understanding is correct. We are unable provide the complete gradle script which can accomplish this. But you should be able to configure the "provided" library like below, [b]configurations{ provided } dependencies{ //Add ADM jar here provided '...' } //Include provided for compilation sourceSets.main.compileClasspath += configurations.provided // optional: if using 'idea' plugin idea { module{ scopes.PROVIDED.plus += configurations.provided } } // optional: if using 'eclipse' plugin eclipse { classpath { plusConfigurations += configurations.provided } } [/b] Please refer below thread where developers figured out how solve this for Amazon Maps jar. https://forums.developer.amazon.com/forums/thread.jspa?threadID=1220&tstart=0
10 |5000

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