I'm making a ContentProvider that is really a wrapper around some web
services. The web services have the notion of a token, where you pass
the server some authentication credentials and it passes back a token
good for a period of hours. The authentication takes some time so you
don't want to do it any more often than necessary. Each subsequent
call to the web services includes the token.

When the token expires, the ContentProvider knows because it
timestamps the token and tracks its age (in a file). So it reapplies
for a new token whenever necessary. This means that one call every few
hours takes longer than usual because it includes re-authentication
but I can live with that.

All this token stuff is hidden from the content consumer and I want to
keep it that way. But that means that my ContentProvider needs an
authentication phase where the credentials are passed to it by the
content consumer. Is there a pattern for this type of ContentProvider
use?

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to