I created the Listener and requested updates (see code below), but for
some reason I'm not being notified. The method onStatusChanged() is
being called instead, firstly with STATUS set to
TEMPORARILY_UNAVAILABLE, then when I send the first GPS coordinate via
DDMS, the method is called again with STATUS set to AVAILABLE, but the
method onLocationChanged() is never called. Does anybody knows why
this is happening? Am I missing something?


LocationListener locList = new MyLocationListener();
m_locationMgr.requestLocationUpdates(LocationManager.GPS_PROVIDER,
                                     0,
                                     0,
                                     locList);//new Intent
("GPS_UPDATE"));

class MyLocationListener implements LocationListener
{
        @Override
        public void onLocationChanged(Location location) {
                setMapLocationCenter(location.getLatitude(),
                               location.getLongitude());
        }

        @Override
        public void onProviderDisabled(String provider) {
                return;
        }

        @Override
        public void onProviderEnabled(String provider) {
                return;
        }

        @Override
        public void onStatusChanged(String provider, int status, Bundle
extras) {
                return;
        }
}


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

Reply via email to