I would like to ask how to convert or parse below string and display it using ImageSwitcher on Android Studio. I tried parsing it with the Uri class parse Uri method but it did not work. Below is the code. int i=0;
public void getItemPhotos(String str ) {
String[] arrOfStr = str.split(",", 3);
for (String a : arrOfStr){
Uri myUri = Uri.parse(a);
images.add(myUri);
i++;
}
Tried showing it with this line below. viewSliderPhotos.setImageURI(images.get(i));
Sample of the string passed to the method above is the string below from firebase.
"https://firebasestorage.googleapis.com/v0/b/dnd-1ee0c.appspot.com/o/defaultpic.jpg?alt=media&token=224b6fdc-aae5-4dac-9576-53b3ab01262c"