android - Why doesn't the subtype of this custom MIME type specify the particular row (from Content URI) in the table? -
at end of the developer guide, have described vnd.android.cursor.dir
type
part of every custom mime type, multiple rows; , vnd.android.cursor.item
single row.
then there example of content provider contains train timetables. it's authority
com.example.trains
, has tables line1
, line2
, , line3
. , it's content uri
content://com.example.trains/line2/5
which pointing "5th row in line2
table", mime type returned be:
vnd.android.cursor.item/vnd.example.line2
which not indicate row is.
questions:
i think should be like:
vnd.android.cursor.item/vnd.example.line2.5
because
type
part describe mime type particular row, subtype should describe row is. isn't it?if
vnd.android.cursor.item/vnd.example.line2
correct, means not matter if mime type of particular row. does mean rows in table have same mime type? because mime type type of files on internet. (reference) think since rows have same "types" of data (or in other words rows in table kinda instances of same thing) - think rows in table should inherently have same mime type?if ^ yes, then point of having categorization
vnd.android.cursor.dir
,vnd.android.cursor.item
?
i think should like:
vnd.android.cursor.item/vnd.example.line2.5
because type part describe mime type particular row, subtype should describe row is. isn't it?
no, no more mime type web page text/html.30821182
because happens question #30821182 on web site. mime types in android represent data formats.
does mean rows in table have same mime type?
in provider, yes.
because mime type type of files on internet.
android stretches definition of mime type more generic files. in case of database-style api of contentprovider
, mime type there link data structure uri
activity can work data structure.
i think rows in table should inherently have same mime type?
that typical pattern database-style contentprovider
api.
then point of having categorization vnd.android.cursor.dir , vnd.android.cursor.item ?
the former represents collection of content, think of table or view in sql database. latter represents instance of content, think of row in table or view in sql database.
Comments
Post a Comment