question

"cured_one" avatar image
"cured_one" asked

Debugging registration

I am calling adm.startRegister(), however i am never receiving onRegistered event. Moreover, there is no indication that the operation failed, as onRegistrationError is not called either. There is no related output in LogCat. So my question is - how do i debug that? Does that failure indicate failure in ADM setup? 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.

Bipin@Amazon avatar image
Bipin@Amazon answered
you can check if the service and receiver are in place. Mainly check the manifest and compare with this rough sample. For detail go to : https://developer.amazon.com/sdk/adm/integrating-app.html
10 |5000

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

"cured_one" avatar image
"cured_one" answered
That i have verified. Manifest is in place.
10 |5000

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

"cured_one" avatar image
"cured_one" answered
I did find extra message in LogCat (see below). What is the fix for that? 06-29 23:12:21.486: E/ActivityThread(28507): Service com.amazon.device.messaging.PrivateADMRegistrationService has leaked ServiceConnection com.amazon.identity.auth.device.authorization.api.AmazonCredentialManager$CredentialManagerServiceConnection@415ccc58 that was originally bound here 06-29 23:12:21.486: E/ActivityThread(28507): android.app.ServiceConnectionLeaked: Service com.amazon.device.messaging.PrivateADMRegistrationService has leaked ServiceConnection com.amazon.identity.auth.device.authorization.api.AmazonCredentialManager$CredentialManagerServiceConnection@415ccc58 that was originally bound here Thanks!
10 |5000

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, This is caused because, if the activity destroys and the ServiceConnection is still binded to the running service. so you need to Unbind the service before destroying your Activity.
10 |5000

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

"cured_one" avatar image
"cured_one" answered
Huh? I understand the message, but do not see how it is applicable to the application. I do not bind to com.amazon.device.messaging.PrivateADMRegistrationService explicitly, so why should i unbind explicitly? Can you be more detailed? Can you point to the example, perhaps using com.amazon.sample.admmessenger? By the way, other post here ( https://forums.developer.amazon.com/forums/thread.jspa?threadID=1137) suggests it may have different reason; i did verify that ADM is enabled as suggested there. Cheers,
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 Cured One, I have sent you sample code of ADM implementation in your registered email id. Please have a look. Thank you for posting.
10 |5000

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

havenliu avatar image
havenliu answered
I have the same problem,can you send me sample code please!!
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 Havenliu, I have sent you sample code to your registered email id. Thank you for posting.
10 |5000

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

Joseph joshua avatar image
Joseph joshua answered
Hello, I am too having the same problem. Could you send me the sample code? Thanks
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
10 |5000

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