无法通过bluemix控制台发送推送通知

问题描述:

我已经按照以下参考文献通知了w.r.t.机器人,无法通过bluemix控制台发送推送通知

https://github.com/ibm-bluemix-mobile-services/bms-samples-cordova-hellopush 强调文本 https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-cordova-plugin-push

不同的方案不工作,都列了出来这里, 1)通过bluemix控制台当过,我只是将通知发送到设备,它显示“通知发送交付“在bluemix控制台中。 但过了一段时间,我也没有收到移动设备的通知。

我已经配置bluemix w.r.t. firbease消息传递&所以我能够从console.firebase.com发送通知,& paralley我也在检索设备中的通知。

2)在设备注册时间,成功响应回调我没有得到,即使当应用程序,在后台我能够在设备中获取通知。

3)我想订阅主题,在这里我没有收到任何回应到设备,要么我无法发送通知到Bluemix订阅标签,因为bluemix显示标签没有订阅。 我已订阅标签在这里科尔多瓦角js应用程序。

让我知道是否有人对这些查询有任何建议。 谢谢。

请在这里找到js文件。

var ocMobile=angular.module("ocMobile",[]); 
ocMobile.factory("ocMobileFactory",function(/*global parameters */){ 
var ocMobileFactory={ 
initialize: function() { 
this.bindEvents(); 
growl.info("B4 initialize"); 
// some codebase 
}, 
bindEvents: function() { 
document.addEventListener('deviceready', this.onDeviceReady, false); 
document.addEventListener('offline', this.onOffline, false); 
document.addEventListener('resume', this.onResume, false); 
}, 
onOffline: function() { 
// somecodebase 
}, 
onResume: function() { 
// some codebase 
}, 
onDeviceReady: function() { 
console.log("omnichannel onDeviceReady"); 
growl.info("onDeviceReady"); 
this.registerNotifications(); 
}, 
registerNotifications: function() { 
growl.info("registerNotifications"); 
BMSClient.initialize(BMSClient.REGION_US_SOUTH); 
// iOS Actionable notification options. Eg : {"category_Name":[{"identifier_name_1":"action_Name_1"},{"identifier_name_2":"action_Name_2"}]} 
// Pass empty for Android 
var category = {}; 
//device returns platform , deviceid etc., parameters 
if (device.platform.toLowerCase() === "ios"){ 
category = {"category_Name":[{"identifier_name_1":"action_Name_1"},{"identifier_name_2":"action_Name_2"}]}; 
} 
growl.info("registerNotifications: category:"+category); 
BMSPush.initialize(appGuid parameter, clientSecret parameter, category); 
var success = function(successResponse) { 
// success handler display successresponse msg with token... 
//TODO once successcallback register for topic subscriptions & test it 
var successTag = function(successResponse) { 
console.log("topic subscribed response:"+successResponse); 
growl.info("topic subscribed response:"+successResponse); 
}; 
var failureTag = function(failureResponse) { 
console.log("topic subscription failed due to :"+failureResponse); 
growl.info("topic subscription failed due to :"+failureResponse); 
}; 
var tag = "YourTag"; 
BMSPush.subscribe(tag, successTag, failureTag); 

     }; 
     var failure = function(failureResponse) {       
     //failure handler display failure reason with failureresponse    
     }; 
     var options = {"userId": "Your User Id value"}; 
     BMSPush.registerDevice(options, success, failure); 

     var handleNotificationCallback = function(notification) { 
      alert(notification.message); 
     } 
     BMSPush.registerNotificationsCallback(handleNotificationCallback);    
    } 
} 
return ocMobileFactory; 
}); 

让我知道是否有人对这些查询有任何建议。

如果你没有得到通知,你应该确认您的设备使用扬鞭API注册:

https://mobile.ng.bluemix.net/imfpush/

另外,请确认您已配置Android environment correctly

如果您的环境设置正确,您的设备正在注册,并且在尝试运行基本Cordova sample时遇到同样的问题,则必须使用服务实例从Bluemix中打开支持服务单。这应该给支持团队足够的信息来解决问题。

感谢答复, 反正我已经尝试了所有的选项,但来自移动端没有收到通知回调方法。无论如何,我已经提出了票w.r.t. bluemix支持团队。