[Interest] Location when the App is Killed/Terminated/Suspended
Manoel Neto
manoelnetom at gmail.com
Mon Aug 22 22:47:48 CEST 2016
Hi ,
I'm building an APP using QT/QML for IOS / Android and need to use
location when the APP is Killed, suspended or terminated. For IOS i
did an Objective C implementation and used
startMonitoringSignificantLocationChanges method from
CLLocationManager class.
Briefly, I extended the QIOSApplicationDelegate to have access to the
didFinishLaunchingWithOptions method. There i check the option key "
UIApplicationLaunchOptionsLocationKey" and, if ok, start monitoring
Location using a LocationManager Delegate. The Background App Refresh
is enable for the Location updates to work in the background.
I folow an example code (in IOS) tha works great even when the app is
Killed, suspended or terminated. The only diference from my QT code
is that in QT i use QIOSApplicationDelegate instead of system delegate
in IOS. But in QT the didFinishLaunchingWithOptions is never called
when the ap is Killed, suspended or terminated.
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
.....
shareModel = [LocationManager sharedManager];
if ([launchOptions objectForKey:UIApplicationLaunchOptionsLocationKey]) {
[shareModel startMonitoringLocation];
}
}
Any suggestion?
Best R,
Manoel
--
Manoel Carvalho Marques Neto
manoelnetom at gmail.com
More information about the Interest
mailing list