Udostępnij za pośrednictwem


Intent.UriAllowUnsafe 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: allow parsing of unsafe information.

[Android.Runtime.Register("URI_ALLOW_UNSAFE", 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 UriAllowUnsafe = 4;
[<Android.Runtime.Register("URI_ALLOW_UNSAFE", 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 UriAllowUnsafe : Android.Content.IntentUriType

Field Value

Value = 4

Implements

Attributes

Remarks

Flag for use with #toUri and #parseUri: allow parsing of unsafe information. In particular, the flags #FLAG_GRANT_READ_URI_PERMISSION, #FLAG_GRANT_WRITE_URI_PERMISSION, #FLAG_GRANT_PERSISTABLE_URI_PERMISSION, and #FLAG_GRANT_PREFIX_URI_PERMISSION flags can not be set, so that the generated Intent can not cause unexpected data access to happen.

If you do not trust the source of the URI being parsed, you should still do further processing to protect yourself from it. In particular, when using it to start an activity you should usually add in #CATEGORY_BROWSABLE to limit the activities that can handle it.

Java documentation for android.content.Intent.URI_ALLOW_UNSAFE.

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