05-09-2013 09:33 AM
I am writing an application which should report when device GPS status is changed (i.e. if someone disables GPS from Location Settings). Ideally, when Locaiton is set to 'Off' from LocationSettings, providerStateChanged() function should be called. In my case, it is not being called unfortunately.
I am doing:
myProvider.setLocationListener(new myLocationListener(),0, -1, -1);
Please note timeout to '0' only notifies for providerstatechanged.
however, if I use
myProvider.setLocationListener(new myLocationListener(), -1, -1, -1); ,
I get this function called with new state as GPS Temporirly unavailable, but enabling GPS again from location settings does not call this function with GPS available.
Am I missing something here.