Android.Content.ContentResolver.Canonicalize Method
Transform the given url to a canonical representation of its referenced resource, which can be used across devices, persisted, backed up and restored, etc.

Syntax

[Android.Runtime.Register("canonicalize", "(Landroid/net/Uri;)Landroid/net/Uri;", "")]
public Android.Net.Uri Canonicalize (Android.Net.Uri url)

See Also

ContentResolver.Uncanonicalize(Android.Net.Uri)

Parameters

url
The Android.Net.Uri that is to be transformed to a canonical representation. Like all resolver calls, the input can be either a non-canonical or canonical Uri.

Returns

Documentation for this section has not yet been entered.

Remarks

Transform the given url to a canonical representation of its referenced resource, which can be used across devices, persisted, backed up and restored, etc. The returned Uri is still a fully capable Uri for use with its content provider, allowing you to do all of the same content provider operations as with the original Uri -- ContentResolver.Query(Android.Net.Uri, System.String[], System.String[], System.String[], System.String[]), ContentResolver.OpenInputStream(Android.Net.Uri), etc. The only difference in behavior between the original and new Uris is that the content provider may need to do some additional work at each call using it to resolve it to the correct resource, especially if the canonical Uri has been moved to a different environment.

If you are moving a canonical Uri between environments, you should perform another call to ContentResolver.Canonicalize(Android.Net.Uri) with that original Uri to re-canonicalize it for the current environment. Alternatively, you may want to use ContentResolver.Uncanonicalize(Android.Net.Uri) to transform it to a non-canonical Uri that works only in the current environment but potentially more efficiently than the canonical representation.

[Android Documentation]

Requirements

Namespace: Android.Content
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1