Discussion Forums  >  Audio, Video, Playing, Recording

Replies: 1    Views: 331

pimentazores
Aspiring developer
Profile
Posts: 47
Reg: Mar 26, 2013
Barcelona
8,020
07/29/13 01:52 PM (10 years ago)

Load sound file (Android)

Hi guys, I'm quite sure the answer to this question must be somewhere in this forum but I just can't find it... I'm trying to add an audio file to my project. I am using the menu buttons plugin, and in each button configuration I add in Sound Effect File Name the name of the mp3 file (example.mp3;) that I want to be played when the button is pressed. The button is pointing to a dummy html file (not important, just for testing). After downloading the project, I paste the file into BT_Audio folder and import the project to Eclipse. I go to the file myproject_appDelegate.java and add this line soundEffectNames.add("example.mp3"); right after other sound effects, But when I try the app on my device it just doesn't play any audio. I have also tried to paste the mp3 file into BT_Documents folder, same result.. Any advice, suggestion, idea?
 
Jake Chasan
Veteran developer
Profile
Posts: 1685
Reg: May 13, 2011
location unknow...
29,650
like
07/29/13 10:23 PM (10 years ago)
This feature may not be compatible with Android. (I am not sure) 2 Ideas: 1. You could embed the audio in the HTML file (probably the easiest idea if you are going to end up using a HTML screen 2. You could install the Stream Audio Plugin for Android, and test to see if the audio file is recognized from the system (I have not tried this, and do not know exactly how this plugin works) Are you self hosted? Jake
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.