Hello all, I have done this so far: - I have integrated ADM with one of my apps, and used the same example code listed in the Integration guide provided by Amazon. - I have run ADMManifest.checkManifestAuthoredProperly() and everything seems fine. - In the integration guide, the Receiver is a public static class inside the ADMMessageHandlerBase class, but I did it in a different file for convenience. - I have set the API KEY in "Device Messaging" section and put it in "
api_key.txt" in assets folder in my app. To create the API KEY, I have used a "test" keystore to sign my app and generate the MD5 fingerprint (in the release version, we dont sign our apps, we just use Amazon DRM). - To run the app, using Android SDK, I tried both with "run as" option and exporting a signed APK and installing it in our kindle devices. PROBLEM: The app starts fine, but adm.getRegistrationId() gives always null. And it never calls onRegister method of ADMMessageHandlerBase. It never calls onRegistrationError either, so I have no error messages to start thinking on something. Note: I am pretty sure I am not exporting the amazon-device-messaging jar, because I am not getting the "Stub!" error. Thanks!
Hello again, Eze here (from the account where the app was created). I misspelled "onRegistered", that was what I wanted to say, not "onRegister". The Manifest seems right to me. I should have said that we also use Google Cloud messaging for the apps in google playstore, so we have both receivers/services declared in our manifest:
So far, we have tested it in our Kindle Fire HD X43Z60 (OS version: 4.0.3). The ADMMessageHandlerBase class is pretty much the same as the one in "Getting Started...", with the exception that the Receiver is declared in another file. If you find something weird in the manifest please tell me. Otherwise I send you a Contact Us form, so we can work this in a better way. Thanks for your time.
Thank you for reaching out. There are couple of things to check.
1. The registration acknowledgement method name is onRegistered in abstract class ADMMessageHandlerBase
- protected abstract void onRegistered(String paramString);
I assume that you have the correct method name overridden in your subclass of ADMMessageHandlerBase
2. Could please check that the subclass of ADMMessageHandlerBase is declared as service in manifest. e.g.
This does not get caught by ADMManifest.checkManifestAuthoredProperly(), but if it's missing in manifest then onRegistered() would not be called. Can you share your whole manifest please?
3. How many devices you have checked it? Can you tell us the OS versions of tested handsets?
4. Since you are not posting from the account where you have created the app and security profile, I am not able to track the information of the app in question. To investigate the issue further we need the app or security profile (in which account it has been created. The best bet should be to raise a ContactUs from the actual account and provide us the security profile information over there. Please mention there that you are redirected from this thread.