Indeed, somewhere I read that third party apps could replace the media
content provider or even the contacts content provider (but I don't
know if the current system allows this already, or whether those
components are still too closely tied to the base framework).
Yes, the intents would go into the framework. Then again, that is only
a class of static strings, so it is also not a big deal to include
them manually in every application for now, and suggest that for
inclusion in the framework later :-)
The big question: How can we start in the easiest possible way with
minimum definitions but maximum benefit?
For crypto, it was just 2 actions and 1 extra:
http://code.google.com/p/openintents/source/browse/trunk/NotePad/src/org/openintents/intents/CryptoIntents.java
http://code.google.com/p/android-passwordsafe/source/browse/branches/service/PasswordSafe/src/org/openintents/intents/CryptoIntents.java
The first step is to collect all tags, and display all content in the
tag browser.
Similar to MediaStore with MediaScanner, it would be good to have an
intent to collect all content.
* org.openintents.action.UPDATE_ALL_TAGS: Broadcast intent sent from
CentralTagging to all listening applications.
* org.openintents.action.TAG_UPDATED: Broadcast intent sent back from
an application to CentralTagging whenever a tag has been updated, or
after UPDATE_ALL_TAGS has been received.
* org.openintents.extra.TAGS: Comma-separated string of tags.
getData() is the URI of the content to be tagged, while getType() is
the MIME-type (which is helpful to display an icon or perform the VIEW
action on the data).
Example:
CentralTagger sends: UPDATE_ALL_TAGS.
Notepad answers:
TAG_UPDATED: content:org.openintents.notepad/note/1 "fun"
TAG_UPDATED: content:org.openintents.notepad/note/2 "fun,home"
Shopping list answers:
TAG_UPDATED: content:org.openintents.shoppinglist/list/1 "important"
TAG_UPDATED: content:org.openintents.shoppinglist/list/2 "fun"
Later, if notepad tags a new note, it just sends
TAG_UPDATED: content:org.openintents.notepad/note/3 "private"
Then tag browser could already display:
"fun": note1, note2, list2
etc.
Depending on performance, we may later introduce an extra limit on
UPDATE_ALL_TAGS (e.g. send back max. 100 entries), or have
TAGS_UPDATED which sends back arrays of content and tags (to be more
efficient).
Passing "" for the tag means that a content does not have a tag, and
passing null may mean that the content has been removed. (Or this
could be a separate action: TAG_CONTENT_DELETED?)
This is so far a quick draft, so suggestions for improvement or
alternative proposals are welcome :-)
Peli
On 29 Dez., 00:07, "Friedger Müffke" <
fried...@googlemail.com> wrote:
> I agree with Peli that even the content provider could be replaced by a
> different implementation. So, the first step is to define the intents and
> then start from there a standard implementation. The intents would go into
> the framework, the implementation in an external app, wouldn't it?
>
> Friedger
>