Megosztás a következőn keresztül:


Intent.UriAndroidAppScheme Field

Definition

Caution

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

Flag for use with #toUri and #parseUri: the URI string always has the "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

Field Value

Value = 2

Implements

Attributes

Remarks

Flag for use with #toUri and #parseUri: the URI string always has the "android-app:" scheme. This is a variation of #URI_INTENT_SCHEME whose format is simpler for the case of an http/https URI being delivered to a specific package name. The format is:

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

In this scheme, only the package_id is required. If you include a host, you must also include a scheme; including a path also requires both a host and a scheme. The final #Intent; fragment can be used without a scheme, host, or path. Note that this can not be used with intents that have a #setSelector, since the base intent will always have an explicit package name.

Some examples of how this scheme maps to Intent objects:

<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>android-app://com.example.app</td> <td><table style="margin:0;border:0;cellpadding:0;cellspacing:0"> <tr><td>Action: </td><td>#ACTION_MAIN</td></tr> <tr><td>Package: </td><td>com.example.app</td></tr> </table></td> </tr> <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>#ACTION_VIEW</td></tr> <tr><td>Data: </td><td>http://example.com/</td></tr> <tr><td>Package: </td><td>com.example.app</td></tr> </table></td> </tr> <tr><td>android-app://com.example.app/http/example.com/foo?1234</td> <td><table style="margin:0;border:0;cellpadding:0;cellspacing:0"> <tr><td>Action: </td><td>#ACTION_VIEW</td></tr> <tr><td>Data: </td><td>http://example.com/foo?1234</td></tr> <tr><td>Package: </td><td>com.example.app</td></tr> </table></td> </tr> <tr><td>android-app://com.example.app/<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>com.example.MY_ACTION</td></tr> <tr><td>Package: </td><td>com.example.app</td></tr> </table></td> </tr> <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>com.example.MY_ACTION</td></tr> <tr><td>Data: </td><td>http://example.com/foo?1234</td></tr> <tr><td>Package: </td><td>com.example.app</td></tr> </table></td> </tr> <tr><td>android-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>com.example.MY_ACTION</td></tr> <tr><td>Package: </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 documentation for android.content.Intent.URI_ANDROID_APP_SCHEME.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to