最近のアクセス:
Interop.Open メソッド

デバイス上にインストールされた適切なアプリケーションを使用して、指定された URL を開きます。

構文

Interop.Open(<URL>)
<URL> パラメーターが、開かれる URL です。
戻されるタイプ
なし

Twitter アプリケーションから直接ツイート 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 以降

適用範囲

オブジェクト: スマート デバイス オブジェクト (ユーザーイベント内のみ)
対応しているプラットフォーム:  Android、iOS

参考情報

サンプル





サブページ
Created: 15/01/07 22:49 by Admin Last update: 21/05/21 03:32 by Admin
カテゴリ
Powered by GXwiki 3.0