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 http://www.ianywhere.com';"
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.
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"
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.
Discuss this page in DocCommentXchange.
|Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1|