0

I save an mp3 file named 'sound1.mp3' in assets folder. In App.js, I call:

let sound1 = new Sound(requires('./assets/sound1.mp3'), Sound.MAIN_BUNDLE, (error) => {});
sound1.play((ok) => {});

It worked. But when I disconnect my android phone from my computer and restart the app, it can not play mp3 file. Please help me.

1 Answers1

0

When we disconnect from the development server, It sometimes results in unexpected behavior. Create an APK and try with that.

  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-ask). – Community Sep 16 '21 at 16:43