playMaker

Author Topic: Instead of Application Quit  (Read 4710 times)

szomaza

  • Sr. Member
  • ****
  • Posts: 253
Instead of Application Quit
« on: March 07, 2015, 07:02:49 AM »
I can't find an action that would just close the application to be "paused" in the background.

This one quits the application.
https://hutonggames.fogbugz.com/default.asp?W672

When using this the application closes and after clicking the application icon again it restarts from the beginning.
What I would like is to have an action that does what the Android Home button does to a running application. It does not quit it, but just puts it into the background.
In this case when clicking the application again to restart it, it does not start from the beginning but quickly comes up and continues where it was left before the home button was pressed.

I would like to use this action instead of the quit one when the user taps the back/return Android button to just close the app temporarily instead of totally quitting it.

br,
szomaza

szomaza

  • Sr. Member
  • ****
  • Posts: 253
Re: Instead of Application Quit
« Reply #1 on: March 14, 2015, 08:25:46 AM »
Can an action be made to do what pressing the HOME button on Android does:

http://android.stackexchange.com/questions/15701/what-happens-to-a-running-program-when-home-button-is-pressed-in-android-phone
"The task is moved to the background when you press Home and sits in memory, not really doing anything and retaining its state. This means that (generally speaking) you can switch back to the task and it will pick up where it left off."

Currently we only have a Quit action, that closes the application.

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: Instead of Application Quit
« Reply #2 on: March 14, 2015, 11:44:41 AM »
To get an android app to pass amazon, it must be able to pause and come back where it left off.  If you use BASIC4android, you can easiely do this.  It is designed for android only.  However, unity is cross platform.  A X-Box does not have he same buttons as a I-phone or android.  When designing in Unity you have to keep generic.  So to answer your question, the device should pause the game and when you relaunch it, it should pick up where it left off.

Android has a memory manager.  If too much memory is being used, it will dump off paused apps to make room.  In that case the game will not come back from pause.

Note:  I wrote a app on amazon using BASIC4android.  I have it completely exit the app and when reloaded it starts over.  After several email they finally approved it.  They allowed it not to auto pause.  the reason had to do with the databases being set up.  By pausing, sometimes they would get errors.  This was the only way around it.  Eventually amazon approved of this, but it is NOT the norm.

szomaza

  • Sr. Member
  • ****
  • Posts: 253
Re: Instead of Application Quit
« Reply #3 on: March 16, 2015, 01:57:21 AM »
Yes, exactly what I would like: just pause the application and not quit it completely.
There is an action for quit:
https://hutonggames.fogbugz.com/default.asp?W672

but none to just pause and leave it in the background so the user can get right back to where she left off later.

I doubt it that BASIC4android, http://www.b4x.com/ would be needed just be able to do that, when quit is so simple:
http://docs.unity3d.com/ScriptReference/Application.Quit.html

Br,
szomaza

szomaza

  • Sr. Member
  • ****
  • Posts: 253