I’m not sure what you mean with ”suspend” on mobile. You only run one application at a time. If your app goes out due to a phone call or any other event it will normally quit your app and send a closeStack message and some more. If you want to create an application that doesn’t allow the screen lock to kick in you can do that via mobileLockIdleTimer, but don’t forget to unlock when you don’t need it anymore!
The first time you ask for location data the phone will pop up a message asking the user to allow location tracking (as that is a privacy feature). You need to check if you are allowed to track before trying to get location data. If the user disallows location tracking your app will never get any location data how much you even try! An app can also ask for location tracking as a background execution task. This is where the user selects ”Always” instead of ”When app is in use”. Then your app might get location data even if it is not the front-most application. Then your app will still get locations change updates. This is available as an experimental feature under the ”Standalone Application Settings” for iOS. I say might, because you can never be 100% sure. If the user starts an app that requires all memory your app might still be thrown out and terminated, but iOS is really good at shuffling memory so it usually works. I haven’t tried this experimental feature though so I can’t say if it works OK in LiveCode, but if you have a device for testing you can give it a try! Applications that will get permissions for always track location can also set up "location notifications”. Then your app will startup when you arrive or leave a specified location. E.g. this is how Remainders work when you set a Remainder to trigger based on location. E.g. When I leave home. :-Håkan On 17 Nov 2020, 16:26 +0100, Graham Samuel via use-livecode <email@example.com>, wrote: > Sorry if this is documented somewhere but I can’t find it. > > On desktop platforms, LC gives us “suspend” which is fired when the app goes > into the background. I seem to be having some problems with iOS, in that when > the screen locks (triggered by user action or a time limit), my app seems to > stop getting messages from the OS, so is in some sense suspended. This seems > to call for something like “suspend” for mobiles. Does such a message exist? > > Another thing that happens with iOS apps that use Location Services is that > the user is sometimes asked via a popu-up on the screen of the device whether > the app should be allowed to use these services when it’s not running. I > don’t know what triggers these user messages, nor am exactly certain what > ‘not running’ means - presumably if the app has been properly quit, that’s > something other than ‘not running’. In the Standalone Settings for mobile, > one can set Location Services as being a requirement, but there doesn’t seem > to be a setting corresponding to this user choice. > > Has anyone a clear understanding of all this? I would love to see an > explanation. > > TIA > > Graham > _______________________________________________ > use-livecode mailing list > firstname.lastname@example.org > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list email@example.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode