Code example for ToneGenerator

Methods: startTone

0
		if (nowPlaying != null && tone == nowPlaying.intValue()) {
			return; 
		} 
	 	 
		if (tone >= 0 && tone < TONE_VALUES.length) {
			generator.startTone(TONE_VALUES[tone]);
			nowPlaying = tone;
		} 
		else { 
			throw new NoSuchToneException(tone);
		} 
	} 
 
	public void stopDTMF() { 
		nowPlaying = null;
		generator.stopTone();
	} 
} 
Connect your IDE to all the code out there  Get Codota for Java