Is it possible to stream audio over bluetooth? During my research I found that is it only possible using A2DP(Advanced Audio Distribution Profile). And does eve
Try using following code snippet:
public class AudioStream extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
String url = "http://www.example.mp3";
MediaPlayer mp = new MediaPlayer();
try {
mp.setDataSource(url);
mp.setAudioStreamType(AudioManager.STREAM_MUSIC);
mp.prepare();
mp.start();
} catch (Exception e) {
Log.i("Exception", "Exception in streaming = " + e);
}
}
}