Difference between revisions of "Application:canOpenUrl"

From GiderosMobile
m
m (Text replacement - "</source" to "</syntaxhighlight")
Line 7: Line 7:
 
<source lang="lua">
 
<source lang="lua">
 
application:canOpenUrl(url)
 
application:canOpenUrl(url)
</source>
+
</syntaxhighlight>
  
 
=== Parameters ===
 
=== Parameters ===
Line 15: Line 15:
 
<source lang="lua">
 
<source lang="lua">
 
print(application:canOpenUrl("http://w3c.org"))
 
print(application:canOpenUrl("http://w3c.org"))
</source>
+
</syntaxhighlight>
  
  
 
{{Application}}
 
{{Application}}

Revision as of 16:54, 12 July 2023

Available since: Gideros 2013.06
Class: Application

Description

Tests if it is possible to open provided url using Application:openUrl method (it checks only app permissions, so 'true' may be returned even if device is offline).

<source lang="lua"> application:canOpenUrl(url) </syntaxhighlight>

Parameters

url: (string) url to test if can be opened

Example

<source lang="lua"> print(application:canOpenUrl("http://w3c.org")) </syntaxhighlight>