Karra wrote:
I want to be able to create and distribute an application that will
'patch' the built-in Contacts application - i.e. augment its
functionality in a certain way. I would imagine that a programmable
extensible platform should enable such a thing to be easily
achievable.
Don't confuse a platform with an application. Android is a programmable
extensible platform. That doesn't necessarily imply that the Contacts
application -- which is an Android application like any other Android
application -- necessarily takes advantage of such capabilities.
For example, Android has hooks to allow one to declare activities that
can appear in another application's menu...if said other application is
written to look for such activities. I have no idea if Contacts is or is
not written that way.
So if the Contacts were an Emacs package, I would have added my custom
function to, say, 'android-contacts-pre-call-hook' to do some
processing on a phone number before a call is placed.
Android tends to be somewhat more coarse-grained than that and puts more
emphasis on inbound hooks than outbound ones, in part because it is
somewhat more content-focused than function-focused.
Case in point: the WikiNotes sample application. WikiNotes is set up
such that you can either launch the main app or launch a specific page
or even drive straight to editing a specific page, all just via the
public API in the form of accepted Intents. However, you can't replace
the WikiNotes editor widget from some other app, or decide that you want
to support {{{text}}} as preformatted text, or something like that,
because WikiNotes (AFAIK) doesn't try asking around for third-party
assistance in editing or formatting the actual wikitext.
An example of
what I would perform in such a hook would be, to check if the friend
is online on gtalk and place call only if she is not.
It is conceivable that the Contacts app is written in a way that you can
intercept the place-a-call action and handle it yourself if the friend
is available on IM. Android has the means to support such things. That
does not mean Contacts was written to use it.
--
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.4 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---