首页 > 解决方案 > When Standard Location Service and Significant Location Changes are used together, What`s happen?

问题描述

Simultaneous use of Standard Location Service and Significant Location Change.

I’m trying to develop App using Location Information. Can Standard Location Service and Significant Location Changes be used together? I currently use Standard Location Service in the main. However, Even when the app is in not running state, I want to use a location service in my app. So I am trying to use not only Significant Location Changes but also Standard Location Service.

Then some questions came up,

  1. When Standard Location Service and Significant Location Changes are used simultaneously, what`s happening? Do the two functions work simultaneously? Does only one function work? Assumption

  2. If only one function works, which one will work?

  3. If the two functions work simultaneously, Is there a problem with battery consumption?

标签: swiftcllocationmanager

解决方案


The significant-change location service offers a more power-friendly alternative for apps that need location data but do not need frequent updates or the precision of GPS. This can run when the application is in foreground, background or not running state. So if your application does not need very frequent locations updates then you can use this. FYI it delivers location updates to your app only when the user’s position changes by a significant amount, such as 500 meters or more.

Standard location service will work when the application is running in foreground state and background state(when the back ground mode for location is enabled) only. As soon as the application will get killed(by user or iOS) the standard location service will stop working.

For this you have to set the significant location change service which will wake your application in the background and provide the location updates to your application.

So you should analyse the functionality in your application and check the required frequency of the location and decide your implementation.

  1. Both do not work simultaneously. Only one will work according to the application's requirement and application state.

  2. Both services will work according to the previously mentioned.

  3. They do not work simultaneously. But if you choose significant location changes to implement then it will be far more battery efficient but the location fetching accuracy will be very low.


推荐阅读