URI imageUri = null;
//Setting the Uri of aURL to imageUri.
try {
imageUri = aURL.toURI();
} catch (URISyntaxException e1) {
// TODO Auto-generated catch bl
To get started using SharedPreferences for storage you'll need to have something like this in your onCreate():
SharedPreferences myPrefs = getSharedPreferences(myTag, 0);
SharedPreferences.Editor myPrefsEdit = myPrefs.edit();
I think you can do something like this to store it:
myPrefsEdit.putString("url", imageUri.toString());
myPrefsEdit.commit();
And then something like this to retrieve:
try {
imageUri = URI.create(myPrefs.getString("url", "defaultString"));
} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}