Re: Android won't quit

2018-06-09 Thread J. Landman Gay via use-livecode
There's a pull request already, Panos was on it immediately. It will be 
fixed in the next release. Apparently the problem was reintroduced 
accidentally after it was fixed the first time.


Android has a swipe-to-kill also but a clean quit is better, of course. I 
do understand about the complexities of the Android OS, and Ralph was right 
that the problem was a null pointer.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On June 9, 2018 8:32:18 AM Sannyasin Brahmanathaswami via use-livecode 
 wrote:


Well, thanks  Ralph snaky explanation, I am gonna opt out. Call it a 
feature "will not implement"  and tell beta testers


"This goes against Android OS. If want quit the app, use the Android "Force 
Quit"


Even on iOS they have double click home and swipe up

Jacque said: "I want to wipe the app completely so that on next launch I can
reinitialize everything"

Hmmm. Tell turn your users to "Force Quit"  in order re-init.

Ugly UI,  of course. But there are certain processes where the OS wants to 
re-boot.


What fight it?

BR


?On 6/7/18, 8:01 AM, "use-livecode on behalf of J. Landman Gay via 
use-livecode" use-livecode@lists.runrev.com> wrote:


   It could be solved if we had suspend and resume messages but I heard this
   is difficult to implement on Android.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Android won't quit

2018-06-09 Thread Sannyasin Brahmanathaswami via use-livecode
Well, thanks  Ralph snaky explanation, I am gonna opt out. Call it a feature 
"will not implement"  and tell beta testers 

"This goes against Android OS. If want quit the app, use the Android "Force 
Quit"  

Even on iOS they have double click home and swipe up

Jacque said: "I want to wipe the app completely so that on next launch I can
reinitialize everything"

 Hmmm. Tell turn your users to "Force Quit"  in order re-init.

Ugly UI,  of course. But there are certain processes where the OS wants to 
re-boot. 

What fight it?

BR  
 

On 6/7/18, 8:01 AM, "use-livecode on behalf of J. Landman Gay via 
use-livecode"  wrote:

It could be solved if we had suspend and resume messages but I heard this 
is difficult to implement on Android.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

RE: Android won't quit

2018-06-07 Thread J. Landman Gay via use-livecode
It could be solved if we had suspend and resume messages but I heard this 
is difficult to implement on Android.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On June 7, 2018 12:49:10 PM Ralph DiMola via use-livecode 
 wrote:


This is not an easy thing to fix and can be broken easily. The app in 
memory is not corrupt but the restart of the app is probably exposing an LC 
engine bug.


Details for geeks...

To handle the Android unique app restart protocol: After you "Quit" or the 
app gets hibernated so to speak by the OS, the state of Activities, 
Fragments and Views will be saved. When returning back to the application , 
the system will start the process again, recreate the top activity. and you 
will get a Bundle with the stored state. This is where thing can go 
sideways,  the whole process was killed. So any Singletons (or any 
“application scope” objects), any temporary data, any data stored in 
“retained Fragments” ... Everything will be in a state as if the app was 
just launched , with one big difference , the state is restored and the app 
is at the point where you left the app. If the Activity you are depending 
on has some shared Object, or some injected dependency where you keep 
recent data then most likely the application will just crash on a 
NullPointerException because it didn’t expect the data to be null.


The Android OS is designed not to allow apps to be "stopped/killed" like 
desktop apps. That is why in the Application Manager it's call "Force 
stop". To work around the OS design (limitation?) LC could initiate the 
various activities with startActivityForResult(), and have the LC "quit" 
send back a result which tells the parent activity to finish(). That 
activity could then send the same result as part of its onDestroy(), which 
would cascade back to the main activity and result in no running 
activities, which should cause the app to close. But this is fighting the 
basic design of the Android OS and might break with a future OS upgrade.



Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net

-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf 
Of Sannyasin Brahmanathaswami via use-livecode

Sent: Thursday, June 07, 2018 12:26 PM
To: How to use LiveCode
Cc: Sannyasin Brahmanathaswami
Subject: Re: Android won't quit

Argh.  I thought I solved in this in my app. But LO... it appears to 
quit... but is actually not quitting... it leaves  a "corrupt" stack on the 
phone (android) and when you try to restart it, it opens to splash screen 
stack, but no messages are firing.  It is "stuck" ; does not appear to user 
as "crashed" ; but on is dead-on-arrival - just the card 1 of the launcher 
stack app, with logo.


