I am trying to open an URL with androids MediaPlayer Class by using:
MediaPlayer.create(pContext, Uri.parse(m_sUrl));
i have allready replaced all the Spaces in m_sUrl String with %20 by using:
m_sUrl = m_sUrl.replace(" ", "%20");
But the MediaPlayer.Create Method return null to me. So there seems still to be something wrong by parsing the m_sUrl String.
Thats the URL string i am trying to stream:
http://www.se.hs-heilbronn.de/~poneu/files/musik/oeffentlich/2007-03-10/01%20-%20L.v.%20Beethoven-%20Ouvertüre%20Nr.%203%20zur%20Oper%20-Leonore-%20op.%2072a.mp3
so as you can see, it seems to be the ü character. Anyone know what i have to use in an valid url for ä ö ü ß and so on?
Use URLEncoder and you have to keep in mind to encode only unsafe character:
in the exemple that i mentioned below the unsafe character is the space that will be transformed to %20
hope this will help