Exemplo n.º 1
0
        public static void Error()
        {
#if __ANDROID__
            Android.Media.ToneGenerator toneGenerator = new Android.Media.ToneGenerator(Android.Media.Stream.Music, 100);
            toneGenerator.StartTone(Android.Media.Tone.CdmaPip, 150);
#elif __IOS__
            AudioToolbox.SystemSound systemSound = systemSound = new AudioToolbox.SystemSound(1000);
            systemSound.PlaySystemSound();
#endif
        }
Exemplo n.º 2
0
        public override void OnDeactivated(DeactivationReason reason)
        {
            logger.Info("Deactivated: {0} after {1}ms", reason.ToString(), stopwatch.ElapsedMilliseconds);

            Android.Media.Stream amStream = Android.Media.Stream.Music;
            int iTonGeneratorVolume       = 100;

            var toneG = new Android.Media.ToneGenerator(amStream, iTonGeneratorVolume);

            toneG.StartTone(Android.Media.Tone.PropBeep);

            (socket as IDisposable).Dispose();

            IsTransacting = false;
        }