i took the chimes.wav file from the Xojo Code Example.
And imported the file into the Andriod projekt (icon shows that ist an Sound file)
And made an very simple app - Button event pressed …
I cant get ist to work with Andriod!
I got ist to work with Mac with this example code from XOJO Docs:
Var soundFile As FolderItem = SpecialFolder.Ressorces.Child(“chimes.wav”)
If soundFile.Exists Then
Var tada As Sound = Sound.Open(soundFile)
Catch error As IOException
MessageBox("The sound file could not be opened. Error: " + error.Message)
Running Android its gets an IOExpeption at first Code Line “Var soundFile…”
How can i access the sound file within the build .apk ? ( .apk is like zipped folder, i can see that there are files in an folder res - also the .wav file but named BN.wav (??? why) not chimes.wav.
I added an build copy to put the file in Ressources.
That worked on Mac OS but not here!
I can see in the debugger that the app looks for the file in /Andriod/data… and not within the .apk build.
How can i put files within the .apk and how can i access them from the mobileapp Andriod?
What are the really names of the SpecialFolder Ressources ect.?
Perhaps they aren’t implemented already?
But make an Android app without playing an sound file (.wav) would be really alpha XOJO
I miss really some more Andriod examples - for simple things wie play an sound…