wger-project / flutter

Flutter fitness/workout app for wger
GNU Affero General Public License v3.0
560 stars 244 forks source link

Remove dependency on Google Play Services #152

Closed linsui closed 1 year ago

linsui commented 2 years ago

GMS is pulled in the apk by flutter_barcode_scanner. See https://github.com/AmolGangadhare/flutter_barcode_scanner/blob/c466d32d017c29cd34307b5681f697891c55babc/android/build.gradle#L41. Could you please take a look? Thanks!

rolandgeider commented 2 years ago

oh you are right! Do you know of some other barcode scanner for flutter that doesn't depend on the play services?

linsui commented 2 years ago

I don't know. It seems there is no other flutter barcode scanner on F-Droid. But maybe you can try https://github.com/juliuscanute/qr_code_scanner and https://github.com/leyan95/qrcode_scanner.

rolandgeider commented 2 years ago

alright, I'll take a look

rolandgeider commented 2 years ago

Mhhh the other scanner apps that I have found have a dependency on Google's MLkit, which is also not FOSS

linsui commented 2 years ago

https://github.com/juliuscanute/qr_code_scanner is used in some other apps in F-Droid.

rolandgeider commented 2 years ago

That one is sadly not maintained anymore. I guess it would be better than nothing, but it still has a "bad taste"

linsui commented 2 years ago

Since the zxing is not maintained either we don't have too much choice.

rolandgeider commented 2 years ago

I guess we don't... grrrr

gargchirayu commented 2 years ago

Is this issue resolved or still needs work? If this is a hacktoberfest issue i would like to work on it, so if you can please assign it to me.

rolandgeider commented 2 years ago

Hi! Yes this issue is not only still open and is part of hacktobest, it would be really useful if it would be done.

roshavagarga commented 1 year ago

Wouldn't this version of zxing be an option? https://github.com/zxing-cpp/zxing-cpp

Flutter bindings of the above, as an external project, are available here - https://pub.dev/packages/flutter_zxing.

rolandgeider commented 1 year ago

that looks promising, thanks @roshavagarga

MrRulf commented 1 year ago

Hi, is the dependency solved now? Or did something go wrong?

MrRulf commented 1 year ago

If the only thing that's needed is the Google Vision API for barcodes people with microg should be fine. iirc it's also possible to have apps on fdroid with dependencies on not free services, like the play services, or free alternatives, like microg.

I know it does not solve the problem, but this way the version from fdroid stays usable, since there are incompatibilities from 1.4.3 (fdroid) with the latest server. Also, technically people without play services and fdroid should be able to use the app anyway, just not the barcode scanner.

rolandgeider commented 1 year ago

Hey! Yes, the application is usable without the play services till the user clicks on the scan button. When we published the last update it got rejected from fdroid because of the non free dependencies, I'm not sure if we can indicate that we are dependent on them till we replace the library

linsui commented 1 year ago

Looks like this problem has been solved! It builds fine but I don't know if it works well. You can test the unsigned apk here. Since flutter_barcode_scanner has been replaced, why not remove it?

artchiee commented 1 year ago

Hi @linsui :: i checked the wger on gitlab , looks like the app failed to build for fdorid check; it's still checking for flutter_barcode_scanner! so we need to remove it"s trace completely!!

linsui commented 1 year ago

I'm not sure whcih check failed. I have removed flutter_barcode_scanner. See https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/de.wger.flutter.yml#L74.

artchiee commented 1 year ago

yass saw it ; i'm also seen this error there "builds/fdroid/fdroiddata/build/de.wger.flutter/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:29: error: package com.amolg.flutterbarcodescanner does not exist" => from the master branch on github , can explicitly deleting "flutter_bar_code" scanner" from yaml and pub lock files, then rebuild / upload to FDroid , would help !! i'm still seeing the package on master branch ; since i haven't remove it on my branch when i pushed the Fix :: !

artchiee commented 1 year ago

Apk Library scanner has two offended libs : ( Android Vision and Google Mobile Services ; Could this be the reason , for Fdroid again to fail because of the [NonFreeDependencies]

linsui commented 1 year ago

It builds in the CI. See https://gitlab.com/linsui/fdroiddata/-/jobs/4582019531#L676.

artchiee commented 1 year ago

I might or might not be right about this , i've had issues with Gradle compatibility in the past : See => https://gitlab.com/linsui/fdroiddata/-/jobs/4582019531#L2624

linsui commented 1 year ago

That's the log of another app.

artchiee commented 1 year ago

Hmmm okay !! it's really disturbing since it says "Build Succeeded" and cant build :( ;; w'll look further into this!

linsui commented 1 year ago

I'm not sure what you mean. It builds without problem.

artchiee commented 1 year ago

soooryy :)) i meant google a bit more if i found smt ; since i dont have permissions to build on Gitlab :) you know we have to get this done -- this issue been open way tooo long !!

rolandgeider commented 1 year ago

@artchiee the new version is now in the fdroid metadata repo and will be available as soon as it is built

Closing here (finally)