The latest iOS application Google Map (currently version 4.9.0) has a very nice feature, but so far I canβt understand how this is possible.
Function: whenever I get into my car, try to drive somewhere, the Google map will send me a notification on my phone, guess where I am going, giving traffic estimates, even when the phone is in and the Google map application has not been used for a few days. The screenshot is shown as follows:

This is very surprising for me as an iOS developer. How can he live in the background and detect that I enter the car with such accuracy?
One of my assumptions: Google Map uses a significant location-changing API. Using this method, the application can be woken up in the background, but there is still no guarantee that it will wake up when I enter my car. And I already wrote a test application using this mechanism, although it can be woken up in the background, but the time is not right, I could not find out that I was entering the car or not.
CLLocationManager class reference
If you run this service and your application is subsequently terminated, the system will automatically restart the application in the background if a new event arrives. In this case, the parameter dictionary is passed to the application: willFinishLaunchingWithOptions: and application: didFinishLaunchingWithOptions: the methods of your application delegate contain the UIApplicationLaunchOptionsLocationKey key to indicate that your application was launched due to a location event. After the restart, you should still configure the location manager object and call this method to continue receiving location events. When you restart location services, the current event is delivered to your delegate immediately. In addition, the location property of your location manager object is populated with the most recent location object before you even begin to perform location services.
Any suggestion and help appreciated.
source share