0

I have read all questions on this matter, they don't cover what I need — maybe because what I want is too basic, or the error I'm facing is too weird.

Anyhow, I want to implement GpsStatus.Listener. What I have done is:

private class myGpsStatus implements GpsStatus.Listener{

@Override
public void onGpsStatusChanged(int event) {

    int SatellitesInFix = 0;
    int timetofix = locationMangaer.getGpsStatus(null).getTimeToFirstFix();

    for (GpsSatellite sat : locationMangaer.getGpsStatus(null).getSatellites()) {
        if(sat.usedInFix()) {
            SatellitesInFix++;              
        }
        Satellites++;
        CALLSTH();

    }

But, when I declared :

GpsStatus.listener = new myGpsStatus();

I faced this error which says:

listener cannot be resolved or is not a field.

Matthew Read
  • 1,365
  • 1
  • 30
  • 50
Shervin
  • 233
  • 1
  • 13

0 Answers0