Welcome! Log In Create A New Profile

Advanced

WM22 Android - prevent re-starting on Overview button

Posted by Peter Muckle 
WM22 Android - prevent re-starting on Overview button
September 17, 2018 06:46PM
Hi All,

I think this has been asked before but I can't find the post.

When using the 'Overview' button with WM apps, they sometimes re-start rather than allowing the user to pick up where they left off. Not every time, but enough to make it a problem.

Is there a way to prevent a re-start happening from the Overview?

Thanks

Pete
Re: WM22 Android - prevent re-starting on Overview button
September 18, 2018 01:34PM
Hi Peter,

I have seen the same thing happening for one of my application, and numerous applications that I'm using on different phones and tablet... It SEEMS that it started with android 7 and is NOT windev mobile specific (I found multiple references to the problem on android development forums).

I have contacted PCSoft regarding that problem and unfortunately, even with all my details, they were not able to reproduce the problem.

So the workaround I coded BEFORE contacting PCSoft is still in function to this day. Here is how I made it work:
- First, I have to tell you that my application is using a persistant thread, and that thread is NOT stopped in your circumstances; but the windows ARE closed.
- in the project code area "loosing focus" (can't remember the exact name) which is fired each time your application is loosing the screen, basically; I run a global procedure saving everything that needs to be saved (windows/plane/fields visibility/content)
- in the project code area "gaining focus" (can't remember the exact name) which is fired when the window is coming back to the screen, whether it has been closed or not, I reset everything based on what I saved. On the phones where the problem does not appear, this code runs for nothing as everything is already set up properly, but when the problem IS there, my code reset instantly everything that is needed, and it's invisible to the user

FYI: all this was done in v22 (not tested in v23 yet)

Hope this helps

Best regards

Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

More information on [www.fabriceharari.com]



Edited 1 time(s). Last edit at 09/18/2018 01:34PM by fabriceharari.
Re: WM22 Android - prevent re-starting on Overview button
September 19, 2018 09:51AM
Thanks Fabrice
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: