I have converted Uri into a string by using toString() method and stored in a shared preferences.
String path = uri.toString();
I would like to convert back to Uri so that I can set the image. I have tried
Uri.parse(path);
or
Uri.fromFile(new File(path));
However, none of them works. How can I set the string back to the Uri?