Closed licaon-kter closed 2 days ago
Currently, Google Play Services are needed to use Geolocation on Android devices, because of the Capacitor Geolocation plugin: https://capacitorjs.com/docs/apis/geolocation#variables
According to this post, it is possible to access Geolocation without Google Services: https://github.com/ionic-team/capacitor/discussions/3528
I can make changes on the source code to support geolocation on Android devices without Google Services, but the dependency will still appear in the build.gradle. I don't know if this will still be an issue for F-Droid.
Unanswered post on the capacitor repo asking for support of other microg implementations : https://github.com/ionic-team/capacitor/discussions/5865
you can separate the two with gradle flavors, F-Droid build recipe will clean the unneeded deps, yes
Is it mandatory to use flavors, or can I test the availability of google services and fallback to the non-google implementation?
the flavor was to separate the used/loaded dependencies
eg. at build time, the code used to build the app needs to be fully FOSS.
can I test the availability of google services and fallback to the non-google implementation?
you can't fall back to "proprietary libs" since those can't be in the FOSS app to begin with
as mentioned in the linked issues, you might try to use microG replacement libs, and yes, then, since those are FOSS, can try to detect what you want and use what you need.
Can you provide an example of gradle flavor configuration that builds the app without a given dependency for F-Droid, and does not change anything for the Play Store? I think I can use a try/catch clause to fallback on a non-google services implementation, because it would also be beneficial for Play Store users to be able to use the Geolocation on the app without using Google services.
it would also be beneficial for Play Store users to be able to use the Geolocation on the app without using Google services.
true, but this is separate from whatever is needed for F-Droid (aka for the app to be built fully FOSS)
Can you provide an example of gradle flavor configuration that builds the app without a given dependency for F-Droid, and does not change anything for the Play Store?
I'm no dev, so maybe https://codeberg.org/iNPUTmice/Conversations/src/tag/2.16.4/build.gradle#L162-L168
and then separate the per flavor parts like https://codeberg.org/iNPUTmice/Conversations/src/tag/2.16.4/src/playstore
and https://codeberg.org/iNPUTmice/Conversations/src/tag/2.16.4/src/free
I have created a pull request here: https://github.com/IGNF/cartes-ign-app/pull/87 it adds the fdroid
flavor that is supposed to build without Google services. Could you review it?
Should I add a github actions pipeline to automate deployment on Fdroid? If so, can you provide me with examples?
@licaon-kter Here is the fdroid-compatible v3.1.1. https://github.com/IGNF/cartes-ign-app/releases/tag/v3.1.1-foss
This is the only -foss specific release as the changes made in the PR will be included in all subsequent releases.
@azarz why does the app connect to https://ignf.github.io/ ?
https://ignf.github.io/cartes-ign-services-uptime/edito.json At this location is located a json that we use to display a "Message of the Day" at app launch when needed (e.g. giving info about a platform maintenance that will make the app unusable at a given time). This is from a private repo.
Le besoin que vous rencontrez
ref: https://f-droid.org/docs/Inclusion_Policy/
Are Google proprietary libs needed? https://github.com/IGNF/cartes-ign-app/blob/v3.0.3/android/build.gradle#L11
La solution que vous aimeriez
No response
Les alternatives que vous avez considéré
No response
Autres éléments de contexte
No response