Tutorial 14 - How to invoke browser application

What you will learn in this Tutorial

How to use INVOKE_BROWSER action

Download Source Code - Tutorials - Source for this tutorial is in appemble-tutorial-actions
Reference Actions, INVOKE_BROWSER action
Good Read WEBVIEW control

Introduction

INVOKE_BROWSER action is used to invoke browser. Typical use is providing a link to a website.

How to use INVOKE_BROWSER action

In order to invoke browser, you need to use INVOKE_BROWSER action.

One of the use cases is to use this action for providing web links.

<control type="TEXT" x="2" y="3" width="57" height="8" appearance_name="blue" data_type="VARCHAR" default_value="http://www.appemble.com">
    <actions>
        <action event_list="TAP" action_name="INVOKE_BROWSER"
            target="" input_parameter_list="http://www.appemble.com" />
    </actions>
    </control>

In the code below (part of map-urlactions.xml) allows the user enter url. Once the user taps on INVOKE_BROWSER button, browser application is invoked with that url address.

<control type="EDIT" x="35" y="31" width="57" height="8" appearance_name="edit_box" data_type="VARCHAR"
         field_name="url" size="80"/>
<control type="PUSHBUTTON" x="35" y="42" width="57" height="8" appearance_name="blue_button" data_type="VARCHAR"
             default_value="INVOKE_BROWSER">
            <actions>
                         <action event_list="TAP" action_name="INVOKE_BROWSER"
                                  input_parameter_list="url" />
                    </actions>
    </control>

Run the appemble-tutorial-actions app. If you have not downloaded tutorial source code, click on Download Source Code - Tutorials

Android - Right click on appemble-tutorial-actions and click on Run as Android application.

iOS - Select scheme appemble-tutorial-actions and iPhone/iPad x.x simulator. Click on Product -> Run.

Enter the url and tap on button INVOKE_BROWSER. It invokes the browser application.

Good Read

WEBVIEW control - If you want to display html content in the app use WEBVIEW control.