Kr0oked / Compass

Simple and beautiful compass for Android
GNU General Public License v3.0
314 stars 45 forks source link

Better Error handling of location off error during turning on True North #49

Open inson1 opened 11 months ago

inson1 commented 11 months ago

If I start the True North without the location on it gives me error. Its one of the most occurred errors, that's why I think it can have its own error handling. And not just pop up with default message.

And maybe it would be even better to find out if the location is on/off and then try starting the True North.

Screenshot_2023-10-16-06-33-26-115_com.bobek.compass.jpg

1) Cant you do what Google maps do and ask user and if user agree then turn on the location for him?

2) Or just do the error pop up nicer. Something like this:

No title

For True North to work correctly, it needs your location. May you turn it on?

Kr0oked commented 11 months ago

As a quick improvement I introduced a new error code 'LOCATION_DISABLED' to have something more specific https://github.com/Kr0oked/Compass/commit/eb7923933869328a2178bdd71dde534e67f48611. A proper message would be better, but that would basically mean a rework of the error handling functionality.