I am developing an app for DTMF Tone generator.
When I Click it generates a tone.
my code is
one.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
int streamType = AudioManager.STREAM_MUSIC;
int volume = 70;
ToneGenerator toneGenerator = new ToneGenerator(streamType, volume);
int toneType = ToneGenerator.TONE_DTMF_1;
int durationMs = 50;
toneGenerator.startTone(toneType, durationMs);
}
});
It is a single click listener when I press button for long time it generates
tone for single time.
When I hold button for long time it should continously generates DTMF tone like
our phone dial pad
Is there any method to do this.
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/641a0bce-6d6a-4336-b3c2-efebbe795129%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.