Guest User

Untitled

a guest
Oct 21st, 2016
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. - (void)applicationDidBecomeActive:(UIApplication *)application
  2. {
  3.  
  4. appStatus=@"Active";
  5. // [self addApplicationStatusToPList:@"applicationDidBecomeActive"];
  6. //
  7. // //Remove the "afterResume" Flag after the app is active again.
  8. self.shareModel.afterResume = NO;
  9.  
  10. if(self.shareModel.anotherLocationManager)
  11. [self.shareModel.anotherLocationManager stopMonitoringSignificantLocationChanges];
  12.  
  13. self.shareModel.anotherLocationManager = [[CLLocationManager alloc]init];
  14. self.shareModel.anotherLocationManager.delegate = self;
  15. self.shareModel.anotherLocationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation;
  16. self.shareModel.anotherLocationManager.activityType = CLActivityTypeOtherNavigation;
  17.  
  18. if(IS_OS_8_OR_LATER) {
  19. // [self.shareModel.anotherLocationManager requestAlwaysAuthorization];
  20. }
  21. [self.shareModel.anotherLocationManager startMonitoringSignificantLocationChanges];
  22.  
  23.  
  24. NSLog(@"applicationDidBecomeActive");
  25. NSLog(@"val....%@",[[NSUserDefaults standardUserDefaults] valueForKey:@"stepStatus"]) ;
  26. if ([[[NSUserDefaults standardUserDefaults] valueForKey:@"deviceId"] intValue]!=0) {
  27. [self check_deviceStatus_info];
  28. }
  29.  
  30. // 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.
  31. }
Add Comment
Please, Sign In to add comment