question

jack-ccc10 avatar image
jack-ccc10 asked

Can not get Registration ID in Emulator.

Hi I am running ADMMessenger sample application provided with SDK. in which I am not able to get ADMMessenger in [b]register()[/b] method of MainActivity. Method is like this. private void register() { final ADM adm = new ADM(this); if (adm.isSupported()) { if(adm.getRegistrationId() == null) { adm.startRegister(); } else { // final MyServerMsgHandler srv = new MyServerMsgHandler(); // srv.registerAppInstance(getApplicationContext(), adm.getRegistrationId()); } Log.v("log_tag","Reg_id:: "+adm.getRegistrationId()); } } in Log cat I am always getting Reg_id:: null and [b]onRegistrationError()[/b] method of SampleADMMessageHandler is calling. I can not understand what is problem, please help me.
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.

dasturrock avatar image
dasturrock answered
Hi Jack, when OnRegistrationError is called your logcat should show: "Received Error:" + some ADMConstant, such as INVALID_SENDER. Can you post this so we can see what the error is? It may be a problem with the API key. adm.startRegister runs in the background and onRegistered will be called when it succeeds. That is where you should be able to get the Registration ID.
10 |5000

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

jack-ccc10 avatar image
jack-ccc10 answered
My problem is that, I was not logged with any amazon account. I logged and issue solved. Thanks to all who 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.