Time for action – calling the native browser application

This next test will go faster, or at least, the instructions will be briefer, as we will condense some of the steps in more concise directions, as given here:

  1. Copy the Test button on the Email card and paste it on the Browser card, just to save you some time making the button look nice.
  2. Edit the Test button script and change it to this:
    on mouseUp
      launch url "http://www.runrev.com/"
    end mouseUp
  3. Choose the Run tool and click on the Test button. You will see the RunRev home page in your default browser.

The steps for trying the app on devices is exactly the same as with the steps to test the e-mail feature. For Android:

  1. Select Android in the Standalone Application Settings.
  2. Select your Android device as the test target from the Development menu (most likely, it will still be selected from before).
  3. Select Test from the Development menu.
  4. The previous test of the app will be overwritten and the new version will be launched automatically.
  5. Try clicking on the Browser button and the Test button that you just created on the Browser card. The http://runrev.com/ page should be opened if you click on them.

For iOS:

  1. Select iOS in the standalone application settings.
  2. Redo Save as Standalone Application and then drag the app file on your device in the Organizer window of Xcode, as you did the first time.
  3. Try the Browser and Test buttons; you should see that the RunRev home page has opened inside Safari.

What just happened?

As with the Email test, adding the standard code to open a web page works for Android and iOS just as it does for a desktop computer.

If you are testing on both Android and iOS, you will notice that the behavior is different when you return after looking at a web page. With Android, you can press the back arrow button and still be on the Browser card of your stack. With iOS, the stack is restarted when you return. We will examine a solution later, where we write data to an external file, so that when the app is reopened, we can return the user before leaving the app.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.158.148