Type Function Library system.* Return value Boolean Revision 2017.3060 Keywords system, openURL, URL See also system.canOpenURL()
Open a web page in the browser, create an email, or dial a phone number. Executing this function will close the app and switch to the
You can check whether a URL can be opened via the system.canOpenURL() function.
system.openURL( url )
String. One of the following:
"mailto:nobody@mycompany.com", optionally including "mailto:nobody@mycompany.com?subject=Hi%20there&body=I%20just%20wanted%20to%20say%2C%20Hi!""tel:123-456-7890""http://www.coronalabs.com"On Android, if dialing a phone number, you must add the CALL_PHONE permission to the build.settings file.
settings =
{
android =
{
usesPermissions =
{
"android.permission.CALL_PHONE",
},
},
}
system.openURL( "http://www.coronalabs.com" )
system.openURL( "mailto:nobody@mycompany.com" )
system.openURL( "tel:123-456-7890" )