I am developing a Jogging Tracker application for ...
# android
j
I am developing a Jogging Tracker application for both Playstore and FDroid (i know the new policy by google, but i started it way earlier and it's now a learning project). I have created 2 productFlavours for this android application. For FDroid i am using LOST (A drop-in replacement for Google Play services location APIs for Android) and For playstore i am using Google PlayServices's FusedLocationProvider since they both have almost the same API signature , i am using TypeAlias to define a common name for the classes (PR for the same) . I wanted to ask if this is the correct usage and/or if there are any other ways to do the same . app/playstore
Copy code
typealias LocationProviderClient = FusedLocationProviderClient
app/fdroid
Copy code
typealias LocationProviderClient = LostApiClient
and then use LocationProviderClient directly in
main
code
c
This project is deprecated for use and not recommended for modern Android applications. The maintainers are no longer available to maintain it and the implementation is now fairly divergent from modern Android requirements. We appreciate everyone who has contributed to this project in the past. Thank you!
Last release for that library was 2017 with a target API of 26 (current Android API version is 36). you will run in lots of API issues on modern Android phones.
The first issue you can already see in your github build action 😉
j
that's not a problem . I am learning with this project . just wanted to know if typealias can be used in to define a common name for different classes with same signature
c
If it‘s „almost“, like you described it in the first post, then no.
And the problem is, that you will not get any location updates in Android 34+
What you would need is an Adapter pattern