Reputation: 743
in my android
app I provide a url but it contains an apostrophe ' in the url. This breaks the link and I get a W/MediaPlayer: Couldn't open <url here> java.io.FileNotFoundException: No content provider
when I check sure enough the link breaks next to the aforementioned character.
Here is the link:
https://foowebsite.com/videos/4/Manny's%20Awesome%20Videos/2019-05-09/92aede2e-ce54-49a4-9eca-86b3bb79fe73.mp4
Here is how I am consuming the url and modifying some of the known illegal characters.
mVideoView.setVideoPath(
mCurrentItem.getmDownloadLink()
.replace(" ", "%20")
.replace("\\", "/")
.replace("//", "/")
.replace(":/", "://"));
//More video setup below...
My question is: how do I make the url take in that apostrophe.
Upvotes: 1
Views: 49