jcphlux / XamarinAudioManager

Cross platform Audio Manager for Xamarin
MIT License
36 stars 6 forks source link

Java.IO.FileNotFoundException (PCL project) #13

Closed Splinterjke closed 7 years ago

Splinterjke commented 7 years ago

Xamarin 4.3.0.636 Xamarin.Android 7.1.0.34 Xamarin.iOS 10.4.0.114 PCL xamarin.forms project. Plugin is referenced in each target platform (iOS and Android). I've created 'Sounds' folder in each platform and put *.mp3 file. Initializer.Initialize() is called. PlaySound is called in some command like this: await AudioManager.Audio.Manager.PlaySound("sound.mp3"); Build action property for mp3 files is 'Content' and 'Do not Copy'... So i get that Exception when tryin to call PlaySound. Any idea what's wrong?

denis-reichelt commented 7 years ago

@Splinterjke In Android, try to place the mp3 file under the Assets folder: Assets/Sounds/sound.mp3 Set the Build action to "AndroidAsset". Now the file should be found.

Splinterjke commented 7 years ago

@denis-reichelt Thank you. The issue is solved.

jcphlux commented 7 years ago

@denis-reichelt you are very helpful to have around 🥇