Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)applicationDidBecomeActive:(UIApplication *)application
- {
- appStatus=@"Active";
- // [self addApplicationStatusToPList:@"applicationDidBecomeActive"];
- //
- // //Remove the "afterResume" Flag after the app is active again.
- self.shareModel.afterResume = NO;
- if(self.shareModel.anotherLocationManager)
- [self.shareModel.anotherLocationManager stopMonitoringSignificantLocationChanges];
- self.shareModel.anotherLocationManager = [[CLLocationManager alloc]init];
- self.shareModel.anotherLocationManager.delegate = self;
- self.shareModel.anotherLocationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation;
- self.shareModel.anotherLocationManager.activityType = CLActivityTypeOtherNavigation;
- if(IS_OS_8_OR_LATER) {
- // [self.shareModel.anotherLocationManager requestAlwaysAuthorization];
- }
- [self.shareModel.anotherLocationManager startMonitoringSignificantLocationChanges];
- NSLog(@"applicationDidBecomeActive");
- NSLog(@"val....%@",[[NSUserDefaults standardUserDefaults] valueForKey:@"stepStatus"]) ;
- if ([[[NSUserDefaults standardUserDefaults] valueForKey:@"deviceId"] intValue]!=0) {
- [self check_deviceStatus_info];
- }
- // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
- }
Add Comment
Please, Sign In to add comment