Android Phone > Previous > Exit ?

Discussion in 'Buildbox 3.0' started by Hoya, Apr 19, 2019.

  1. Hoya

    Hoya Boxer

    Joined:
    Apr 18, 2019
    Messages:
    5
    Likes Received:
    1
    How do I get app to exit when I press the device back button on Android phone?
     
    Last edited: Apr 19, 2019
  2. mamal

    mamal Boxer

    Joined:
    Jun 8, 2019
    Messages:
    43
    Likes Received:
    4
    i'm using build box 2 and this is happening and i didn't do anything it was there by default
    but i want to show a message when the button is pressed for a first time and then quit when button is pressed twice
     
  3. Snds

    Snds Boxer

    Joined:
    May 1, 2020
    Messages:
    6
    Likes Received:
    0
    Hello I have the same issue with buildbox 3. I cannot find a way to correctly exit the application.
    - Exit button in BuildBox... not working
    - Back button in Android.... not working.

    The only way to exit the App is to close the current running applicaiton in Android,... that is not good
     
  4. Hue Buildbox

    Hue Buildbox Administrator Staff Member

    Joined:
    May 11, 2017
    Messages:
    456
    Likes Received:
    209
    Google play & App store doesn't like back/exit buttons on thier apps. Exit button will only work on PC/.exe

    Having an exit button in the app just lessens your app's retention too, which affects your Google play rankings.
    Having an exit button also makes the user more likely to close the app too.
     
  5. Codifie

    Codifie Avid Boxer

    Joined:
    Apr 17, 2018
    Messages:
    364
    Likes Received:
    190

    Try this -
    • "B" key workaround for Android back button. Set any button to the "B" key and the Android back button will use this routing/function instead of the default behavior.
    Not sure if this method works anymore for BB3.
     
  6. Snds

    Snds Boxer

    Joined:
    May 1, 2020
    Messages:
    6
    Likes Received:
    0
    Thank you HueTheDev and Codifie.

    Codifie : I have added a buttong with "B" Key it is not working, but thanks for the tips

    HueTheDev, I don't catch what is yours suggestion to quit the app ? because the user anytime migth want to use his phone for doing something else than our game and, might like to quit the app, right ?

    So as Hoya said :
    "How do I get app to exit when I press the device back button on Android phone?"

    (sorry I don't know how to quote previous message or refer name)
     
  7. Codifie

    Codifie Avid Boxer

    Joined:
    Apr 17, 2018
    Messages:
    364
    Likes Received:
    190
    Sorry to hear it didn’t work, I wasn’t sure since I stopped developing for Android many years ago.

    What HueTheDev I think is trying to say is that The Android developers have stated, documented well if you search google, that an app should never exit on its own, The Android operating systems is supposed to kill the app on its own. Now granted most app/game developers have ignored this suggestion from Android, but technically an app is not supposed to offer an exit according to Android developers. It’s is discussed within this blog, which was posted several years ago yet still applies.
    http://blog.hatemalimam.com/exit-button-in-android-app/

    Many developers still incorporate an exit into their work, but technically Buildbox is following the Android guidelines. You can map an exit button as these developers do, but currently you would have to do it with code after exporting from Buildbox. It isn’t hard code to implement, and can be found easily doing a search, but you should have some coding experience to implement yourself or farm it out, not a pricey thing to contract out if needed.

    Confusing right! Just a small part of the reasoning I used to stop developing for Android, their operating system has become a mess, dating back years.

    EDIT:
    I should have mentioned that although Buildbox is currently adhering to Android suggestions this issue could easily be fixed by Buildbox if they simply hard coded a mapping for the B button, this would then cause an exit as you desire. I believe that is what they did in Buildbox 2. Maybe you will see this in a future update by the Buildbox team?
     
    Last edited: May 2, 2020
  8. Snds

    Snds Boxer

    Joined:
    May 1, 2020
    Messages:
    6
    Likes Received:
    0
    Hi Codifie,

    Yes, I understood the point of non Exit button in Android Apps, I agreed because it is like this.
    My point was why the hardware android back button, does not quit/hide the Buildbox app like all the other android apps.
     
  9. Codifie

    Codifie Avid Boxer

    Joined:
    Apr 17, 2018
    Messages:
    364
    Likes Received:
    190
    Gotcha. That issue needs a button mapped to that hardware button, used to be that way in BB2 and mapping it the B key used to work as well. This is something the BB team can easily fix I would think.
     
    Snds likes this.

Share This Page