ios-background-mode

Keeping the app in background mode for continuos location updates

帅比萌擦擦* 提交于 2019-12-06 13:32:50
My project is using a CLLocationManager object, receiving updates via: locationManager:didUpdateToLocations: I want these updates even though my app is in the background. So in info.plist i have set the, "Required background modes" list to App registers for location updates. But my testing shows that it does not receive the updates in background state. However, i'm not sure i'm having the correct perception of background state/ suspended state. This is how i think it works: After the home button is pressed, the app enters background mode for 5 seconds, and then enter suspended state. I guess

How to call API when App is killed in react native?

自作多情 提交于 2019-12-06 07:37:52
问题 I Want to call API in the background when App killed and set the data in AsyncStorage. I used the following library but not working for me. react-native-background-task react-native-background-fetch I want to called the API without time scheduling. The above both use the time Scheduling. Please help me. 回答1: You would need to implement the componentWillUnmount method on the root of your app or use a library like realm to save the state throughout the use of your app. Maybe worth checking out

How to stop/handle UI Operations in iOS when app moves to background state?

北城以北 提交于 2019-11-30 09:44:25
问题 My app can be launched via UIApplicationLaunchOptionsLocalNotificationKey in the background. In that case the usual flow to setup initail view controller and some animations on the app's landing-page/first-page of the app take place. My question is, Is this a good practice, If I leave these animations like this even when my app is launched via OS in background? Three things I am concerned about: Some animations are continuous, like a circular-dot(UIImage) expanding and shrinking, using

How to stop/handle UI Operations in iOS when app moves to background state?

a 夏天 提交于 2019-11-29 16:58:27
My app can be launched via UIApplicationLaunchOptionsLocalNotificationKey in the background. In that case the usual flow to setup initail view controller and some animations on the app's landing-page/first-page of the app take place. My question is, Is this a good practice, If I leave these animations like this even when my app is launched via OS in background? Three things I am concerned about: Some animations are continuous, like a circular-dot(UIImage) expanding and shrinking, using CAAnimation. Some views are added and removed as subviews to the keyWindow , based on user location. When

Is there any way to check if iOS app is in background?

随声附和 提交于 2019-11-27 17:28:25
I want to check if the app is running in the background. In: locationManagerDidUpdateLocation { if(app is runing in background){ do this } } DavidN App delegate gets callbacks indicating state transitions. You can track it based on that. Also the applicationState property in UIApplication returns the current state. [[UIApplication sharedApplication] applicationState] Aswathy Bose UIApplicationState state = [[UIApplication sharedApplication] applicationState]; if (state == UIApplicationStateBackground || state == UIApplicationStateInactive) { //Do checking here. } This may help you in solving

Is there any way to check if iOS app is in background?

眉间皱痕 提交于 2019-11-26 18:59:54
问题 I want to check if the app is running in the background. In: locationManagerDidUpdateLocation { if(app is runing in background){ do this } } 回答1: App delegate gets callbacks indicating state transitions. You can track it based on that. Also the applicationState property in UIApplication returns the current state. [[UIApplication sharedApplication] applicationState] 回答2: UIApplicationState state = [[UIApplication sharedApplication] applicationState]; if (state == UIApplicationStateBackground |

Background Location Services not working in iOS 7

允我心安 提交于 2019-11-25 23:54:20
问题 I\'ve recently upgraded my iOS devices to use iOS 7. One of the apps that we\'re developing uses background location services to track device location and all of our testers have reported that the app no longer appears to track in the background under iOS 7. We have verified that backgrounding for the app is enabled in the settings on the device and the previous build worked flawlessly under iOS 6. Even if the device were cycled, the app would restart after a location update. Is there

Periodic iOS background location updates

爷,独闯天下 提交于 2019-11-25 23:38:58
问题 I\'m writing an application that requires background location updates with high accuracy and low frequency . The solution seems to be a background NSTimer task that starts the location manager\'s updates, which then immediately shuts down. This question has been asked before: How do I get a background location update every n minutes in my iOS application? Getting user location every n minutes after app goes to background iOS Not the typical background location tracking timer issue iOS long