Actually I want to know, how can I read and write URI using sharedPreferences. I mean to say that suppose I have an int value, e.g.:
int x = 10;
Then for write date using sharedPrferences I used following code
SharedPreferences preferencesWrite = getSharedPreferences("myPreferences", 0);
SharedPreferences.Editor editor = preferencesWrite.edit();
editor.putInt("value", x);
editor.commit();
And similarly for reading data code I used is
x = preferencesRead.getInt("value", 0);
Now if I declared Uri calenEvent;
Then how can I read and write it to the register? If anyone knows, please help me to solve this out.
Covert URI to string
You can save this string in SharedPreference easily.
and later reconstruct URI from the string