I have implemented nifty cloud for push notification service in monaca platform(android). I can receive push notification send from nifty cloud mobile backend.
document.addEventListener("deviceready", function () {
console.log("app is ready");
window.NCMB.monaca.setDeviceToken(
"a111111111111111111111111111111111111111111111111111111111111111",//Application Key
"b111111111111111111111111111111111111111111111111111111111111111", //Client Key
"22222222222" //fcm sender id
);
}, false);
But i also need to send push notification from android. For this this i am following this
// "Application key" and "Client Key"
var ncmb = new
NCMB("a111111111111111111111111111111111111111111111111111111111111111", "b111111111111111111111111111111111111111111111111111111111111111"); //
var push = new ncmb.Push();
$scope.pushSend = function () {
push.set({
"immediateDeliveryFlag": true,
"target": ["android"],
"message": "Please input your test messge",
"deliveryExpirationTime": "3 day"
});
push.send()
.then(function (message) {
console.log(message);
})
.catch(function (err) {
console.log(err);
});
};
I can see that in my request header X-NCMB-Apps-Session-Token is missing. So why X-NCMB-Apps-Session-Token is not present in my request header and how to solve 404 (Not Found) problem.