Android - right way to store a value for repeated use?
<p>I have a service in my app that is always running but the global static variables seem to get reset when the phone is idle for a while (possibly the app is getting closed). Please let me know the optimal way to store a value for repeated use, maybe once in 2-5 mins.</p>

<p>Will using a SharedPreference cause high overhead if accessed once in 2-5 mins ?</p>

<p>Appreciate your help.</p>