Closed g123k closed 1 year ago
When switching back to ML Kit we left in ZXing for two reasons: 1. Comparing them, I'd say that's done and 2. To allow publishing in stores like fDroid
But first most stores like these from Amazon or Samsung don't really care if we include ML Kit or not. The only one I know of is FDroid. V1 is on there so the initial plan was to also release it there but that's not a priority.
If there is a way to build with only one of them included without splitting the codebase that's a idea if that's not possible we can just remove qr_code_scanner. It's currently not in use and with the current level of abstraction it's easy to add back in if we need it again
@teolemon What’s our déploiement target for V1 and upcoming releases? Only Google Play? Fdroid?
Only Google Play, but it'd be cool to figure out fdroid after that
Ok, so here is the plan:
For 1.0.0:
For the upcoming release (let's say 1.1.x):
Is-it OK for everyone?
Is-it OK for everyone?
Understood, though I'm not convinced the energy spent there will be worth the trouble. For the Android app, how many downloads from Google Play and from FDroid?
We want a fully free version to be available for F-Droid and FOSS (Open Food Facts is about Open Source). In V1, we actually allow users to opt-in into ML Kit, since there are terms and conditions. https://github.com/openfoodfacts/openfoodfacts-androidapp/pull/3836
<string name="preference_choose_scanner_dialog_title"><b>New: Enhanced “MLKit” scanner</b></string>
<string name="preference_choose_scanner_dialog_body">We have included a new option to more reliably scan barcodes. While this scanner works on your device, using machine learning,
please be aware that it is a proprietary component provided by Google, governed by this privacy policy, and that some limited telemetry might be sent back to Google’s servers
to improve their software. As noted in the MLKit terms, this won’t include any information about the products you scan and the telemetry is anonymized. Choosing MLKit scanner
implies that you accept those terms\n<b>Note: You can switch back at any time between the 2 scanners in the Settings.</b>
Regarding app size in general as in OP, maybe we could get rid of external packages that we don't use often. For the record, those are all the external packages we use:
% grep -rh ".dart';" * | grep -v "package:smooth_app" | grep -v "package:flutter" | grep -v "package:openfoodfacts" | sort | uniq -c | sort
1 import 'package:camera_web/camera_web.dart';
1 import 'package:carousel_slider/carousel_slider.dart';
1 import 'package:collection/collection.dart';
1 import 'package:device_preview/device_preview.dart';
1 import 'package:fwfh_selectable_text/fwfh_selectable_text.dart';
1 import 'package:hive/hive.dart';
1 import 'package:http/http.dart';
1 import 'package:image_cropper/image_cropper.dart';
1 import 'package:image_cropper_for_web/image_cropper_for_web.dart';
1 import 'package:image_picker/image_picker.dart';
1 import 'package:image_picker_for_web/image_picker_for_web.dart';
1 import 'package:intl/intl.dart';
1 import 'package:iso_countries/iso_countries.dart';
1 import 'package:latlong2/latlong.dart';
1 import 'package:matomo_forever/matomo_forever.dart';
1 import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
1 import 'package:package_info_plus_web/package_info_plus_web.dart';
1 import 'package:path/path.dart';
1 import 'package:path_provider/path_provider.dart';
1 import 'package:percent_indicator/percent_indicator.dart';
1 import 'package:photo_view/photo_view.dart';
1 import 'package:photo_view/photo_view_gallery.dart';
1 import 'package:qr_code_scanner/qr_code_scanner.dart';
1 import 'package:rxdart/rxdart.dart';
1 import 'package:sentry_flutter/sentry_flutter_web.dart';
1 import 'package:shared_preferences/shared_preferences.dart';
1 import 'package:shared_preferences_web/shared_preferences_web.dart';
1 import 'package:typed_data/typed_buffers.dart';
1 import 'package:url_launcher_web/url_launcher_web.dart';
1 import 'package:uuid/uuid.dart';
2 import 'package:mailto/mailto.dart';
2 import 'package:permission_handler/permission_handler.dart';
2 import 'package:sentry_flutter/sentry_flutter.dart';
2 import 'package:visibility_detector/visibility_detector.dart';
4 import 'package:google_ml_barcode_scanner/google_ml_barcode_scanner.dart';
4 import 'package:package_info_plus/package_info_plus.dart';
4 import 'package:url_launcher/url_launcher.dart';
6 import 'package:camera/camera.dart';
6 import 'package:hive_flutter/hive_flutter.dart';
8 import 'package:auto_size_text/auto_size_text.dart';
44 import 'package:provider/provider.dart';
Excellent idea @monsieurtanuki. I have created a dedicated issue.
Good news: the app is working well on Huawei devices (without GMS). The only use case where we will have to use ZXing is for FDroid.
Heyy @g123k the new modular pipline is up and running so if we create a different flavour / store listing it's just a matter of passing different values to the workflow to create a differnt app.
ℹ️ This issue will be implemented as part of #3084 (step 3)
A few after the release, we should think about removing the data import feature #3150
@g123k @M123-dev @monsieurtanuki is that something we can now do ? Unsure why we closed it in the first place
We had this before the we switched Scanners, (not automated the release to the store, but the apk uploaded to github releases)
I opened a new ticket, because this was is on a related subject, not the core.
What
Part of
2515
Initial message by @g123k
Hi everyone,
Smoothie has two dependencies to manage barcode decoding:
google_ml_barcode_scanner
(MLKit) andqr_code_scanner
(ZXing). For both cases, the engine is embedded in our app. For debug APKs (= non-optimized), even with the Flutter engine, the difference with V1 is huge:The reason behind this choice seems to be related that we want some builds for Google Play (let's say with MLKit) and for other app stores (FDroid…). Instead of building a single "fat" application, shouldn't we split the app into two versions?
Or maybe is
qr_code_scanner
still relevant? Is embedding MLKit an "OK" solution for non-Google Play Android stores?Part of
2515