CB-7556 - iOS: Clearing all Watches does not stop Location Services
CB-7556 - iOS: Clearing all Watches does not stop Location Services

iOS shows a little arrow in the status bar if location services are in use. When you set a watch on Location Manager, it starts tracking position, and the arrow symbol appears. However, when that watch is cleared, no command to Location Manager is sent to stop tracking, so the arrow stays visible, even though in reality, the app is not using location services. My guess is that this also impacts battery life to some extent, especially if your iOS app has background location enabled.

This fix would automatically stop tracking location once all watched are cleared, so that the arrow symbol in the iOS status will disappear.

Tested on iOS 7.1.2.

Signed-off-by: Shazron Abdullah <2e7a002aa6629ab76d1450ba04a3f6f9088254af@apache.org>

wufeifei/cordova-plugin-geolocation,SupremumLimit/cordova-plugin-geolocation,ZHOUSHURENewq/geolocation,talentmail/cordova-plugin-geolocation,cordova-ubuntu/cordova-plugin-geolocation,tdenovan/cordova-plugin-geolocation,wufeifei/cordova-plugin-geolocation,cordova-ubuntu/cordova-plugin-geolocation,AgrawalRahul/cordova-plugin-geolocation,apache/cordova-plugin-geolocation,SupremumLimit/cordova-plugin-geolocation,ccloquet/cordova-plugin-geolocation,heidiyasser/Geolocation,Icenium/cordova-plugin-geolocation,Icenium/cordova-plugin-geolocation,danieldai/cordova-plugin-geolocation-china,dingxin/cordova-plugin-geolocation,corimf/cordova-plugin-geolocation,bopo/cordova-plugin-geolocation,danieldai/cordova-plugin-geolocation-china,pwbs/cordova-plugin-geolocation,dingxin/cordova-plugin-geolocation,AgrawalRahul/cordova-plugin-geolocation,ccloquet/cordova-plugin-geolocation,talentmail/cordova-plugin-geolocation,revolunet/cordova-plugin-geolocation,Geotab/cordova-plugin-geolocation,protonet/cordova-plugin-geolocation,talentmail/cordova-plugin-geolocation,heidiyasser/Geolocation,tdenovan/cordova-plugin-geolocation,danieldai/cordova-plugin-geolocation-china,AgrawalRahul/cordova-plugin-geolocation,elephanter/cordova-plugin-geolocation,revolunet/cordova-plugin-geolocation,SupremumLimit/cordova-plugin-geolocation,purplecabbage/cordova-plugin-geolocation,Icenium/cordova-plugin-geolocation,bopo/cordova-plugin-geolocation,pwbs/cordova-plugin-geolocation,elephanter/cordova-plugin-geolocation,Geotab/cordova-plugin-geolocation,purplecabbage/cordova-plugin-geolocation,tisztamo/cordova-plugin-geolocation,bopo/cordova-plugin-geolocation,corimf/cordova-plugin-geolocation,purplecabbage/cordova-plugin-geolocation,dingxin/cordova-plugin-geolocation,apache/cordova-plugin-geolocation,heidiyasser/Geolocation,faozimipa/cordova-plugin-geolocation,editweb/cordova-plugin-geolocation,tdenovan/cordova-plugin-geolocation,ZHOUSHURENewq/geolocation,danieldai/cordova-plugin-geolocation-china,corimf/cordova-plugin-geolocation,cordova-ubuntu/cordova-plugin-geolocation,talentmail/cordova-plugin-geolocation,ZHOUSHURENewq/geolocation,tisztamo/cordova-plugin-geolocation,faozimipa/cordova-plugin-geolocation,protonet/cordova-plugin-geolocation,tisztamo/cordova-plugin-geolocation,pwbs/cordova-plugin-geolocation,editweb/cordova-plugin-geolocation,ccloquet/cordova-plugin-geolocation,wufeifei/cordova-plugin-geolocation,cordova-ubuntu/cordova-plugin-geolocation,elephanter/cordova-plugin-geolocation,infil00p/cordova-plugin-geolocation,ZHOUSHURENewq/geolocation,revolunet/cordova-plugin-geolocation,SupremumLimit/cordova-plugin-geolocation,protonet/cordova-plugin-geolocation,protonet/cordova-plugin-geolocation,dingxin/cordova-plugin-geolocation,tisztamo/cordova-plugin-geolocation,infil00p/cordova-plugin-geolocation,infil00p/cordova-plugin-geolocation,editweb/cordova-plugin-geolocation,pwbs/cordova-plugin-geolocation,heidiyasser/Geolocation,purplecabbage/cordova-plugin-geolocation,faozimipa/cordova-plugin-geolocation