0
任何人都知道如何在设备的耳机或耳机扬声器中播放音频?如何通过仅使用mediaplayer的耳机播放音频android
我已经使用这个:
AudioManager audio_service = (AudioManager) getSystemService
(Context.AUDIO_SERVICE);
// set the mode in call, so that the sound can come from earpiece
audio_service.setSpeakerphoneOn(false);
audio_service.setMode(AudioManager.MODE_IN_CALL);
audio_service.setRouting(AudioManager.MODE_NORMAL,
AudioManager.ROUTE_EARPIECE, AudioManager.ROUTE_ALL);
mediaplayer.start();
,但什么都没有发生..:| 任何人都可以打电话给我吗?