0

MediaPlayerについてではなく、Advent Vegaタブレット(2.2)にバンドルされているアプリについて話します。

自分のコードからメディアプレーヤーアプリにURI/URLを渡すにはどうすればよいですか?

4

1 に答える 1

0

うまくいくかは保証できませんが、次のようなことを試してみてください...

Intent intent = new Intent(android.content.Intent.ACTION_VIEW); 
Uri data = Uri.parse("http://someserver.com/thefile.mp3"); 
intent.setDataAndType(data,"audio/mp3"); 
try { 
    startActivity(intent); 
} catch (ActivityNotFoundException e) { 
    e.printStackTrace(); 
} 
于 2011-05-11T19:27:15.747 に答える