Forum Xamarin.Android

Java.Lang.NoClassDefFoundError GnssStatusCallback

_DK__DK_ DEMember ✭✭

I get this error message during the implementation of GnssStatusCallback for my LocationManager to track GPS status.
What i am doing wrong?

Hier is my code:

my class:

        public class GnssStatusCallback : GnssStatus.Callback
            {
                  public override void OnStarted()
                  {
                    //base.OnStarted();     
                  }
                  public override void OnStopped()
                  {
                      //base.OnStopped();  
                  }
                  public override void OnSatelliteStatusChanged(GnssStatus status)
                  {
                      //base.OnSatelliteStatusChanged(status);
                  }
                  public override void OnFirstFix(int ttffMillis)
                  {
                      //base.OnFirstFix(ttffMillis);
                  }
            }

and than:

           this.locationManager = GetSystemService(LocationService) as LocationManager;     
       this.gnssStatusCallback = new GnssStatusCallback(); //<========= ERROR: Java.Lang.NoClassDefFoundError 
       this.locationManager.RegisterGnssStatusCallback(this.gnssStatusCallback);
Sign In or Register to comment.