instead of setting a URL as a datasource, I create a sound file (with HttpUrlConnection, I got the inputstream and wrote it in a file) and set it as datasource.
Android sdk 2.3.3 E/MediaPlayer(334): error (1, -2147483648) when Turkish chars used in setDataSource
-
27-11-2021 - |
Frage
In my program, I used url in mediaplayer's datasource. If url does not contain any turkish chars, it works normally. However, if it contains turkish chars, following error occurs:
E/MediaPlayer(334): error (1, -2147483648)
In the Url, turkish chars are used in the parameter part
Same error occurs when I use encoded Url, but same url is working correctly in mozilla
Thanks
Lösung 2
Andere Tipps
Try this
mediaPlayer.setDataSource(URLEncoder.encode(yourSongURL,"UTF-8"));
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow