Difference between revisions of "Application:canOpenUrl"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__NOTOC__
 
 
'''Available since:''' Gideros 2013.06<br/>
 
'''Available since:''' Gideros 2013.06<br/>
 +
'''Class:''' [[Application]]<br/>
 +
 
=== Description ===
 
=== Description ===
Tests if it is possible to open provided url using `Application:openUrl` method
+
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 lang="lua">
</source>
+
application:canOpenUrl(url)
 +
</syntaxhighlight>
 +
 
 
=== Parameters ===
 
=== Parameters ===
'''url''': (string) url to test if can be opened <br/>
+
'''url''': (string) url to test if can be opened
 +
 
 +
=== Example ===
 +
<syntaxhighlight lang="lua">
 +
print(application:canOpenUrl("http://w3c.org"))
 +
</syntaxhighlight>
 +
 
 +
 
 +
{{Application}}

Latest revision as of 16:57, 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).

application:canOpenUrl(url)

Parameters

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

Example

print(application:canOpenUrl("http://w3c.org"))