Android Question How to play mp3 sounds in b4a app Files folder

DickD

Active Member
Licensed User
I have an app that needs to play various warning beeps, buzzes and other notification sounds. I have these mp3 files in the Files folder of my B4a app. How do I get them to play? As far as I can tell the MediaPlayer Library only plays sound files that already exist on the android device.
 

DickD

Active Member
Licensed User
I looked at soundpool and it seems that the Load member opens a file that is stored on the phone, for example DirAssets. I want to be able to incorporate these small sound samples into the code of my app as you would include a bitmap or jpg in the case of graphic files.

Oh wait. I see that DirAssets contains files that were in the Files folder of the app so this probably will work. Thanks.
 
Upvote 0
Top