2016-07-06 12 views

答えて

0

私はあなたのデータベースには3つの列を持っていることを前提としています上記のパス

MediaPlayer mediaPlayer = MediaPlayer.create(context, path); 
01で初期のMediaPlayer:あなたは

Cursor c = yourDBHelper.query(TABLE_NAME, new String[] {"path"}, 
       new String[] {"song_name=?"}, new String[] {"<song_name>"}, 
              null, null, null); 
if(c.moveToFirst()) path = c.getString(0); // This should give the path if the 
               query was executed with no errors 

ステップ2を再生したい曲

ステップ3:databsase関連のヘルプについて音楽

mediaPlayer.start(); 

をお楽しみください - MediaPlayerのヘルプについてhttps://developer.android.com/training/basics/data-storage/databases.html
- https://developer.android.com/guide/topics/media/mediaplayer.html

また、くぼみはあなたがここで何を意味するのかを理解する -

読み方その歌からのその歌

関連する問題