MonoTouch Play System Sound
-
02-07-2021 - |
Domanda
I would like to play a beep sound, when my alert dialog appears. How do I play the sound when a push notification appears? The code I need is similar to these links:
http://iosdeveloperzone.com/2011/05/23/snippet-playing-a-system-sound/
I cannot find this API anywhere:
AudioServicesPlaySystemSound
Soluzione
In MonoTouch this function is named MonoTouch.AudioToolbox.SystemSound.PlaySystemSound
.
Here's an example on how to play a sound from a file.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow