I have been working on this app in my spare time, which has been driving me crazy for months on one last part that makes it ready for release.
Now the only issue is when you exit the app and go back into it and error message pops up saying "a reference already exist for the specified audio id". Which is likely because trying to reiniatlize the nativeaudio.js module again. Which is harmless message as the app still works. However it just doesn't look aethetically polished for a released product.
I've been tearing my hair out to supress that error message and have been trying everything like error catching or capturing the event when the back button is pressed and storing that event in a variable and doing things on a different path.
I just really want to find a way to supress pop ups happening for a certain amount of time and re-enabling them. Since probably error catching is not working since not technically an error. Any easy way to do this?
Attached below is a link which has the source code and compiled / packaged APK file. You can only really see this message pop if you load up the APK on android and then exit the up with the back button (Or in my case I'm using NOX emulator and I hit ESC) and then reclick on the app where the message pops up.
Link with source and APK :
The app will just show a blank screen and make a quick sound that sounds like a car door opening when you open the app. It does more obviously, however I strip down the code to just simplify it to the last problem. Don't really want to make any other changes such as not using the nativeaudio.js since again spent amount of months on that doing this project on the side, while balancing with my full time job.
The main index source code is also below. Again a stripped down version just to get to the core of the problem.