system.openURL()

Type Function
Library system.*
Return value Boolean
Revision Current Public Release (2014.2511)
Keywords system, openURL, URL

Overview

Open a web page in the browser, create an email, or call a phone number.

Executing this function will close the app and switch to the built-in browser, email, or phone app.

Syntax

system.openURL( url )
url (required)

String. One of the following:

  • Email address"mailto:nobody@mycompany.com", optionally including URL-encoded subject and body parameters, for example:
    "mailto:nobody@mycompany.com?subject=Hi%20there&body=I%20just%20wanted%20to%20say%2C%20Hi!"
  • Phone number"tel:123-456-7890"
  • Web link"http://www.coronalabs.com"

Examples

Open Web Page in Device Browser
system.openURL( "http://www.coronalabs.com" )
Send Email via Device Mail Application
system.openURL( "mailto:nobody@mycompany.com" )
Dial a Phone Number
system.openURL( "tel:123-456-7890" )