Share dynamic arrayList between activity and service

view story

http://stackoverflow.com – I have an Android application that receives and processes data from a sensor. It includes one main activity class and one service class. The service class is running in the background to receive and save data from sensor. The activity class has a history chart that shows daily average values up to 100 days ago. The lifecycle of the activity and the service should be independent because even when the activity is not running, the service should keep receiving data in the background. Here is my current implementation. I use shared preference to let the activity access the data from the service. (HowTos)