Back to project page Points.
The source code is released under:
GNU General Public License
If you think the Android project Points listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package se.frusunnanbo.points; //w w w .j a v a 2s. c o m import android.content.Context; import android.content.SharedPreferences; public class Prefs { private final String childName = "Elmer"; private String parentName = ""; private String task1Name; private String task2Name; private final String uri; public Prefs(Context context) { SharedPreferences settings = context.getSharedPreferences(Constants.PREFS_NAME, 0); uri = settings.getString(Constants.URI_KEY, ""); parentName = settings.getString(Constants.PARENT_NAME_KEY, ""); task1Name = settings.getString(Constants.TASK1_KEY, context.getString(R.string.task_1)); task2Name = settings.getString(Constants.TASK2_KEY, context.getString(R.string.task_2)); } public String getChildName() { return childName; } public String getParentName() { return parentName; } public String getTask1Name() { return task1Name; } public String getTask2Name() { return task2Name; } public String getUri() { return uri; } public boolean valid() { return !this.parentName.isEmpty(); } }