I am developing an app and get confused about the idea of Service and
Content Provider in Android. In practice, what will be the difference
between them?

Content Provider
is a facade and it defines a way to share data among applications. You
many attach a local database to your app or create Content Provider
mapped to a universal database so that all the application on the same
device can share it.

Service
is long running processes that need to be decoupled from main
activity. It has local and remote service. local service is like the
local database, and remote service is like Content Provider sharing
the database info.

What My App is doing?
downloads info. from multiple internet resource in the background (I
suppose this will be Service) and store the info. into database, and
multiple applications will need to retrieve the data, format them and
output them to user (I guess it will be a Content Provider).

What will be the fine line between Service and Content Provider?
Newbie in Android, and any suggestion is welcome.

Lily

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
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

Reply via email to