Share via


VpnManager.ProvisionVpnProfile(PlatformVpnProfile) メソッド

定義

呼び出し元アプリのパッケージ名にキーを付けた VpnProfile 構成をインストールします。

[Android.Runtime.Register("provisionVpnProfile", "(Landroid/net/PlatformVpnProfile;)Landroid/content/Intent;", "GetProvisionVpnProfile_Landroid_net_PlatformVpnProfile_Handler", ApiSince=30)]
public virtual Android.Content.Intent? ProvisionVpnProfile (Android.Net.PlatformVpnProfile profile);
[<Android.Runtime.Register("provisionVpnProfile", "(Landroid/net/PlatformVpnProfile;)Landroid/content/Intent;", "GetProvisionVpnProfile_Landroid_net_PlatformVpnProfile_Handler", ApiSince=30)>]
abstract member ProvisionVpnProfile : Android.Net.PlatformVpnProfile -> Android.Content.Intent
override this.ProvisionVpnProfile : Android.Net.PlatformVpnProfile -> Android.Content.Intent

パラメーター

profile
PlatformVpnProfile

このパッケージによって提供される VpnProfile。 このパッケージに格納されている以前の VpnProfile をオーバーライドします。

戻り値

VPN を開始するためのユーザーの同意を要求する意図。特権または以前のユーザーの同意に基づいて同意が必要でない場合は null。

属性

注釈

呼び出し元アプリのパッケージ名にキーを付けた VpnProfile 構成をインストールします。

このメソッドは、ユーザーの null 同意が既に付与されている場合、または システム アクティビティに 対して を Intent 返します。 意図が返された場合、アプリケーションは を使用して Activity#startActivityForResult アクティビティを起動し、ユーザーの同意を要求する必要があります。 アクティビティによってダイアログがポップアップ表示され、ユーザーの操作が必要になり、結果は を Activity#onActivityResult介して返されます。 結果が の場合、 Activity#RESULT_OKユーザーは同意し、VPN プロファイルを開始できます。

android.net.VpnManager.provisionVpnProfile(android.net.PlatformVpnProfile)Java ドキュメント。

このページの一部は、によって作成および共有された作業に基づく変更であり、に記載されている条件に従って使用されます。

適用対象