1. A method comprising: receiving, on a mobile device, an indication that an application executing on the mobile device has entered a background state; receiving, from the application, a value indicating a condition for providing location data to the application; disabling a resource associated with the application; while the resource associated with the application is disabled, storing location data received from a location system of the mobile device; and when the condition indicated by the value is met, enabling the resource associated with the application, and providing the stored location data to the application.