Code example for Ringtone

Methods: isPlaying, stop

0
		} 
	} 
 
	public void stopAlarm(View view){
		System.out.print(true);
		if(r!=null && r.isPlaying()){
			r.stop();
		} 
		finish();
	} 
	 
	@Override 
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present. 
		getMenuInflater().inflate(R.menu.alert, menu);
		return true; 
	} 
 
}