Code example for RingtoneManager

Methods: stopPreviousRingtone

0
			mAccessory.disconnect();
		} catch (IOException e) {
			e.printStackTrace();
		} 
 
		mRingtoneManager.stopPreviousRingtone();
	} 
 
	@Override 
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true; 
	} 
 
	private BroadcastReceiver mReceiver = new BroadcastReceiver() {
 
		@Override 
		public void onReceive(Context context, Intent intent) { 
			if (intent.getAction().equals(subscription)) { 
				byte[] payload = intent.getByteArrayExtra(subscription + ".payload"); 
				mRingtoneManager.stopPreviousRingtone();