Intent.UriAndroidAppScheme 欄位
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
This constant will be removed in the future version. Use Android.Content.IntentUriType enum directly instead of this field.
與 及 一起使用 #toUri#parseUri的旗標:URI 字串始終帶有「android-app:」的 scheme。
[Android.Runtime.Register("URI_ANDROID_APP_SCHEME", ApiSince=22)]
[System.Obsolete("This constant will be removed in the future version. Use Android.Content.IntentUriType enum directly instead of this field.", true)]
public const Android.Content.IntentUriType UriAndroidAppScheme = 2;
[<Android.Runtime.Register("URI_ANDROID_APP_SCHEME", ApiSince=22)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Content.IntentUriType enum directly instead of this field.", true)>]
val mutable UriAndroidAppScheme : Android.Content.IntentUriType
欄位值
Value = 2實作
- 屬性
備註
與 及 一起使用 #toUri#parseUri的旗標:URI 字串始終帶有「android-app:」的 scheme。 這是另一種格式的變體 #URI_INTENT_SCHEME ,針對將 http/https URI 送達特定套件名稱的情況,格式較為簡化。 格式為:
android-app://{package_id}[/{scheme}[/{host}[/{path}]]][#Intent;{...}]
在此方案中,只需 。package_id 如果你包含主持人,也必須包含一個方案;包含路徑也需要主機與方案。 最後一個 #Intent;片段可無需方案、主機或路徑即可使用。 請注意,這不能用於具有 的 #setSelector意圖,因為基礎意圖總是有明確的套件名稱。
以下是此方案如何映射到意圖物件的一些範例:
<table border=“2” 寬度=“85%” align=“Center” 框架=“hsides” rules=“rows”><colgroup align=“left” /><colgroup align=“left” /><thead><tr><th>URI</th><>Intent</th/><>tr</thead>
<tbody tr td><></td>android-app://com.example.appTD 表格<風格=“margin:0;><><border:0;細胞填充:0;cellspacing:0“>tr td<動作:></td>td<><>/td#ACTION_MAIN/tr<><tr td><套件:></td>td<><>/tdcom.example.app/tr/table<><>/td<></tr><tr td><><>/tdandroid-app://com.example.app/http/example.com<>td table style=”margin:0;<><border:0;細胞填充:0;cellspacing:0“>tr TD 動作:</td><td><></td>/tr#ACTION_VIEW<tr td><>資料:</td><td><></td>/trhttp://example.com/<tr td><>套件:</td><td><></td>/tr/tablecom.example.app<></td/tr><tr td><><><><>android-app://com.example.app/http/example.com/foo?1234</td table style=”margin:0;><><border:0;細胞填充:0;cellspacing:0“>tr TD 動作:</td><td><></td>/tr#ACTION_VIEW<tr td><>資料:</td><td><></td>/trhttp://example.com/foo?1234<tr td><>套件:</td><td><></td>/tr/tablecom.example.app<></td/tr><tr td><><><><>android-app://com.example.app/<br />#Intent;action=com.example.MY_ACTION;end</td table style=”margin:0;><><border:0;細胞填充:0;cellspacing:0“>tr td<動作:></td>td<><>/tdcom.example.MY_ACTION/tr<><tr td><套件:></td>td<><>/tdcom.example.app/tr/table<><>/td<></tr><tr td><><>/tdandroid-app://com.example.app/http/example.com/foo?1234<br />#Intent;action=com.example.MY_ACTION;end<>td table style=”margin:0;<><border:0;細胞填充:0;cellspacing:0“>tr td<動作: ></td>td<><>/tdcom.example.MY_ACTION/tr<><tr td><資料: ></td>td<><>/tdhttp://example.com/foo?1234/tr<><tr td 套件><: ></td>td<><>/tdcom.example.app/tr/table<><>/td<></tr><tr td><><>/tdandroid-app://com.example.app/<br />#Intent;action=com.example.MY_ACTION;<br />i.some_int=100;S.some_str=hello;end<>table border=”“ style=”margin:0” <><>tr td<動作:></td>td<><>/tdcom.example.MY_ACTION/tr<><tr td 包裝><:></td>td<><>/tdcom.example.app/tr<><tr td>額外<內容:></td>td<><>/tdsome_int=(int)100<br />some_str=(String)hello/tr/table<><>/td<></><tbody></table><>
Java 文件 android.content.Intent.URI_ANDROID_APP_SCHEME。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。