Mobile phones do "nothing well" at last. A stock iPhone 6 has essentially no battery drop overnight, while a stock Nexus 6 running Android 6.0 loses only 6% battery in that time. However, this is achieved by severely restricting back- ground operation: iOS has always restricted the set of operations performed in the background, while Android 6.0 doze mode forces apps to perform their background operations in periodically scheduled maintenance windows. In this paper, we explore a technique for app-OS cooperation to manage background processing. We use the new geofencing APIs, which notify the app when the user leaves a defined region, to turn off location data collection when the user is "loitering" and restart automatically when she starts moving. With this change, we are able to drop the power drain for automatic monitoring of location and activity over a day by 35% to 82% on iOS and up to 100% on Android, depending on the accuracy and sampling rate. The tradeoff is that the error at the start of a trip is higher: we get no points until we exit the geofence, and the first few points after exiting may be at a lower sample rate. We present a summary of the challenges encountered in the practical implementation of our open source library for geofenced duty cycling, particularly on iOS, and the techniques that we used to overcome them. This evaluation, discussion and library can provide a practical design guide for researchers who plan on writing their own sensing applications.




Download Full History