Search code examples
androidmedia-playernullpointerexceptiongalaxy

Samsung Galaxy S kill my android app on music play


I have written an app which plays background music with MediaPlayer. I am now testing the app and it works on the HTC Desire perfectly, but when I try to test it on Samsung Galaxy S it dies with a NullPointer exception on the following part:

mp_bg_music.play();

Yes, I had used Mediaplayer.create and as I said it work on HTC Desire! Any idea why my Samsung Galaxy S would fail to run the same program as HTC Desire? Are there any additional things that I should be aware of before I try to play the music? Do I need to grant more uses-permission to app?


Solution

  • The solution was to change the AAC to MP3