Official Content

Indicates whether the device can open a specific URL.

Syntax

Interop.CanOpen(<URL>)

Where:

<URL>
           The <URL> parameter is the URL to verify. The method determines whether it can be opened or not.

Type Returned:

Boolean, indicating if the URL can be opened or not.

Scope

Objects: Objects for Native Mobile applications development only in user event
Generators: Android, Apple

Sample

Event 'OpenTweetGenexus'
Composite
  &AppInstalled = Interop.CanOpen("twitter://user?screen_name=GeneXus")
  if &AppInstalled
   Interop.Open("twitter://user?screen_name=GeneXus")
  endif
EndComposite
EndEventt

In this example, the URL "twitter://user?screen_name=GeneXus" will be opened only if the Twitter app is installed on the device.

Notes:

  • On iOS, this method returns False unless the Application Queries Schemes property is set for the URL scheme.
  • On Android 11 and higher, this method may return False unless the URL scheme of the target application is explicitly declared in the AndroidManifest.xml file. This behavior is due to Android package visibility restrictions. For more details, see SAC #60919.

Sample KB

This KB provides an additional example of using Interop.CanOpen.

See Also

Interop external object
Interop.Open method

 

Last update: December 2025 | © GeneXus. All rights reserved. GeneXus Powered by Globant