I want that my app works in all android versions (< and > API 31) But if I use GpsStatus event, get and error in Api 31 and > and if I use GnssStatus do not work in api < 24. So, What is the solution?
I assume you are using my GNSS library. There is no really neat solution as even if you try adding both GPS and GNSS libraries and selectively Dimming an instance of one or the other at runtime depending on the device API level you will still get the runtime error on API 31+ as you will have a GpsStatus event in your code unless you can make do with only the LocationChanged event. A separate apk for the earlier devices is probably the best solution if you need satellite status.
I assume you are using my GNSS library. There is no really neat solution as even if you try adding both GPS and GNSS libraries and selectively Dimming an instance of one or the other at runtime depending on the device API level you will still get the runtime error on API 31+ as you will have a GpsStatus event in your code unless you can make do with only the LocationChanged event. A separate apk for the earlier devices is probably the best solution if you need satellite status.
Yes, I am using GNSS library and now I compile two different apk for new and old devices. But it is incredible that there is no solution for this. I just need to know the number of satellites used. But my app is published on PlayStore, I will probably publish two apps to fix it.
If anyone finds a solution, please share it.
After discovering several problems in the operation of GPS and GNSS libraries on SDK32 and SDK33, I decided to make one library that will be compatible with almost all versions of android (from SDK less than 24 to SDK33 and above). This library combines deprecated GPS classes with still...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.