Where does NativeMobileResources PlaySound get its mp3?

0
The PlaySound-action of nativeMobileResources should be able to play a sound on my mobile, but how to pass a sound file to PlaySound-action's only parameter, ‘Audiofile’? It has to be a specialization of FileDocument, so I created an entity FeedbackSound for storing an audio file. I uploaded an audio file to the runtime using Dropzone, made sure synchronization was set to 'All objects’, but the javascript source is apparently not able to find that audio-file by Retrieve from database with [Name='Beep.mp3'] Also adding the file to any project-directory (/resources, /theme, /theme/resources) does not make the javascript able to find the audio file. Checking PlaySound's javascript code and reading https://github.com/zmxv/react-native-sound do not make it clear how to feed the audio file to the action. Can anyone explain how to feed the audio file to the PlaySound action?
asked
1 answers
1

Hi Tim,

Not that it helps a lot, but I’m not having any issues  playing audio-files (.mp3). I take the same steps you do: 

  1. upload to the database
  2. synchronise with mobile device
  3. retrieve object by Name 
  4. use object as parameter for playSound action

 

So, I guess the steps you follow are correct.

I do use the filemanager widget to upload the audio-files, instead of the dropzone. I guess you made sure the Name attribute of your FileDocument was set correctly after the upload, the object was committed, and the file has contents?

If the file is synchronised to your device, you should be able to find it by name in a nanoflow.

answered