@ johan @joe Cordova 앱은 IBM Bluemix 푸시 알림 서비스를 사용하여 사용자 기반 푸시 알림을 보낼 수 있습니다. BMSPush를 사용하여 푸시 알림을 등록하려면 아래 예제를 따르십시오.
// initialize BMSCore SDK
BMSClient.initialize("Your Push service region");
// initialize BMSPush SDK
var appGUID = "Your Push service appGUID";
var clientSecret = "Your Push service clientSecret";
// Initialize for normal push notifications
var options = {}
BMSPush.initialize(appGUID,clientSecret,options);
// Initialize for iOS actionable push notifications and custom deviceId
var options ={"categories":{
"Category_Name1":[
{
"IdentifierName":"IdentifierName_1",
"actionName":"actionName_1",
"IconName":"IconName_1"
},
{
"IdentifierName":"IdentifierName_2",
"actionName":"actionName_2",
"IconName":"IconName_2"
}
]},
"deviceId":"mydeviceId"
};
BMSPush.initialize(appGUID, clientSecret, options);
var success = function(response) { console.log("Success: " + response); };
var failure = function(response) { console.log("Error: " + response); };
// Register device for push notification without UserId
BMSPush.registerDevice(options, success, failure);
// Register device for push notification with UserId
var options = {"userId": "Your User Id value"};
BMSPush.registerDevice(options, success, failure);
Bluemix Cordova Plugin Push SDK doc 링크를 클릭하십시오.
이 방법이 효과가 있거나 문제가 생기면 알려주십시오. – joe
죄송 합니다만 샘플은 사용자 기반 알림에 대해 전혀 이야기하지 않습니다. 기기 기본 알림을 수행하는 데 문제가 없습니다. –
좋아, 네가 겪고있는 문제가 뭔지 알 겠어. 푸시 팀과 연락하여 답변을 얻으십시오. – joe