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 pr开发者_运维问答ogram 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?
The solution was to change the AAC to MP3
精彩评论