question

utsavutsav avatar image
utsavutsav asked ·

Sample code for handling Adm messages and registration notification.

Hi I am having trouble while implementing the the ADM Messsage handler. I understand that we need to create a receiver class to receive to receive broadcast messages which in turn will call a Service and that should communicate somehow with the ADM Message Handler through call back methods. The tutorial https://developer.amazon.com/sdk/adm/integrating-app.html (Implement Handling for Registration and Messages) explains how to override the handler methods. But I am unable to implement the service and communicate with the ADMMessageHander class. Can somebody share a code or smthing? Thanks, Utsav.
amazon device messaging
10 |2000 characters needed characters left characters exceeded

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 Utsavutsav, Thank you for your post. The sample code is already provided with sdk zip (Apps-SDK\DeviceMessaging\samples). There you should be able to find com.amazon.sample.admmessenger.SampleADMMessageHandler class implementation. If you still are in doubt please let us know what is being difficult to understand specifically.
10 |2000 characters needed characters left characters exceeded

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

utsavutsav avatar image
utsavutsav answered ·
Ok.. Will chk it out. Thanks for informing.
10 |2000 characters needed characters left characters exceeded

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

utsavutsav avatar image
utsavutsav answered ·
Hi Sujoy I am able to run the code. Thanks for your help. But i am getting an INVALID SENDER error while regitering my my app. Can you tell me why could that be happening. My package name registerd in the amazon portal is correct. Also do we have to send some other form of credential like Application Key etc? Thanks Utsav.
10 |2000 characters needed characters left characters exceeded

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

Bipin@Amazon avatar image
Bipin@Amazon answered ·
Hi, Through the API key the application is identified, we need to give both package name and app signature to generate the API key Check this link: https://developer.amazon.com/sdk/adm/credentials.html
10 |2000 characters needed characters left characters exceeded

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

utsavutsav avatar image
utsavutsav answered ·
Got it! Thanks Bipin and Sujoy!
10 |2000 characters needed characters left characters exceeded

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

utsavutsav avatar image
utsavutsav answered ·
10 |2000 characters needed characters left characters exceeded

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