Livecode Mobile App in Background

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Livecode Mobile App in Background

** Clarence P Martin ** via use-livecode
There’s been a lot of talk about this, but does any one have a working method for getting the app to not exit when it’s suspended?   Need a solution for both iOS and Android.  If it could stay alive for like 10 munites, that’s all I need.  My client doesn’t want the app to have to completely reload (app boot is a little lenghty) just to bring up a calculator to add a few numbers.   They want it to work like most apps do.

Any solution would be a lifesaver!!

-Dan
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Livecode Mobile App in Background

** Clarence P Martin ** via use-livecode
The plist can be edited for this. If you search plist on this list, you will find instructions.

Augmented Earth hibernates rather than being shut down.

Sent from my iPhone

> On Aug 11, 2017, at 9:10 PM, Dan Friedman via use-livecode <[hidden email]> wrote:
>
> There’s been a lot of talk about this, but does any one have a working method for getting the app to not exit when it’s suspended?   Need a solution for both iOS and Android.  If it could stay alive for like 10 munites, that’s all I need.  My client doesn’t want the app to have to completely reload (app boot is a little lenghty) just to bring up a calculator to add a few numbers.   They want it to work like most apps do.
>
> Any solution would be a lifesaver!!
>
> -Dan
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Livecode Mobile App in Background

** Clarence P Martin ** via use-livecode
Here are the instructions Ralph made. I think you can now load up your own custom plist if you want to, but these steps work.

Big thanks to Ralph for this:)

1) Go to the Applications folder
2) Right click on the LC app you are using and select "Show Package
Contents"
3) Navigate to the "Tools/Runtime/iOS" folder
4) Right click on all the device/simulator folders one at a time and select
"Get Info"
5) At the bottom click on the "Read only" to the right of your account name
and select "Read & Write"
6) Repeat 5 for all device/simulator folders
7) In each of the device/simulator folders edit the setting.plist file.
8) To edit... right click the setting.plist file and select "Open With" and
then "Other..." and select "TextEdit.app".
9) You will get a warning that the file is locked. Choose the Unlock option.

10) Either change UIApplicationExitsOnSuspend key value to "False" or like I
do delete the key all together(2 lines)
11) repeat 8-10 for setting.plist in each of the device/simulator folders.
12) Fire up LC and make an iOS app.

Ralph DiMola
IT Director
Evergreen Information Services
[hidden email]

Sent from my iPhone

> On Aug 11, 2017, at 9:24 PM, [hidden email] wrote:
>
> The plist can be edited for this. If you search plist on this list, you will find instructions.
>
> Augmented Earth hibernates rather than being shut down.
>
> Sent from my iPhone
>
>> On Aug 11, 2017, at 9:10 PM, Dan Friedman via use-livecode <[hidden email]> wrote:
>>
>> There’s been a lot of talk about this, but does any one have a working method for getting the app to not exit when it’s suspended?   Need a solution for both iOS and Android.  If it could stay alive for like 10 munites, that’s all I need.  My client doesn’t want the app to have to completely reload (app boot is a little lenghty) just to bring up a calculator to add a few numbers.   They want it to work like most apps do.
>>
>> Any solution would be a lifesaver!!
>>
>> -Dan
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Livecode Mobile App in Background

** Clarence P Martin ** via use-livecode
In reply to this post by ** Clarence P Martin ** via use-livecode
There are a couple of hitches.. I believe that Mark said that timers going off while running in the background may not work or lock up the app. There are other issues but I have not had any problems. It's an option in v9 iOS standalone setting but it's a "use at your own risk" type of thing.

Ralph DiMola
IT Director
Evergreen Information Services
[hidden email]


-----Original Message-----
From: use-livecode [mailto:[hidden email]] On Behalf Of Dan Friedman via use-livecode
Sent: Friday, August 11, 2017 10:12 PM
To: [hidden email]
Cc: Dan Friedman
Subject: Re: Livecode Mobile App in Background

Ralph,

Thank you for the detailed reply!   I tried it and it seems to work great.   One question… if it’s that simple, why hasn’t LiveCode offered this as a feature?   Seems like it would take a few minutes to write this in?   Is there a catch to using this method?

-Dan
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Livecode Mobile App in Background

** Clarence P Martin ** via use-livecode
I think I remember that "wait" is a problem too.

Meanwhile I know of no solution for Android. The OS controls what runs in
the background and when it gets wiped from RAM. You'll never know when that
happens either. It's an issue that causes trouble.

