Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.1 » MobiLink - Server-Initiated Synchronization » Server-initiated synchronization advanced topics


Sending a push notification using the sa_send_udp system procedure

A SQL Anywhere consolidated database can use the sa_send_udp system procedure to send push notifications to a device through a UDP gateway. This method is an alternative to sending push notifications with Notifiers.


  • A MobiLink Listener is set up on a device and listening for push notifications

  • Internet Explorer is installed on the device

  • The following command was run on the device:

    dblsn -l "message=RunBrowser;action='START iexplore.exe';"
  • A SQL Anywhere consolidated database is running on the MobiLink server

Context and remarks

By appending a 1 to the end of your original message, and then using that message in the msg argument of a sa_send_udp system procedure, you send the original message to a MobiLink Listener.

 Send a push notification using the sa_send_udp system procedure
  1. Run Interactive SQL and connect to your consolidated database using a command like the one below, replacing consdb_source_name with the ODBC name of your consolidated database.

    dbisql -c "dsn=consdb_source_name"
  2. Execute the following command to send the push notification:

    CALL sa_send_udp('device_ip_address', 5001, 'RunBrowser1')

    The first argument ensures that the push notification is sent to the correct device. Replace device_ip_address with the IP address of the device. If you are running the MobiLink Listener on the same computer as the MobiLink server, use localhost.

    The second argument is the port number. By default, MobiLink Listeners use port 5001 to listen for UDP.

    The third argument is the message to send with a 1 appended at the end. By appending a 1, which is a reserved server-initiated synchronization protocol, the RunBrowser message is sent to the device using a UDP gateway.


When the system call is executed, the RunBrowser message is sent to the device, causing the device to run Internet Explorer and load the iAnywhere home page.



 See also