Reputation: 31963
I have this code
ToneGenerator tg=new ToneGenerator(AudioManager.STREAM_NOTIFICATION, 100);
tg.startTone(ToneGenerator.TONE_CDMA_ONE_MIN_BEEP, 5000);
works fine but the playing of the beep is very shot (around 200ms)
No matter if I set 5000ms or more for the duration , still nothing changes :(.
Is it possible to have control on the duration of how long the beep is played ?
//this is the definition of the function defined in android
public boolean startTone (int toneType, int durationMs)
Upvotes: 2
Views: 2386