If anyone knows of a solution before I talk about this in my presentation
on Thursday, do tell.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com



On August 11, 2017 9:34:41 PM Ralph DiMola via use-livecode
<[hidden email]> wrote:

> There are a couple of hitches.. I believe that Mark said that timers going
> off while running in the background may not work or lock up the app. There
> are other issues but I have not had any problems. It's an option in v9 iOS
> standalone setting but it's a "use at your own risk" type of thing.
>
> Ralph DiMola
> IT Director
> Evergreen Information Services
> [hidden email]
>
>
> -----Original Message-----
> From: use-livecode [mailto:[hidden email]] On Behalf
> Of Dan Friedman via use-livecode
> Sent: Friday, August 11, 2017 10:12 PM
> To: [hidden email]
> Cc: Dan Friedman
> Subject: Re: Livecode Mobile App in Background
>
> Ralph,
>
> Thank you for the detailed reply!   I tried it and it seems to work great.  
>  One question… if it’s that simple, why hasn’t LiveCode offered this as a
> feature?   Seems like it would take a few minutes to write this in?   Is
> there a catch to using this method?
>
> -Dan
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Livecode Mobile App in Background

** Clarence P Martin ** via use-livecode
One of things the engine doesn't give you notifications on suspend and resume - it is something on the todo list, however the last time we tried it turned out to be considerably harder than we thought (although that could be that we were overthinking things...).

In reality these kinds of notification are advisory at best, certainly under iOS they come with significant constraints which means that you have to be very careful what you do at those points.

Indeed, the 'brutal' truth is that if your app is suspended it means it is but a hairs breadth from being forcibly expunged - so the best thing to do is to ensure that at suitable points during user interaction you save the state you need to come back to that point. This means that even if your suspend handler (when we add that to the engine) does get terminated prematurely (which is a matter of wall clock time spent in it) that doesn't matter.

Indeed, working like that means that suspend and resume aren't really that relevant - the engine already turns off the things you need to when suspended and turns them back on when it resumes.

Putting it another way, save state as your app runs - don't wait for a suspend or quit notification as you may not have time in those to actually save everything you might need to. Saving state incrementally whilst in the foreground is a much more reliable approach.

Warmest Regards,

Mark.

Sent from my iPhone

> On 12 Aug 2017, at 03:49, J. Landman Gay via use-livecode <[hidden email]> wrote:
>
> I think I remember that "wait" is a problem too.
>
> Meanwhile I know of no solution for Android. The OS controls what runs in the background and when it gets wiped from RAM. You'll never know when that happens either. It's an issue that causes trouble.
>
> If anyone knows of a solution before I talk about this in my presentation on Thursday, do tell.
>
> --
> Jacqueline Landman Gay         |     [hidden email]
> HyperActive Software           |     http://www.hyperactivesw.com
>
>
>
>> On August 11, 2017 9:34:41 PM Ralph DiMola via use-livecode <[hidden email]> wrote:
>>
>> There are a couple of hitches.. I believe that Mark said that timers going off while running in the background may not work or lock up the app. There are other issues but I have not had any problems. It's an option in v9 iOS standalone setting but it's a "use at your own risk" type of thing.
>>
>> Ralph DiMola
>> IT Director
>> Evergreen Information Services
>> [hidden email]
>>
>>
>> -----Original Message-----
>> From: use-livecode [mailto:[hidden email]] On Behalf Of Dan Friedman via use-livecode
>> Sent: Friday, August 11, 2017 10:12 PM
>> To: [hidden email]
>> Cc: Dan Friedman
>> Subject: Re: Livecode Mobile App in Background
>>
>> Ralph,
>>
>> Thank you for the detailed reply!   I tried it and it seems to work great.   One question… if it’s that simple, why hasn’t LiveCode offered this as a feature?   Seems like it would take a few minutes to write this in?   Is there a catch to using this method?
>>
>> -Dan
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Livecode Mobile App in Background

** Clarence P Martin ** via use-livecode
On 8/12/17 8:27 AM, Mark Waddingham via use-livecode wrote:
> Indeed, working like that means that suspend and resume aren't really that relevant - the engine already turns off the things you need to when suspended and turns them back on when it resumes.

There's a major problem if the user issues the "quit" command on
Android. The engine removes all libraries in use when that happens, but
the OS leaves the app in RAM. When the app next resumes, libraries
aren't there and all calls to library functions silently abort.

<http://quality.livecode.com/show_bug.cgi?id=19297>

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Loading...