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