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.

有帮助吗?

解决方案

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)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top