问题
There is a field called "device" in deviceSubscription. I assume that it is corresponding to the device ID for the device. And this value is used as a parameter in WL.Server.notifyDevice(userSubscription, device, options) to submit notification for a specific device for a user.
However, when I re-install the apps again, the value in deviceSubscription.device is changed. Therefore, there are different device ID subscribing to an event source although they are actually the same device.
May I know where deviceSubscription.device comes from?
Thanks a lot.
回答1:
The name "Device ID" is indeed confusing. It does not reference the physical device, rather it references to the application. Thus when you re-install the application, you get a different value for it (it is generated by the client-side framework).
来源:https://stackoverflow.com/questions/15471046/ibm-worklight-push-notification-device-id