Idioma

Intent.UriAndroidAppScheme Campo

Definição

Cuidado

This constant will be removed in the future version. Use Android.Content.IntentUriType enum directly instead of this field.

Sinalizador para uso com #toUri e #parseUri: a cadeia de caracteres de URI sempre tem o esquema "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

Valor do campo

Value = 2

Implementações

Atributos

Comentários

Sinalizador para uso com #toUri e #parseUri: a cadeia de caracteres de URI sempre tem o esquema "android-app:". Essa é uma variação de #URI_INTENT_SCHEME cujo formato é mais simples para o caso de um URI http/https ser entregue a um nome de pacote específico. O formato é:

android-app://{package_id}[/{scheme}[/{host}[/{path}]]][#Intent;{...}]

Nesse esquema, somente o package_id é necessário. Se você incluir um host, também deverá incluir um esquema; A inclusão de um caminho também requer um host e um esquema. O #Intent final; o fragmento pode ser usado sem um esquema, host ou caminho. Observe que isso não pode ser usado com intenções que têm um #setSelector, pois a intenção base sempre terá um nome de pacote explícito.

Alguns exemplos de como esse esquema é mapeado para objetos Intent:

<table border="2" width="85%" align="center" frame="hsides" rules="rows"><colgroup align="left" /><colgroup align="left" /><thead><tr><th>URI</th th><>Intent</th></tr></thead>

<tbody tr td><></td td>android-app://com.example.app<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><tr>td<><>/td tdandroid-app://com.example.app/http/example.com<>table style="margin:0;<>< border:0; cellpadding:0; cellspacing:0">tr td<Action: ></td td><><>/td#ACTION_VIEW/tr<><tr>td<Data: ></td td><><>/tdhttp://example.com//tr<><tr>td<Package: ></td td>/td<><>com.example.app/tr<></table>/td<></tr><tr>td<><>/td tdandroid-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#ACTION_VIEW/tr<><tr>td<Data: ></td td><><>/tdhttp://example.com/foo?1234/tr<><tr>td<Package: ></td td>/td<><>com.example.app/tr<></table>/td<></tr><tr>td<><>/td tdandroid-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><tr>td<><>/td tdandroid-app://com.example.app/http/example.com/foo?1234<br />#Intent;action=com.example.MY_ACTION;end<>table style="margin:0;<>< border:0; cellpadding:0; cellspacing:0">tr td<Action: ></td td>/td<><>com.example.MY_ACTION/tr<><tr>td<Data: ></td td><><>/tdhttp://example.com/foo?1234/tr<><tr>td<Package: ></td>td/td<><>com.example.app/tr<></table>/td<></tr><tr>td<><>/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" <><><ação tr><td>: </td td><>com.example.MY_ACTION</td></tr><tr><td>Pacote: </td td><>com.example.app</td></tr><tr><td>Extras: </td td><>some_int=(int)100<br />some_str=(String)hello</td></tr></table></td></tr></tbody></table>

Java documentação para android.content.Intent.URI_ANDROID_APP_SCHEME.

Partes desta página são modificações baseadas no trabalho criado e compartilhado pelo Project Open Source do Open Source e usadas de acordo com os termos descritos na Creative Commons 2.5.

Aplica-se a