デバイス上にインストールされた適切なアプリケーションを使用して、指定された URL を開きます。
Interop.Open(<URL>)
<URL> パラメーターが、開かれる URL です。
戻されるタイプ
なし
Event 'OpenTweetGenexus'
Composite
&AppInstalled = Interop.CanOpen("twitter://user?screen_name=GeneXus")
if &AppInstalled
Interop.Open("twitter://user?screen_name=GeneXus")
endif
EndComposite
EndEvent
URL "twitter://user?screen_name=GeneXus" が Twitter アプリケーションで開きます。
Event 'OpenAnotherApp'
Composite
&AppId = 'com.genexus.genexusmeeting'
&AppUrl = 'market://details?id='+&AppId.trim()
Interop.Open(&AppUrl)
EndComposite
EndEvent
この例では、自分のアプリケーションから別のアプリケーションを呼び出します。この場合は、次のアプリケーションを呼び出します: https://play.google.com/store/apps/details?id=com.genexus.genexusmeeting。これを実行すると、Google Play が開き、このアプリケーションをインストールするのか、または既にインストールしているのであればアプリケーションを開くのかオプションが表示されます。
Event &phone.Tap
composite
....
Interop.Open('tel:'+ &phone)
endcomposite
EndEvent
この場合、ユーザーが &Phone 変数をタップしたときに、その番号をダイヤルする前に、ほかの操作を行うことができます。これにより、Phone ドメインの既定の動作と重複します。
GeneXus X Evolution 3 以降
|