public void startDialtone(DialtoneType type) { try { stopDialtone(); Tone tone_type; int duration = -1; switch (type) { case DialtoneType.busy: tone_type = Tone.SupBusy; duration = 5000; break; case DialtoneType.dialing: tone_type = Tone.SupRingtone; break; case DialtoneType.error: tone_type = Tone.SupError; duration = 5000; break; default: return; } AudioManager am = (AudioManager)MainActivity.Instance.GetSystemService(Context.AudioService); toneGenerator = new ToneGenerator(Stream.VoiceCall, am.GetStreamVolume(Stream.VoiceCall) * 50 / am.GetStreamMaxVolume(Stream.VoiceCall)); toneGenerator.StartTone(tone_type, duration); } catch (Exception e) { Logging.error("Exception occured in startDialtone: " + e); toneGenerator = null; } }
public void startDialtone(DialtoneType type) { }
public void startDialtone(DialtoneType type) { throw new NotImplementedException(); }