The problem was that the kitchensink project doesn’t include cordova.js as it is made for browsers.
The back button problem was solved by simply including “<script src=”./components/loader.js"></script>" in my index.html
I’m building a mobile app using Vue 2.0 and Onsen UI.
I used this https://github.com/OnsenUI/vue-onsenui-kitchensink as a base for my application.
And while I’m testing my app in my browser using “yarn run dev” everything works as expected, I can simulate the device back button using the ESC key and it works just like it’s supposed to.
However, after I build the project using “yarn run build” and upload it to Monaca, build a debug apk and install on my phone, the back button simply exits the app on every page. Same thing happens in the Monaca Debugger app.
Something else I noticed that might be related is that when I install the apk on my Samsung S8 the app is moved to the “Game Launcher” app as if it was a game, and the navigation field (with the home and back button) gets the additional options for locking etc as you get when launching a game.
Any ideas on what might be causing this?
Thanks for reading!
Could someone point me in the right direction to how this code would look?