I read this link https://www.smartface.io/developer/guides/advanced/push-notifications/ then I used the fallowing code:
function Global_Events_OnStart(e) {
Notifications.remote.registerForPushNotifications({
OnSuccess : function () {
alert("Success");
alert(Notifications.remote.token);
},
OnFailure : function () {
alert("Fail");
}
});
}
I published the app However but I am getting an empty string when I use
alert(Notifications.remote.token);
I should get a token instead because I want to use it to send a notification using http://api.smartface.io/api/PushNotification/Send/{access_token}
Note :
alert("Success");
is working
How can I get the token?