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 -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -