由于某些原因,当我尝试在黑莓曲线上注册推送服务时,我不断收到PushApplicationStatus.STATUS_NOT_REGISTERED。它在火炬,风暴中效果很好,但在大胆和曲线上有这么多问题。推送服务不在黑莓曲线上注册
这里是我如何注册推送服务代码:
int port = Constant.Net.PUSH_PORT;
String appId = Constant.Net.APP_PUSH_ID;
String bpasUrl = Constant.Net.BPAS_URL;
ApplicationDescriptor ad = ApplicationDescriptor.currentApplicationDescriptor();
byte serverType = PushApplicationDescriptor.SERVER_TYPE_BPAS;
PushApplicationDescriptor pad = new PushApplicationDescriptor(appId, port, bpasUrl, serverType, ad);
PushApplicationStatus status = PushApplicationRegistry.getStatus(pad);
byte bstatus = status.getStatus();
if (bstatus == PushApplicationStatus.STATUS_ACTIVE)
{
L.devout("BpasProtocol: already registered");
AlertDialog.alert(LH.getString(LH.LBL_PUSH_REGISTERED));
return;
}
else if (bstatus == PushApplicationStatus.STATUS_PENDING)
{
L.devout("BpasProtocol: status pending");
AlertDialog.alert(LH.getString(LH.LBL_PUSH_REGISTERED));
return;
}
else if (bstatus == PushApplicationStatus.REASON_REJECTED_BY_SERVER)
{
L.devout("BpasProtocol: rejected by server");
AlertDialog.alert("REASON_REJECTED_BY_SERVER");
return;
}
else if (bstatus == PushApplicationStatus.REASON_INVALID_PARAMETERS)
{
L.devout("BpasProtocol: REASON_INVALID_PARAMETERS");
AlertDialog.alert("REASON_INVALID_PARAMETERS");
return;
}
else if (bstatus == PushApplicationStatus.REASON_SIM_CHANGE)
{
L.devout("BpasProtocol: REASON_SIM_CHANGE");
AlertDialog.alert("REASON_SIM_CHANGE");
return;
}
else if (bstatus == PushApplicationStatus.REASON_NETWORK_ERROR)
{
L.devout("BpasProtocol: REASON_NETWORK_ERROR");
AlertDialog.alert("REASON_NETWORK_ERROR");
return;
}
else if (bstatus == PushApplicationStatus.REASON_API_CALL)
{
L.devout("BpasProtocol: REASON_API_CALL");
AlertDialog.alert("REASON_API_CALL");
return;
}
else if (bstatus == PushApplicationStatus.STATUS_NOT_REGISTERED)
{
L.devout("BpasProtocol: Status not registered");
AlertDialog.alert("STATUS_NOT_REGISTERED");
return;
}
else if (bstatus == PushApplicationStatus.STATUS_FAILED)
{
L.devout("BpasProtocol: Status failed");
return;
}
else
{
L.devout("BpasProtocol: scheduling registration");
PushApplicationRegistry.registerApplication(pad);
AlertDialog.alert(LH.getString(LH.LBL_PUSH_REGISTERED));
}
任何帮助,将不胜感激,因为它永远摆脱RIM任何回应。