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. Shared References myPref = getSharedPreferences ("mPrefValue", Context.MODE_PRIVATE); String target value = myPref.getString ("mPrefValue", "0"); System.out.println ("targetValue" + Target Value);

When you use shared preferences, you can get getSharedPreferences (string Name, int mode); Just specify MODE_MULTI_PROCESS as the second parameter

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

php - How can I cram 6+31 numeric characters into 22 alphanumeric characters? -

mysql - where clause in inner join query -