Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How do I play a sound effect from the Glass GDK?

$
0
0

The Glass GDK adds some constants for playing additional sound effects (see: https://developers.google.com/glass/develop/gdk/reference/com/google/android/glass/media/Sounds). For example (in Java):

AudioManager audio = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
audio.playSoundEffect(Sounds.SUCCESS);

How can I get this to work in C#? Here is as far as I can get:

AudioManager audio = (AudioManager)this.GetSystemService(Context.AudioService);
audio.PlaySoundEffect(// takes a SoundEffect enum value, but Sounds.Success is an int

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>