假設用戶A在上午10點在設備A上訂閱事件源推送通知,並在上午11點在設備B上訂閱事件源推送,而不取消訂閱。如果我的後端發送推送消息,兩個設備都會收到推送消息?我其實只是想將消息發送給用戶訂閱的最新設備。無論如何要做到這一點?IBM MobileFirst Platform事件源推送通知
0
A
回答
0
像Idan建議您可以檢查數據庫中的推送訂閱。 Susbscriptions有一個關聯的時間戳條目。有了這個,你可以爲用戶確定最新的一個。
然後,您可以使用WL.Server.notifyDevice(userSubscription, device, options)或WL.Server.notifyDeviceSubscription(deviceSubscription, notificationOptions)來定位特定設備。
0
如果訂閱了兩個不同的事件源的用戶則是,用戶將收到兩個事件源的通知...
沒有內置的機制,防止「重複」訂閱(相同的用戶),所以也許你可以在你的服務器上實現某種cron作業來檢查數據庫中的訂閱表並檢查是否沒有重複的訂閱。如果找到重複訂閱,請刪除較舊的訂閱。
相關問題
- 1. IBM MobileFirst Platform 7.1推送通知行爲
- 2. 推送通知IBM MobileFirst 7
- 3. IBM MobileFirst v7.1推送通知標籤
- 4. IBM MobileFirst V7.1推送通知問題
- 5. IBM MobileFirst Platform v8.7
- 6. IBM MobileFirst Platform GSK_ERROR_BAD_KEYFILE_PASSWORD
- 7. 推送短信通知Mobilefirst
- 8. 錯誤FPWSE1060W在ibm mobilefirst 7.0中發送推送通知
- 9. IBM Worklight 6.3 MobileFirst推送通知:無法訂閱
- 10. IBM MobileFirst 8 - 推送通知錯誤碼:invalid_client
- 11. IBM-Mobilefirst中的推送通知意外錯誤
- 12. 在ibm Mobilefirst中以非激活模式推送通知
- 13. IBM MobileFirst Platform Foundation v 7.1的零件號
- 14. Mobilefirst 8.0推送通知實施
- 15. 如果在使用IBM MobileFirst Platform 7.0關閉應用程序時收到了onMessage未處理的推送通知
- 16. 使用IBM MobileFirst在模擬器上不推回的推送通知
- 17. MobileFirst 7.1.0 Android FCM推送通知
- 18. 在mobilefirst中調試推送通知7.1
- 19. IBM MobileFirst Platform中的無效Cookie標頭
- 20. 安裝期間IBM MobileFirst Platform ClassPath錯誤
- 21. IBM MobileFirst Platform 7.0 - Operation Console用戶配置
- 22. IBM MobileFirst Platform安裝在Windows 8.1 64位
- 23. 在android上推送通知:IBM MQTT
- 24. IBM Worklight:推送通知設備ID
- 25. IBM Worklight - 如何設置推送通知
- 26. IBM工作燈:推送通知行爲
- 27. IBM Worklight:iOS推送通知長度限制
- 28. IBM推送通知:無效的Json
- 29. IBM Worklight - 可靠的推送通知
- 30. MobileFirst Plaform v7.1 - 管理多個推送通知