Hi,

I am working app for nexus one which uses gps. I have placed turning
on code of gps in onStart() of Activity and and turning off code in
onStop(). As per logs On/Off works fine specially turning off. But
then gps icon stays forever on notification bar. Is there any bug/
issue with Nexus One GPS? or am I doing anything wrong?

Tunrning on/ off code is as follows

onStart(){
...

String[] providers = { LocationManager.GPS_PROVIDER,
LocationManager.NETWORK_PROVIDER };

                        int noOfProviders = providers.length;
                        for (int i = 0; i < noOfProviders; i++) {

                                final String currentProvider = providers[i];
                                if 
(locManager.isProviderEnabled(currentProvider)) {
                                        
locManager.requestLocationUpdates(currentProvider, 100L, 0.0f,
_instance);
                                }
                        }
...
}

onStop(){
...

if (locManager != null) {
                                locManager.removeUpdates(_instance);
                        }
...
}

and the logs for turning off gps are..

LocationManager(  369): removeUpdates: listener =
com.xxx.xxx....@4495e330

D/NetworkLocationProvider(   76): removeListener(): com.xxx.xxx

D/GpsLocationProvider(   76): stopNavigating

D/libgps  (   76): qct_gps_stop


Thanks in advance

Namrata

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to