|
CentralTagging
Tagging should be a content neutral and centralized feature
IntroductionTagging is used and needed by just about any application. Browser (URL tagging), Music (id3), Photos (EXIF + user tags) or videos (especially matroska has strong tagging possibilities). A central tagging provider would allow tagging of any content by any application which should simplify application development and improve the user expirience. Features
There is/will be a view for adding a new tag and browsing all URIs. The content provider allows to query for all tags, for content with a given tag and for tags for a given content. Details have been moved to CentralTaggingDetails Use of ContentBrowserViewOpen the content browser. Type in a tag, see how the list is filled as soon as an entry is found for a tag. A selected list item can be viewed (if a VIEW activity is installed for that type of content) and the tag can be removed from the content. You can tag content by using the Tag menu. Select a content-type (=package) and pick a content from there. In the next popup dialog you can enter a tag name. Use of TagProviderWhen using the TagProvider you have to provide a projection. This should consist of a list of constants defined by Contents (when querying Contents) or by Tags (when quering Tags).
getContentResolver().query(Contents.CONTENT_URI, projection, Contents.TYPE + " like 'TAG%'", null)
getContentResolver().query(Tags.CONTENT_URI, projection, Tags.URI_2 + " = '?', new String[]{contentUri.toString()}, null)
getContentResolver().query(Tags.CONTENT_URI, projection, Tags.URI_1 + " = '?', new String[]{tag}, null) Intents
new Intent (Intent.TAG_CONTENT, Tags.CONTENT_URI).putExtra(Tags.CONTENT_EXTRA, myContentUri) This will open a view where you can add a new tag to your content. |
Sign in to add a comment