satellite-navigation

GnssStatus.CallBack onSatelliteStatusChanged() not working

此生再无相见时 提交于 2020-04-10 03:55:09
问题 I am developing an application that I want to learn about the count of gps satellites. I am using the "onSatelliteStatusChanged" method for this, but it does not work. The piece of code that I use below that you see. Code if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { gnssStatusCallBack = new GnssStatus.Callback() { @Override public void onSatelliteStatusChanged(GnssStatus status) { satelliteCount = status.getSatelliteCount(); } }; locManager.registerGnssStatusCallback