I\'m developing an android application. I\'m using android 2.2
In my application I am capturing GPS data and sending it to service with the 1 hour time interval. If
There are two ways to create instance of SharedPreference
:
Case 1:
SharedPreferences preferences = activity.getSharedPreferences("", MODE_PRIVATE);
Case 2:
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
Notice if you create a preference with the same name (case 1) or same context (case 2) even at different places, it's still the same, and can share data, obviously.