Browser- on mobile back button pressed doesn't always work- Android

0 favourites
  • 6 posts
From the Asset Store
This Girls Game allows young fashionistas to develop their taste and skills as a fashion designer.
  • Hi, I'm using the "Browser -> on mobile back button pressed" event in one layout to close a menu hidden on a layer, and on another layout I'm using it to go to the previous layout.

    After exporting with Cordova to Debug APK, The event usually doesn't work the first time after opening the game, but if an Android user presses their Android home button, then multitasks back to the game, then I notice the event works after that.

    Does anyone else have this issue or have a way to fix it?

    These are two different layouts.

  • Hi, I'm using the "Browser -> on mobile back button pressed" event in one layout to close a menu hidden on a layer, and on another layout I'm using it to go to the previous layout.

    After exporting with Cordova to Debug APK, The event usually doesn't work the first time after opening the game, but if an Android user presses their Android home button, then multitasks back to the game, then I notice the event works after that.

    Does anyone else have this issue or have a way to fix it?

    These are two different layouts.

    I forgot to add, when I said "The event usually doesn't work the first time after opening the game",

    usually, upon that first time of opening the game before going to the home screen and back to the game, what it does no matter what is if a user presses the back button it exits the game, even though I want it doing what I expressed in the events. But it's strange to me because if a user opens the game, then presses the home button, then navigates back to the game through their multitasking screen, then the events work as expected.

  • this is unfortunately a very well known issue :(

    For me the only way of solving this is to export with Android Studio and comment out one line (103) from the splash plugin. then it works fine.

    there exist a fork of the plugin as well, but then you will need to build the apk with cordova on your own.

    If you use the C3 exporter the back-button don't work (only work if you unfocus with home-button and go back)

  • this is unfortunately a very well known issue :(

    For me the only way of solving this is to export with Android Studio and comment out one line (104) from the splash plugin. then it works fine.

    there exist a fork of the plugin as well, but then you will need to build the apk with cordova on your own.

    If you use the C3 exporter the back-button don't work (only work if you unfocus with home-button and go back)

    That sucks. Any word on them fixing it?

  • ashley has filed a bug to cordova, but the bug report seems pretty dead. github.com/apache/cordova-android/issues/1106

    I had to download and start using Android Studio.

    there is no error with the back-button events, but with the regular cordova splash plugin it won't work. So I guess many people stopped to use the regular and started to use the unofficial fork

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • ashley has filed a bug to cordova, but the bug report seems pretty dead. github.com/apache/cordova-android/issues/1106

    I had to download and start using Android Studio.

    there is no error with the back-button events, but with the regular cordova splash plugin it won't work. So I guess many people stopped to use the regular and started to use the unofficial fork

    Alright, I guess I'll have to learn one of the work arounds. I'd rather that stuff work appropriately, to not look too much like a novice.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)