Home > Articles > Networking > Wireless/High Speed/Optical

  • Print
  • + Share This
This chapter is from the book

Same Application, Different Browser

So, you've created your first application and have viewed it on the Yospace phone simulator, which shows what the application will look like when accessed using a Nokia 7110 browser.

But you're probably asking yourself what this application will look like in another browser. No problem. For a quick view, just right-click the Welcome deck again and choose Deck, New Generic Up Browser. Figure 3.22 shows what you'll see.


This browser is available only if you've installed the UP.SDK from Openwave, as suggested in Chapter 2. This software developer's kit is available on the CD at the end of the book and installation instructions are included in Appendix A, "Setup."

Figure 3.22
Your application runs in another simulator.

This simple application runs well without modifications in the UP.Simulator. However, to take advantage of the differences between the browsers, you really should re-create the application for another browser. It may seem tedious to have to write an application twice, but in the current state of the WAP industry, many gurus recommend that we do so.

Happily, it's an easy task in MobileDev. Try it out by re-creating the Hello World application for another browser.

Create the First Card

Create the first deck and card:

  1. Double-click anywhere on the Application Map to display the Add Deck dialog box.

  2. In Add Deck, double-click Display Deck Wizard to activate the wizard.

  3. In the first page of the wizard, type Welcome_UP as the Deck Name. You'll need to add the "_UP" because deck names must be unique within a project.

  4. Accept the default title or change it to something more imaginative if you'd like.

  5. Type Greetings, galaxy! as the display text.

  6. Make sure that Show Advanced Options is checked and click Next.

  7. In Advanced Options, shown in Figure 3.23, change the browser brand to UP.Browser and uncheck Enable Back Key. MobileDev lets you develop multiple applications having different browsers in the same project. Notice that the document version changes from WML 1.1 to UP.SDK 3.2.

  8. Figure 3.23
    Changing the browser brand customizes your application for another simulator.

  9. Click Next and then Finish.

Create the Second Card

Use the Display Deck Wizard again to create the second card:

  1. Double-click the Application Map to display the Add Deck dialog box.

  2. Double-click Display Deck Wizard.

  3. Type More_UP as the Deck Name.

  4. Type and Welcome to MobileDev as the Display Text and click Next.

  5. Change the browser brand to UP.Browser.

  6. If you know you are going to be creating a whole series of decks and cards using a different setting than what was specified when the project was created, change the default setting in the Project tab of the Settings dialog box (click Tools, Settings).

  7. Click Next and Finish.

Create the Link

Now link the two decks. If you don't remember how to use the Link Wizard, see the preceding sections.

  1. Draw a link between Welcome_UP and More_UP to launch the Link Wizard.

  2. Select Define a New Link as the link type.

  3. Change the Link Text to More. The other defaults are fine.

  4. Click Next and then Finish.

Compare the Applications

MobileDev generates different markup code for each browser brand. If you'd like to compare the code, just double-click the Welcome and Welcome_UP decks and view them in the Document Editor. For example, note how the title concept is treated differently: in Nokia phones, titles are displayed as headers, whereas in UP phones, titles are treated as standard text.

This is the code generated for the Nokia browser brand:

<card id="Welcome" title="HelloWorld">
 <p id="Welcome:" mode="wrap">
  Greetings, galaxy!

Compare it to the code generated for the UP.Browser brand:

<card id="Welcome_UP">
  Greetings, galaxy!


In this chapter, you learned about decks, cards, and links, and you built your first WAP application (twice!) using the Display Deck and Link Wizards. You may have customized the look of your Application Map to incorporate your favorite font or colors, and you probably took a quick look at the WML code that MobileDev generated for your application. Best of all, you were able to see your tiny little application in action, running on the Yospace simulator and the UP.Simulator.

In Chapter 4, "Before Building," you'll learn about the basic technology choices that you should resolve before building an actual application.


  • + Share This
  • 🔖 Save To Your Account