Code example for AudioManager

Methods: setSpeakerphoneOn

0
	private void enableSpeaker() 
	{ 
		Context context = getApplicationContext();
		 
		AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
		audioManager.setSpeakerphoneOn(true);
	} 
	 
	@Override 
	public void onDestroy()  
	{ 
		Log.i("z", "destory tts.");
		 
		if (tts != null) {
			tts.stop();
			tts.shutdown();
		} 
		super.onDestroy(); 
	} 
 
	@Override