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:”方案的标志。
[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:”方案的标志。 这是一种变体 #URI_INTENT_SCHEME
,其格式对于要传递到特定包名称的 http/https URI 而言更简单。 格式为:
android-app://{package_id}[/{scheme}[/{host}[/{path}]]][#Intent;{...}]
在此方案中,只有 package_id
必需项。 如果包含主机,则还必须包含方案;包括路径也需要主机和方案。 最终 #Intent;可以在不使用方案、主机或路径的情况下使用片段。 请注意,这不能用于具有
此方案如何映射到 Intent 对象的一些示例:
<table border=“2” width=“85%” align=“center” frame=“hsides” rules=“rows>”colgroup align=“left” /colgroup align=“left” /<>><thead><tr><th>URI</th><>Intent</th></tr<>/thead<>
<tbody tr td>android-app://com.example.app
</td td><><table style=“margin:0;><><border:0;cellpadding:0;cellspacing:0“>tr td Action: </td><td>/td#ACTION_MAIN
<><>/tr><tr><td>Package: </td><td/tdcom.example.app
>><</tr<>/table></td/><<>tr td><android-app://com.example.app/http/example.com
<>/td td><><table style=”margin:0;><<border:0;cellpadding:0;cellspacing:0“>tr td Action: /td><td>/td></tr<>tr><td>>#ACTION_VIEW
< Data: <</td><td/td>http://example.com/
</tr><><td>Package: </td><td/td/><td<com.example.app
>></><tr/table></><td/<><>tr<>tr><td<>android-app://com.example.app/http/example.com/foo?1234
table style=”margin:0;><<border:0;cellpadding:0;cellspacing:0“>tr td Action: /td><td>/td></tr<>tr><td>>#ACTION_VIEW
< Data: <</td><td/td>http://example.com/foo?1234
</tr><><td>Package: </td><td/td/><td<com.example.app
>></><tr/table></><td/<><>tr<>tr><td<>android-app://com.example.app/<br />#Intent;action=com.example.MY_ACTION;end
table style=”margin:0;><<border:0;cellpadding:0;cellspacing:0“>tr td Action: </td><td>/tdcom.example.MY_ACTION
<><>/tr><tr><td>Package: </td><td/tdcom.example.app
>><</tr<>/table></td/><<>tr td><android-app://com.example.app/http/example.com/foo?1234<br />#Intent;action=com.example.MY_ACTION;end
<>/td td><><table style=”margin:0;><<border:0;cellpadding:0;cellspacing:0“>tr td Action: /td><td>/td></tr><tr><td>com.example.MY_ACTION
<> Data: <</td><td/td><<>http://example.com/foo?1234
/tr<><>td>Package: </td><tdcom.example.app
>>><<<></table/><td/>><<tr tr tdandroid-app://com.example.app/<br />#Intent;action=com.example.MY_ACTION;<br />i.some_int=100;S.some_str=hello;end
<>/td td<>><table border=”“ style=”margin:0” >><<<tr><td>Action: </td><td/td><<com.example.MY_ACTION
>/tr><tr><td>Package: </td><td/td><<>com.example.app
/tr><><tr td>Extras: </td><td/td></tr></table></td><<>some_int=(int)100<br />some_str=(String)hello
/tr></tbody></table>
适用于 . 的 android.content.Intent.URI_ANDROID_APP_SCHEME
Java 文档
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。