Open a web page in the browser; create an email; or call a phone number.
Note: Executing this function will close the app and switch to the built-in browser, email or phone app.
1 | system.openURL( url ) |
system.openURL( "http://www.anscamobile.com" ) -- open URL in browser
url
url can be one of the following:
Nothing.
I could use that ability as well.
Perhaps built into network.setStatusListener() which could return the reachability of the URL scheme in the callback with something like event.canOpenURL
--Woof!
Is there some way to open an email and embed in the email body an attachment of a screenshot?
Have the same question with jwwtaker.
Tel: doesn't work on Android. Has anyone had any luck with it?
Regards,
Jordan Schuetz
Ninja Pig Studios
On android if you do
system.openURL( "market://details?id=com.yourdoman.packagename" )
It will link directly to an apps market page.
Usefull for promoting any other apps you might have.
This function returns a boolean (contrary to what is stated here) which can be used to check if an app is installed. for example
local isAppInstalled = system.openURL("skype://")
if isAppInstalled == false then
--open appstore for skype if it is not installed
system.openURL("http://itunes.apple.com/br/app/skype/id304878510?mt=8")
end
Tested on build 732
Does anyone find a workaround to make calls from an android device?
I was able to get phone calls working on Android with the following permission in my build.settings file:
1 2 3 | androidPermissions = { "android.permission.CALL_PHONE" } |
Also, in case anyone is wondering how to do extensions, you can use a ; after the telephone #:
1 | "123-456-7890;7777" |
It would be nice to be able to see if a certain app is installed.
To do this other schemes would need to be supported.
A native call to [[UIApplication sharedApplication] canOpenURL:url]
Maybe some sort of callback with urlRequest...