openfoodfacts / openfoodfacts-cordova-app-old-with-blob

Open Food Facts App in Cordova (Android)
Other
83 stars 48 forks source link

Submit the application to FDroid #17

Open PierrickPuimeanChieze opened 10 years ago

PierrickPuimeanChieze commented 10 years ago

Even if the interface could affray some people, I am a big user of F-Droid. and I was a bit disapointed to not found Open Food Facts init. So here is my request : is it possible to add Open Food Facts to F-Droid ?

dalb8 commented 10 years ago

I tried to build it from source, but I'm not sure what library to add to get barcode scanning working. I tried the core.jar from https://github.com/zxing/zxing/releases/download/zxing-2.3.0/ZXing-2.3.0.zip but it crashes.

dalb8 commented 10 years ago

Ok it doesn't crash at 454dbf41ed32699 but it just shows two dialogs , Alert scan and Alert [object Object]. I did have to put a string for share_name but I didn't know what to put.

openfoodfacts commented 10 years ago

Hi, It needs the phonegap barcodescanner plugin (which contains a version of the zxing library): https://github.com/wildabeast/BarcodeScanner

dalb8 commented 10 years ago

I made a jar from the Android Project of that repo, according to the repo, and added it to libs/ but it doesn't work. I don't understand Cordova/Phonegap much.

dalb8 commented 10 years ago

I created a new cordova app, copied over the resources and run cordova build and it works

I created a pull request with this new layout.

dalb8 commented 10 years ago

I managed to build it with Phonegap eventually. Before running the following I checked out Barcode Scanner plugin at an old commit and backed up www/assets/barcodescanner.js and src/com/phonegap/plugins/barcodescanner/BarcodeScanner.java. I ran plugman --platform android --project Open\ Food\ Facts/ --plugin ../../build/srclib/Wildabeast-BarcodeScanner/ and replaced the files and ran ant release.

It's not sufficient to simply copy the jar from there. Plugman rewrites a few files and adds strings too; without these the scanning activity crashes.

ghost commented 9 years ago

Added the metadata to fdroid. The app builds, but I run into the same problems as @dalb8 -- crashes because of the missing barcode scanner. Since I don't have any clue about phonegap/cordova, maybe someone could provide some insight on how to integrate the plugin into the buildscript?

Ref: https://gitlab.com/fdroid/fdroiddata/commit/8ecbb5eb6f28a6c6af0f3157f718e3c1aad613c8

teolemon commented 8 years ago

We have the next generation version app in F-Droid. Not the same codebase, tough