Author Topic: Android Back button  (Read 1878 times)

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1559
    • View Profile
Android Back button
« on: 2014-Nov-01 »
Hi Guys

My old AE used to allow me to use backbutton to exit and pause my apps

New version just exits if enabled and allows code to fire if false.

but not the older method which was best method.

Any one fix this?
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3690
    • View Profile
    • Space Fractal
Re: Android Back button
« Reply #1 on: 2014-Nov-01 »
This is by design to workaround limits and bugs on Android/glbasic (not sure why, but its out of my hand here).

Im cant really do anything like anymore and im wont look on this issue anymore, so its is are its are now. Android is a quite very pity hell on this issue and have fighted throught a long time with it (if its not a bug in glbasic eventuelly). So this is what you see and that it. Im wont do anything more about this issue.

Im remember the main reason im did this limits is simply glbasic dosent resume correctly and often crash out when back was used. This is why its best to disable it and doing that by code intead. If you enable it, your game will quit (which is more safe than getting those resume trouble).
« Last Edit: 2014-Nov-01 by spacefractal »
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1559
    • View Profile
Re: Android Back button
« Reply #2 on: 2014-Nov-01 »
No probs! Thanks SF

I 'm such a numpty! there is a pause method using the menu button...! As back button should be for quitting anyway...

The only issue i have is the buttons hiding - I need them to show themselves on PAUSE mode so user can press up main menu and game pauses...
Is that passible with code?


« Last Edit: 2014-Nov-01 by MrPlow »
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3690
    • View Profile
    • Space Fractal
Re: Android Back button
« Reply #3 on: 2014-Nov-01 »
in Karma Miwa Im uses this for back button when you are in game play:

First press activate the pause menu,
second press quit the pause menu and is now in the menu,
third back will now quit the game.

you can do similar like those with the backbutton. The backbutton when used with GameControllers("Menu")>600 OR GameControllers("Pause")>600 or something like that.

Property the can been bug in KEY(1) which is still holding down when touched it. Its should not do that. This is a bug im can fix to the next version.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1559
    • View Profile
Re: Android Back button
« Reply #4 on: 2014-Nov-02 »
I can work around the key(1) bug with a gettimerall() value so that the key(1) event expires after 100ms or so.
:)
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3690
    • View Profile
    • Space Fractal
Re: Android Back button
« Reply #5 on: 2014-Nov-02 »
Or just ADD a another variable so KEY(1) only invoke if that variable is false.... It's not really a bug, but no reason it's hold it.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.