开发者

How to play a sound file from a web URL when a button is clicked

I have this sound file in http://www.example.com/sound.mp3; how can I make it play when a button is clicked, using a Me开发者_高级运维dia Player?

Example:

    b.setOnClickListener(new View.OnClickListener() { 
@Override public void onClick(View v) { 
MediaPlayer mp = MediaPlayer.create(this, R.raw.mmmm); }

     });

But I want to play this sound: http://www.example.com/sound.mp3 without downloading this sound.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