使用科爾多瓦插件ktekosi-phonegap-plugin-push
,我得到的registrationID
推送通知:registrationID不斷變化
var push = PushNotification.init({ "android": {"senderID": "my sender ID"}});
push.on('registration', function(data) {
console.log(data.registrationId);
document.getElementById("fcm_id").innerHTML = data.registrationId;
});
這樣我就可以通過服務器使用它通過FCM發送通知。
我怎樣才能得到這個固定的registrationID
?這是一個應用程序特定的ID還是一個用戶特定的ID?
你有什麼問題?改變註冊ID或發送消息 –
當我加載應用程序與此代碼上面的註冊ID正在改變時間 – Matoeil
是ithis ID是一個appID或'已安裝的應用程序'的實例ID。換句話說,它是應用特定的還是用戶特定的? – Matoeil