Linguaggio

Intent.UriAndroidAppScheme Campo

Definizione

Attenzione

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

Flag da usare con #toUri e #parseUri: la stringa URI ha sempre lo schema "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

Valore del campo

Value = 2

Implementazioni

Attributi

Commenti

Flag da usare con #toUri e #parseUri: la stringa URI ha sempre lo schema "android-app:". Si tratta di una variante del #URI_INTENT_SCHEME cui formato è più semplice per il caso di un URI http/https recapitato a un nome di pacchetto specifico. Il formato è:

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

In questo schema è necessario solo .package_id Se si include un host, è necessario includere anche uno schema; l'inclusione di un percorso richiede anche un host e uno schema. Il #Intent finale; frammento può essere usato senza uno schema, un host o un percorso. Si noti che questa operazione non può essere usata con finalità con un #setSelectoroggetto , poiché la finalità di base avrà sempre un nome di pacchetto esplicito.

Alcuni esempi di come questo schema esegue il mapping agli oggetti 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><></td td td>android-app://com.example.app<table style="margin:0;><>< bordo:0; cellpadding:0; cellspacing:0">tr td<Action: ></td>td<><>/td#ACTION_MAIN/tr tr<><>td<Package: ></td>td/td<><>com.example.app/tr<></table>/td<></tr td><><><>/tdandroid-app://com.example.app/http/example.com<>table style="margin:0;<>< bordo:0; cellpadding:0; cellspacing:0">tr td<Action: /td><td><></td>/tr#ACTION_VIEW<><tr td>Data: </td><td><><>/tr trhttp://example.com/<><td>Package: <></td>td/td<><>/tr/com.example.apptr/td</tr><> td<></tr><>td<><>/td tdandroid-app://com.example.app/http/example.com/foo?1234<>table style="margin:0;<>< bordo:0; cellpadding:0; cellspacing:0">tr td<Action: /td><td><></td>/tr#ACTION_VIEW<><tr td>Data: </td><td><><>/tr trhttp://example.com/foo?1234<><td>Package: <></td>td/td<><>/tr/com.example.apptr/td</tr><> td<></tr><>td<><>/td tdandroid-app://com.example.app/<br />#Intent;action=com.example.MY_ACTION;end<>table style="margin:0;<>< bordo:0; cellpadding:0; cellspacing:0">tr td<Action: ></td>td<><>/tdcom.example.MY_ACTION/tr tr<><>td<Package: ></td>td/td<><>com.example.app/tr<></table>/td<></tr td><><><>/tdandroid-app://com.example.app/http/example.com/foo?1234<br />#Intent;action=com.example.MY_ACTION;end<>table style="margin:0;<>< bordo:0; cellpadding:0; cellspacing:0">tr td<Action: /td td><><></td>/trcom.example.MY_ACTION<><tr td>Data: </td><td/td><><>/tr trhttp://example.com/foo?1234<><td>Package: <></td>td/td<><>com.example.app/tr/table</td><>/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" <><><tr><td>Action: </td td></td>com.example.MY_ACTION<></tr tr><><td>Package: </td><td>com.example.app</td></tr tr><><td>Extras: </td><td/td>some_int=(int)100<br />some_str=(String)hello<></tr></table></td></tr></tbody></table>

per android.content.Intent.URI_ANDROID_APP_SCHEME.

Le parti di questa pagina sono modifiche basate sul lavoro creato e condiviso dalla e usati in base ai termini descritti in Creative License 2.5 Attribution License.

Si applica a