Good think you caught this. I will have to let users on android force stop, 
as the only choice.


BR

J. Landman Gay

   I want to wipe the app completely so that on next launch I can
   reinitialize everything.



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Android won't quit

2018-06-07 Thread J. Landman Gay via use-livecode
When I first reported it, the problem was that the quit command unloaded 
all the libraries but left the app in memory. Sounds like what you see now. 
In my app it just crashes, but probably for the same reason.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On June 7, 2018 11:28:18 AM Sannyasin Brahmanathaswami via use-livecode 
 wrote:


Argh.  I thought I solved in this in my app. But LO... it appears to 
quit... but is actually not quitting... it leaves  a "corrupt" stack on the 
phone (android) and when you try to restart it, it opens to splash screen 
stack, but no messages are firing.  It is "stuck" ; does not appear to user 
as "crashed" ; but on is dead-on-arrival - just the card 1 of the launcher 
stack app, with logo.


Good think you caught this. I will have to let users on android force stop, 
as the only choice.


BR

J. Landman Gay

   I want to wipe the app completely so that on next launch I can
   reinitialize everything.



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


RE: Android won't quit

2018-06-07 Thread Ralph DiMola via use-livecode
This is not an easy thing to fix and can be broken easily. The app in memory is 
not corrupt but the restart of the app is probably exposing an LC engine bug.

Details for geeks...

To handle the Android unique app restart protocol: After you "Quit" or the app 
gets hibernated so to speak by the OS, the state of Activities, Fragments and 
Views will be saved. When returning back to the application , the system will 
start the process again, recreate the top activity. and you will get a Bundle 
with the stored state. This is where thing can go sideways,  the whole process 
was killed. So any Singletons (or any “application scope” objects), any 
temporary data, any data stored in “retained Fragments” ... Everything will be 
in a state as if the app was just launched , with one big difference , the 
state is restored and the app is at the point where you left the app. If the 
Activity you are depending on has some shared Object, or some injected 
dependency where you keep recent data then most likely the application will 
just crash on a NullPointerException because it didn’t expect the data to be 
null.

The Android OS is designed not to allow apps to be "stopped/killed" like 
desktop apps. That is why in the Application Manager it's call "Force stop". To 
work around the OS design (limitation?) LC could initiate the various 
activities with startActivityForResult(), and have the LC "quit" send back a 
result which tells the parent activity to finish(). That activity could then 
send the same result as part of its onDestroy(), which would cascade back to 
the main activity and result in no running activities, which should cause the 
app to close. But this is fighting the basic design of the Android OS and might 
break with a future OS upgrade.


Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net

-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of 
Sannyasin Brahmanathaswami via use-livecode
Sent: Thursday, June 07, 2018 12:26 PM
To: How to use LiveCode
Cc: Sannyasin Brahmanathaswami
Subject: Re: Android won't quit

Argh.  I thought I solved in this in my app. But LO... it appears to quit... 
but is actually not quitting... it leaves  a "corrupt" stack on the phone 
(android) and when you try to restart it, it opens to splash screen stack, but 
no messages are firing.  It is "stuck" ; does not appear to user as "crashed" ; 
but on is dead-on-arrival - just the card 1 of the launcher stack app, with 
logo.

Good think you caught this. I will have to let users on android force stop, as 
the only choice.

BR 

J. Landman Gay 

I want to wipe the app completely so that on next launch I can 
reinitialize everything.



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Android won't quit

2018-06-07 Thread Sannyasin Brahmanathaswami via use-livecode
Argh.  I thought I solved in this in my app. But LO... it appears to quit... 
but is actually not quitting... it leaves  a "corrupt" stack on the phone 
(android) and when you try to restart it, it opens to splash screen stack, but 
no messages are firing.  It is "stuck" ; does not appear to user as "crashed" ; 
but on is dead-on-arrival - just the card 1 of the launcher stack app, with 
logo.

Good think you caught this. I will have to let users on android force stop, as 
the only choice.

BR 

J. Landman Gay 

I want to wipe the app completely so that on next launch I can 
reinitialize everything.



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode