2

Hi I am running ADMMessenger sample application provided with SDK.

in which I am not able to get Registration ID in register() 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 onRegistrationError() method of SampleADMMessageHandler is calling.

and error at there is ERROR_SERVICE_NOT_AVAILABLE

I can not understand what is problem, please help me.

Charles
  • 50,943
  • 13
  • 104
  • 142
Jignesh Ansodariya
  • 12,583
  • 24
  • 81
  • 113
  • how have you created your emulator image - is it a generic image, or are you using the Kindle Fire (ICS / 4.0.3) images? also have you logged in as a user in the emulator – Offbeatmammal Jun 06 '13 at 20:59
  • Thanks! @Offbeatmammal I logged with amazon account and issue solved. and you can post this comment as answer I will accept it. – Jignesh Ansodariya Jun 07 '13 at 04:33

1 Answers1

1

For the service to work correctly you need to be using the Kindle image (not a generic Android one) and also make sure you have logged into your account on the device (pull down the status bar at the top and ensure you have selected an account)

Offbeatmammal
  • 7,970
  • 2
  • 33
  • 52