I do have a Xamarin Forms project where I want Android, iOS and WinPhone as targets. (Right now I only look at Android.)
I am having trouble playing Audio and think I will need to implement it differently on each device.
I started with adding this code in the app.cs of the shared project
#if __ANDROID__
MediaPlayer _player;
_player = MediaPlayer.Create(this, Resources.Raw.bear); // "Resources.Raw.bear");
_player.Start();
#endif
but found that I cannot really reference the bear.wav, so I think I have to add the bear.wav for each project/platform and also handle the playing code separately. (See also http://developer.xamarin.com/recipes/android/media/audio/play_audio/ )
Unfortunately, I could not find a sample - or any documentation - on how to do this.
http://developer.xamarin.com/guides/cross-platform/xamarin-forms/custom-renderer/ is the closest I could find, but it seems to be highly focused on renderers.
What I thought I would do would be to define an abstract class in the shared project (some simple class, just with a void play method), and use it, and have the specific implementations in each platform-project. How to go about this?