For content URIs that point to a row or rows of table data, getType()
should return a MIME type in Android's vendor-specific MIME format:
- Type part:
vnd
- Subtype part:
- If the URI pattern is for a single row:
android.cursor.item/
- If the URI pattern is for more than one row:
android.cursor.dir/
- If the URI pattern is for a single row:
- Provider-specific part:
vnd.<name>
.<type>
You supply the
<name>
and<type>
. The<name>
value should be globally unique, and the<type>
value should be unique to the corresponding URI pattern. A good choice for<name>
is your company's name or some part of your application's Android package name. A good choice for the<type>
is a string that identifies the table associated with the URI.
Attributes that specify the permissions that other applications must have in order to access the provider's data:
android:grantUriPermssions
: Temporary permission flag.android:permission
: Single provider-wide read/write permission.android:readPermission
: Provider-wide read permission.android:writePermission
: Provider-wide write permission.
Permissions and their corresponding attributes are described in more detail in the section Implementing Content Provider Permissions.