Search code examples
androidioswindows-phoneibm-mobilefirsthybrid-mobile-app

Worklight 6.2 - Push notification only for one device of two devices, registered with the same userId


I have an hybrid application developed with IBM Worklight 6.2 that receives push notification. This application use the username of user as userId to register to the push notification providers.

If the user is logged in two different devices, is there a way to decide to send a push notification only for one of them?

Regards, Stefano


Solution

  • Yes, this is possible. In fact you can choose one of the two:

    a) Submit a notification to a specified user and a specified device. Use WL.Server.notifyDevice API

    b) Submit a notification to the specified device of a subscribed user. Use WL.Server.notifyDeviceSubscription API