「Android学習」Androidで音楽を再生する方法、MediaPlayerの使い方
Javaコード:
MediaPlayer player = new MediaPlayer();
try {
player.setDataSource(WebMusic.this, Uri.parse(“https://arkgame.com/2015/03/02/XXXXX.mp3"));
player.prepare();
player.start();
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (SecurityException e) {
e.printStackTrace();
} catch (IllegalStateException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}