Closed paulle closed 2 years ago
Then your GPS position is not good enough and does not provide data on direction (bearing).
if (mGpsLocation.hasBearing()) {
mB.gpsCont.compass.setLineColor(ContextCompat.getColor(this,R.color.accent));
mB.gpsCont.compass.setTextColor(ContextCompat.getColor(this,R.color.dynamicFgDim));
mB.gpsCont.compass.setShowMarker(true);
bearing = mGpsLocation.getBearing();
} else {
mB.gpsCont.compass.setLineColor(ContextCompat.getColor(this,R.color.disabledStateColor));
mB.gpsCont.compass.setTextColor(ContextCompat.getColor(this,R.color.disabledStateColor));
mB.gpsCont.compass.setShowMarker(false);
}
Or you are not moving. Direction is only available in GPS while moving
Thank you very much for the hint. And yes compass is working with a better GPS fix.
Gesendet von ProtonMail mobile
-------- Original-Nachricht -------- Am 10. Dez. 2021, 06:36, woheller69 schrieb:
Then your GPS position is not good enough and does not provide data on direction (bearing).
if (mGpsLocation.hasBearing()) { mB.gpsCont.compass.setLineColor(ContextCompat.getColor(this,R.color.accent)); mB.gpsCont.compass.setTextColor(ContextCompat.getColor(this,R.color.dynamicFgDim)); mB.gpsCont.compass.setShowMarker(true); bearing = mGpsLocation.getBearing(); } else { mB.gpsCont.compass.setLineColor(ContextCompat.getColor(this,R.color.disabledStateColor)); mB.gpsCont.compass.setTextColor(ContextCompat.getColor(this,R.color.disabledStateColor)); mB.gpsCont.compass.setShowMarker(false); }
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
The compass don't work. The compass scale is always grey, no blue as in the screenshot on f-droid and showing north in every position. Android 11 Sony Xperia 4