Android 获取registrationID为空
这两天应用出现了一个线上问题,经排查是极光推送的registrationID为空导致的;
首先,设备可以收到推送消息;
但是,在application中 调用
JPushInterface.setDebugMode(Config.DEBUG);
JPushInterface.init(context);
Config.registrationID = JPushInterface.getRegistrationID(context);
始终返回空字符串;
然后,在PushReceiver广播中始终收不到ACTION_REGISTRATION_ID这样的action;
if (JPushInterface.ACTION_REGISTRATION_ID .equals(intent.getAction())) {
Config.registrationID = bundle.getString(JPushInterface.EXTRA_REGISTRATION_ID);
}
请问这样的问题要怎么排查,请指教;
谢谢