Mintoris Forum

Author Topic: Execution in the background interrupted by the cell phone  (Read 1365 times)

FabianClub

  • Full Member
  • ***
  • Posts: 78
I made an update to my accessible pet game. I added that when the player leaves the game, pressing the Home key on the cell phone, the program enters a loop where he performs the checks of the pet's states (hunger, thirst, bath, health, etc.) and if he needs something, he notifies with sounds of the animal and with vibration. When you return the program to run in the foreground, leave this loop and return to the execution of the original program.
All this works perfectly. But there's a problem. After a certain time, my cell phone and others stop executing programs running in the background. That makes the cell phone automatically, to save battery. When this happens, when the application is executed again (through the main shortcut) the screen is completely black. He does not even run again from the beginning, he just goes black without answering. To reuse the game, I must kill the process, and then restart the game.
However, other applications continue to work in the background, and do not end, even when the user finishes all processes. For example, WhatsApp, Facebook, some games, etc. In addition, these programs autoinician with the ignition of the cell phone.

I think it would be necessary to have these opportunities in Mintoris Basic, and to expand and improve the SetOnPauseSub and SetOnResumeSub. Or maybe, add execution options in the background (choose the level) and autonomy of the application, when the project is exported.

FabianClub

  • Full Member
  • ***
  • Posts: 78
Re: Execution in the background interrupted by the cell phone
« Reply #1 on: May 27, 2018, 07:31 PM »
Meanwhile, is there a way to solve this for the problem that happens to me? Is there a simple way to prioritize the process of my game so that it does not automatically kill the cell phone? Any changes that can be made to the manifest in Android Studio?

sraffens

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 220
Re: Execution in the background interrupted by the cell phone
« Reply #2 on: May 28, 2018, 01:35 AM »
I guess that you know
 - Android activity-lifecycle.
 - most like:
      SetOnResumeSub is an extension of onResume() callback.
      SetOnPauseSub is an extension of onPause() callback.
 - Android does not like the UI thread to be blocked.
 - programs in the background do not have direct access to the UI.
 - with without access to the UI, any output can halt your thread.
 - BASIC is running on the UI thread and does many things not to block the UI thread.
 - BASIC 8 may be running on a background thread, that makes fewer things to check so that the UI thread is not blocked.

FabianClub

  • Full Member
  • ***
  • Posts: 78
Re: Execution in the background interrupted by the cell phone
« Reply #3 on: May 28, 2018, 03:00 AM »
Since you name it: Any news of the launch of Mintoris Basic 8?

sraffens

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 220
Re: Execution in the background interrupted by the cell phone
« Reply #4 on: May 28, 2018, 03:33 AM »
BASIC 8.0, that is not my place to say. I don't know if you can see the BASIC 8.0 change log, it a good place to get the latest.

Mintoris

  • Administrator
  • Full Member
  • *****
  • Posts: 57
Re: Execution in the background interrupted by the cell phone
« Reply #5 on: Jun 02, 2018, 04:48 AM »
I'm working very hard on version 8, but I don't want to make a guess on a release date. Things always take longer than I expected. When I'm working, I always tell myself that I can take as much time as I need and put extra effort into each feature to make it the best. I hope for a release sometime this summer.

Marietoupt

  • Full Member
  • ***
  • Posts: 31
Execution in the background interrupted by the cell phone
« Reply #6 on: Oct 16, 2019, 12:48 AM »
Perhaps Apple installs the original macOS on a Mac the same way as they do now with iOS on an iPhone/iPad. Does anyone know how they do that?

Marietoupt

  • Full Member
  • ***
  • Posts: 31
Execution in the background interrupted by the cell phone
« Reply #7 on: Nov 01, 2019, 08:37 AM »
no dont work for me i have vista 32 and when i try vpinball.exe as admin it load 2-3 seconds and then Visual pinball not responding….or its Kaspersky?


Also vpinball.exe work very good on my Xp pc

Marietoupt

  • Full Member
  • ***
  • Posts: 31
Execution in the background interrupted by the cell phone
« Reply #8 on: Nov 02, 2019, 10:30 AM »
I don't do that much imaging these days, but you can select the log window, resize to full window, then select Runtime from the Window menu. You can even do this while the imaging process is under way, if I recall correctly…

MamieNut

  • Jr. Member
  • **
  • Posts: 3
Execution in the background interrupted by the cell phone
« Reply #9 on: Nov 20, 2019, 11:11 PM »
I'm also interested in knowing with reason for the change to the log display. Can the logs be changed back to display in the background instead of a separate window? How do set that and are there any ramifications to doing so? Thanks