1

So i'm making an application, and i'm using Maps API on Android and i have these two methods

locManager.registerGnssStatusCallback(Callback){}
locManager.addGpsStatusListener(Listener){}
@Override
public void onGpsStatusChanged(int i) {
    Log.i("gps status mudou",111+"");
}

So, the first one was implemented in API level 24 and the other one deprecated, since i want this application to work in almost all devices, what i want to know is if i have to use both methods or just one of them, and if is just one what should i use? Thank you

Diogo Rosa
  • 756
  • 1
  • 5
  • 24
  • 2
    Possible duplicate of [How to deal with deprecated classes in Android to keep compatibility](http://stackoverflow.com/questions/6321649/how-to-deal-with-deprecated-classes-in-android-to-keep-compatibility) – R. Zagórski Sep 22 '16 at 10:32

0 Answers0