Recents
Interop.Open methodOfficial Content

Open a given URL, using the appropriate application installed on the device.

Syntax#

Interop.Open(<URL>)

The <URL> parameter is the URL that will be opened.

Type returned
None

Examples#

Open a tweet url direclty from Twitter app#

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

The URL "twitter://user?screen_name=GeneXus" will be opened in the Twitter app.

Open another app from our own, or ask to install it#

Event 'OpenAnotherApp'
Composite
  &AppId = 'com.genexus.genexusmeeting'
  &AppUrl = 'market://details?id='+&AppId.trim()
   Interop.Open(&AppUrl)
EndComposite
EndEventt

In this example, we want to call another application as from our App. In this case, we are calling this app: https://play.google.com/store/apps/details?id=com.genexus.genexusmeeting. When we execute this, the Google Play will open with the option to either install this app or open it, if it´s already installed.

Make a phone call#

Event &phone.Tap
    composite
        ....
        Interop.Open('tel:' + &phone)
    endcomposite
EndEvent

In this case, when the user tap on &Phone variable, we want to do something else before dialing to that number. By this way we are overlapping  the Phone Domain default behavior.

Availability#

As from GeneXus X Evolution 3 RC (codename: Tilo)

Scope#

Objects: Smart Devices objects only in user events
Platforms:  Android and iOS

See also#

Sample#

Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.