[Cover] [Previous Section] [Next Section] [Index]

Current chapter: Notification Utilities
Section 25 out of 79 total sections , Section 7 out of 7 sections in this chapter


Sending notifications with upnotify

The upnotify utility (sdk_installdir/bin/upnotify) allows you to send and manage notifications from the command-line on UNIX. Specifically, it allows you to:

The upnotify utility is designed primarily for prototyping and testing applications that send notifications. For production applications, it is recommended that you use the COM interface or the C++ Notification API, which are described in the UP.SDK Developer's Guide.


IMPORTANT     Before you use upnotify, it is recommended that you set the UPSDK environment variable to the directory in which you installed the UP.SDK. If you don't set this variable, you will need to specify a lot of absolute paths at the command-line.

To use the upnotify utility to send secure notifications, you must first obtain and install a certificate as described in Installing certificates with upcerins.

The following is the syntax for upnotify:



Example: posting an alert notification

To send the alert notification depicted in Figure 2-3 to the subscriber with the following ID:

you could use the following upnotify call:

FIGURE  2-3.     Alert notification in the UP.Phone Inbox

When the user chooses this alert and presses ACCEPT, the phone displays the Unwired Planet Developer Home card.



Example: posting a prefetch notification

To send a prefetch notification that loads the following URL:

to the phone of the subscriber with the ID 85985209-411_updev.uplanet.com, set the UPSDK environment variable to the directory in which you installed the UP.SDK. Then use the following upnotify call:


IMPORTANT     Some of the command-line examples in this chapter appear on several lines. This is only because of space limitations. When you type these commands, type each one on a single line.

If you do not specify the -k option, upnotify prompts you for a password.

After you enter the upnotify command and provide the certificate password, the command generates status messages. For example, the example command above generates the following messages:



Example: viewing notification status

To view the status of the notification in the preceding example, use the following upnotify command:


IMPORTANT     You must register the UP.Simulator on an UP.Link server and run it in UP.Link mode to test notifications. You cannot test notifications in HTTP direct mode. For more information on using the UP.Simulator in UP.Link mode, see Chapter 1.


[Cover] [Previous Section] [Next Section] [Index]

Current chapter: Notification Utilities
Section 25 out of 79 total sections , Section 7 out of 7 sections in this chapter


Copyright © 1999, Unwired Planet, Inc. All rights reserved.