I googled for some API and examples of usage of SharedPreferences and I got this sort of a snippet:
SharedPreferences prefs = this.getSharedPreferences(
"com.example.app", Context.MODE_PRIVATE);
When I put it into my code, I got a compile error that getSharedPreferences is not a defined activity for DownloadWebPageTask
Any idea where I am making a bone headed mistake here and how I should actually be using SharedPreferences to get access to that file saved on the system?
Thanks!!
Unless you need different sets of preferences in the same application (unlikely) I suggest you use
(
thisneeds to be aContextof course, e.g. anActivityor yourApplication)