IGNF / cartes-ign-app

Application mobile officielle de l'IGN, utilisant MapLibre GL JS et Capacitor
https://www.ign.fr/telechargez-application-cartographique-cartes-ign
GNU General Public License v3.0
21 stars 2 forks source link

Add to F-Droid #86

Closed licaon-kter closed 2 days ago

licaon-kter commented 1 week ago

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

azarz commented 1 week 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

licaon-kter commented 1 week ago

you can separate the two with gradle flavors, F-Droid build recipe will clean the unneeded deps, yes

azarz commented 1 week ago

Is it mandatory to use flavors, or can I test the availability of google services and fallback to the non-google implementation?

licaon-kter commented 1 week ago

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.

azarz commented 1 week ago

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.

licaon-kter commented 1 week ago

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

azarz commented 1 week ago

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?

azarz commented 3 days ago

@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.

licaon-kter commented 2 days ago

report: https://beta.pithus.org/report/6c30591c7869f83138136c1831c85a2472dfd0c68baa17f5cb693ca19a61ce5a

licaon-kter commented 2 days ago

@azarz why does the app connect to https://ignf.github.io/ ?

azarz commented 2 days ago

https://github.com/IGNF/cartes-ign-app/blob/6983a7cc5963e01a60c3a7d8fddce64da2b9d87c/src/js/status-popups.js#L27-L36

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.

licaon-kter commented 2 days ago

Done: https://gitlab.com/fdroid/fdroiddata/-/merge_requests/15316 :tada:

FYI https://gitlab.com/fdroid/wiki/-/wikis/FAQ#how-long-does-it-take-for-my-app-to-show-up-on-website-and-client