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.sap.com';"
A SQL Anywhere consolidated database is running on the MobiLink server
Contexte et remarques
By appending a 1 to the end of your original message, and then using that message in the msg argument of an 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 statement 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.
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0|