My app does different actions deppending on the caller and some predefined values. When a call is starting to ring I need to be as fast as possible to read those preferences from the data base and display them. I tried to have static variables in the BroadcastReceiver, I also tried to have them in a Service but it just seems to die and loose all the values. If I read them from the databade again it takes too long to display the information. So, is there any way to tell Android to respect part of the memory so I can persist the information?
Thanks
EDITED: Is reading from SharedPreferences any faster than reading from a small database?