Back to project page BehatReporter.
The source code is released under:
Copyright (C) 2013 Fabian Kiss <headrevision@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software...
If you think the Android project BehatReporter 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 headrevision.BehatReporter.store; // ww w .ja v a 2s .c o m import android.app.Activity; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; public class ReportUrl { private static ReportUrl instance; private Activity activity; private SharedPreferences preferences; private ReportUrl(Activity activity) { this.activity = activity; preferences = activity.getPreferences(Activity.MODE_PRIVATE); } public static ReportUrl getInstance(Activity activity) { if (instance == null || instance.activity != activity) { instance = new ReportUrl(activity); } return instance; } public String retrieve() { return preferences.getString("report_url", ""); } public void save(String reportUrl) { Editor editor = preferences.edit(); editor.putString("report_url", reportUrl); editor.commit(); } }