android - SharedPreference Value is Not Updated -
I started an activity from the widget and a service I use a shared partnership in both the activity and service when I If I update the priority value, then this service is not being updated. Please see the code. When you use shared preferences, you can get Shared References myPref = getSharedPreferences ("mPrefValue", Context.MODE_PRIVATE); String target value = myPref.getString ("mPrefValue", "0"); System.out.println ("targetValue" + Target Value);
getSharedPreferences (string Name, int mode); Just specify
MODE_MULTI_PROCESS as the second parameter
Comments
Post a Comment