I now create an app to detect the location of device through GPS, I have problem with GPS status, I look through the GpsStatus.Listener but it's complicated since I'm a newbie with Android.
HERE IS WHAT I TRY TO DO WITH GPS STATUS AM I ON THE RIGHT TRACK ???
final Listener onGpsStatusChange = new GpsStatus.Listener() {
@Override
public void onGpsStatusChanged(int event) {
// TODO Auto-generated method stub
switch(event){
case GpsStatus.GPS_EVENT_STARTED:
// Started...
break ;
case GpsStatus.GPS_EVENT_FIRST_FIX:
// First Fix...
break ;
case GpsStatus.GPS_EVENT_STOPPED:
// Stopped...
break ;
}
}
};
i want to test whether device is :
- no change
- new location
- start_
- no gps data
Can you explain the GPSs status with example??, thanks.
EDIT: guys, it very helpful so far, now i stuck with no change location: when user still stay on the same location then onLocationChange method will not fired am i wrong? so how can i test it in order to send to server? :)