Android.Content.GrantUriPermissionAttribute Class
Generates a /manifest/provider/grant-uri-permission elements within AndroidManifest.xml.

See Also: GrantUriPermissionAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=false)]
public class GrantUriPermissionAttribute : Attribute

See Also

ContentProviderAttribute

Remarks

The //provider/grant-uri-permission element is used to specify which data subsets of the parent content provider that permission can be granted for. The Android.Content.GrantUriPermissionAttribute custom attribute is used by monodroid.exe when generating AndroidManifest.xml to to declaratively generate //provider/grant-uri-permission elements.

The type this attribute is placed on must be a (possibly indirect) subclass of Android.Content.ContentProvider.

The following type declaration

C# Example

[ContentProvider (new[]{"com.example.Provider"}
        Label="Content Label")]
[GrantUriPermission (Path="path")]
class MyContentProvider : ContentProvider {
    /* ... */
}

results in the following XML fragment

XML Example

<provider android:authorities="com.example.Provider"
            android:label="Content Label">
    <grant-uri-permission pndroid:path="path" />
</provider>

Requirements

Namespace: Android.Content
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0