Code example for AudioManager

Methods: setMode, setBluetoothScoOn

0
	} 
 
	public void onClickStartMusic(View view) {
		Log.v(TAG, "called onClickStartMusic");
		manager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
		manager.setBluetoothScoOn(true);
		manager.setMode(AudioManager.MODE_IN_CALL);
 
		player = new MediaPlayer();
		String path = "/mnt/sdcard/media/audio/01 ���M�嗤2007.mp3";
		try { 
			player.setDataSource(path);
			player.setAudioStreamType(AudioManager.STREAM_VOICE_CALL);
			player.prepare();
		} catch (IllegalArgumentException e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
		} catch (SecurityException e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
		} catch (IllegalStateException e) {