Android Mediaplayer @Samsung S i9000

i encoded the application that called the android media player to play the audio stream (at the url). In the emulator (Android 2.2) everything works fine (the application plays the stream). When I install the application on my HTC Desire (Android 2.2), it works fine. This week, a friend installed the application on his Samsung S i9000 (Android 2.2), and it did not work. The application just freezes, and the user is called to wait or cancel when mediaplayer.start (); called. When the application is initialized, the media planner is created (by the standard constructor), but on the i9000 you change the ringer volume and not the volume on the media if you press the buttons. Any ideas?:)

Edit: When I call an mp3 file instead of a stream, the i9000 plays it ... confusing ...

+3
source share
1 answer

http://code.google.com/p/mynpr/

hi, you can adapt this code and it will work. I have the same problem in my LG P970 and I solved with this player -

Bassively, it has 2 threads of the method, its first is “normal”, which does not work on our devices: (

The second way is to load part of the stream into the buffer, save it to the SD card, and then play it, and this works on all devices.

0
source

Source: https://habr.com/ru/post/1783374/


All Articles