Code example for Ringtone

Methods: play, setStreamType

0
//		} 
//		mPlayer.start(); 
		 
 
		mRing = RingtoneManager.getRingtone(this, Uri.parse(mPrefs.ringtone().get()));
		mRing.setStreamType(AudioManager.STREAM_ALARM);
		mRing.play();
	}  
	 
	@Click({R.id.frameLayout, R.id.dismissTextView}) 
	void dismiss() { 
		clearLed(); 
//		mPlayer.stop(); 
//		mPlayer.release(); 
		mRuns = false;
		mAudioManager.setStreamVolume(AudioManager.STREAM_ALARM, mOldVolume, AudioManager.FLAG_REMOVE_SOUND_AND_VIBRATE); 
		mRing.stop();
		finish();
	} 
	 
	@Override