One of the key components of the UP.SDK is the UP.Simulator, a Windows application that emulates the behavior of real UP.Phones. The UP.Simulator lets you load, test, and debug your WML code.
The UP.Simulator has two modes:
HTTP direct--in this mode (the default configuration), the UP.Simulator loads WML directly from a Web server, bypassing the UP.Link Server. This mode is useful for initial testing of your WML code because it requires no special setup.
UP.Link--in this mode, the UP.Simulator interacts with an UP.Link Server just like a real UP.Phone. This mode requires access to an UP.Link Server, and you must register the UP.Simulator on the UP.Link Server before you can use it. You must use this mode to test UP.Link features that run on the server, for example, bookmarks, fax services, and notifications.
NOTE For more information about registering and using the UP.Simulator (including configuring it for non-English languages), see the UP.SDK Tools and APIs Reference. For instructions on the UP.Phone user interface, see the quick reference, Using the UP.Browser.
To start the UP.Simulator:
Make sure your computer is connected to the Internet.
Although you can use the UP.Simulator to view local files, you must have an Internet connection to access the Openwave Developer Home card and other WML sites on the Internet.
Choose Programs>UP.SDK 4.1>UP.Simulator from the Windows Start menu.
The UP.Simulator connects to the Openwave Developer Web site and displays the Developer Home card. The Developer Home card, shown in Figure 3-1, is the default start location and lets you navigate to some sample HDML and WML services.
If the UP.Simulator displays an error message instead of the Developer Home card, consult the UP.SDK Tools and APIs Reference for troubleshooting instructions.
The default UP.Simulator keypad provides the following navigation keys.
By default, the first card the UP.Simulator displays is the Developer Home card. It contains a <select> element with three items. To choose an item, click the
and
arrows to position the cursor (the
symbol) on the item you want, then click the ACCEPT function key below the OK label (see Figure 3-1).
For example, to navigate to the WML Samples card, move the cursor to the third item and click the ACCEPT key. If a card contains more items than the UP.Simulator can display on one screen, click the
arrow to scroll down and view the additional items.
Just as a Web browser has a Back command or button, all UP.Phones have a Back mechanism. As shown in Figure 3-2 above, the default UP.Simulator provides a BACK function key. The UP.Browser maintains a history of the cards you have accessed, allowing you to navigate backwards through the stack by clicking the BACK key. Unlike conventional Web browsers, UP.Phones do not have a Forward mechanism. To go forward, you must retrace your path by selecting the appropriate function keys.
Like conventional Web browsers, UP.Phones also have a Home mechanism. As shown in Figure 3-2 above, the default UP.Simulator provides a HOME function key. You can click on this key at any time to display your Home card. The default Home card for the UP.Simulator is:
http://developer.phone.com/dev/wml/devhome4.wml
If desired, you can specify a WML deck you have created as your Home card. For more information, see Chapter 1of the UP.SDK Tools and APIs Reference.
On a real UP.Phone, users enter text by pressing keys on the keypad (see Figure 3-1). To enter text in the UP.Simulator, you can either use your computer keyboard or use the mouse to click on the keypad area of the screen. As shown in Figure 3-3, cards that allow text entry display the current text entry mode above the OPTIONS function key (for information about the different modes, see the quick reference, Using the UP.Browser).
In ALPHA and SMART modes, each key enters different characters depending on the number of times you click it (or press it on a real UP.Phone). In ALPHA mode, the device cycles through the characters in the same order every time. In SMART mode, the device cycles through the characters based on your previous entries--in other words, it tries to guess the character you want using a word-recognition algorithm.
The following table identifies the characters for each key in the generic UP.Simulator:
Figure 3-3 illustrates the process of entering the text "Send budget report!" using the ALPHA text entry mode.
ALPHA mode
NOTE
Some UP.Phones have a SHIFT key that lets you switch between upper and lower case characters. To change case in the UP.Simulator, you must use the Shift key on your computer keyboard.
To navigate to a specific WML deck, enter the URL in the Go field and press Enter (on your computer keyboard). You can also select previously visited locations from the Go drop down menu.