Reputation: 907
I need to program a Background "process" that would periodically buffer certain types of data like A, B, C. These data should be available to different Apps. For example App X receives data A and App Y receives data type B through the background.
What are my best options for designing such a server?
Is "Android Service" the way to go?
Can I have a simple C server running natively as a startup process called by init? If yes, how can I make the data available to the Dalvik Apps?
Could you provide some starting points?
Thanks a lot
Upvotes: 0
Views: 930
Reputation: 72341
What you need to do is :
Service
that will periodically get data from the socket and store it. I'm not sure how complex your data is, but I think you should yous a SQLiteDatabase
to store it.Content Provider
that will expose the stored data to other applications.Upvotes: 0
Reputation: 234857
What you need to implement is a ContentProvider. The place to start is with the guide topic on Content Providers. To quote the guide: "They're the only way to share data across applications".
Upvotes: 1