openfoodfacts-androidapp
openfoodfacts-androidapp copied to clipboard
feat: Added ability to add products to any of the project (Open Beauty Facts, Open Products Facts…)
Description
When the user scans the barcode I've made a bottom sheet so that when the product unavailable in the database user is asked to select the type of product. Then the selected flavor is saved and then, according to the product type I've made changes to the apiService. Even when the internet is available and the product is stored locally, I've made the same changes to the OfflineEditFragment apiService so that the local product will be uploaded to their selected product type. So now all the flavors have the ability to add the product in any of the flavors.
Related issues and discussion
- fixes #1900
Screenshots
https://drive.google.com/file/d/1KhxGifYvj9mBinBZMN6RWKiPoWRQUabC/view?usp=sharing
@teolemon I've made the requested changes.
Android resource linking failed
Output: warn: removing resource org.openpetfoodfacts.scanner:array/lang_array without required default value.
warn: removing resource org.openpetfoodfacts.scanner:string/txtDialogsContentSend without required default value.
/Users/pierre/Desktop/Android builds/tuttifrutti/openfoodfacts-androidapp-0291c570c155f09ed30f6807a6342444f938df7e/app/src/main/res/layout/fragment_select_flavor_bottom_sheet.xml:28: error: resource mipmap/food_category_icon (aka org.openpetfoodfacts.scanner:mipmap/food_category_icon) not found.
/Users/pierre/Desktop/Android builds/tuttifrutti/openfoodfacts-androidapp-0291c570c155f09ed30f6807a6342444f938df7e/app/src/main/res/layout/fragment_select_flavor_bottom_sheet.xml:57: error: resource mipmap/beauty_category_icon (aka org.openpetfoodfacts.scanner:mipmap/beauty_category_icon) not found.
/Users/pierre/Desktop/Android builds/tuttifrutti/openfoodfacts-androidapp-0291c570c155f09ed30f6807a6342444f938df7e/app/src/main/res/layout/fragment_select_flavor_bottom_sheet.xml:86: error: resource mipmap/pet_category_icon (aka org.openpetfoodfacts.scanner:mipmap/pet_category_icon) not found.
/Users/pierre/Desktop/Android builds/tuttifrutti/openfoodfacts-androidapp-0291c570c155f09ed30f6807a6342444f938df7e/app/src/main/res/layout/fragment_select_flavor_bottom_sheet.xml:116: error: resource mipmap/product_category_icon (aka org.openpetfoodfacts.scanner:mipmap/product_category_icon) not found.
error: failed linking file resources.
Working:
- the images seem to go to the right project Ko:
- suggestions are still from Open Food Facts
- the layout hasn't changed (still the layout of Open Food Facts)
Small merge conflict @jaindiv26
Caused by: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
Output: warn: removing resource org.openpetfoodfacts.scanner:array/lang_array without required default value.
warn: removing resource org.openpetfoodfacts.scanner:string/txtDialogsContentSend without required default value.
/home/travis/build/openfoodfacts/openfoodfacts-androidapp/app/src/main/res/layout/fragment_select_flavor_bottom_sheet.xml:28: error: resource mipmap/food_category_icon (aka org.openpetfoodfacts.scanner:mipmap/food_category_icon) not found.
/home/travis/build/openfoodfacts/openfoodfacts-androidapp/app/src/main/res/layout/fragment_select_flavor_bottom_sheet.xml:57: error: resource mipmap/beauty_category_icon (aka org.openpetfoodfacts.scanner:mipmap/beauty_category_icon) not found.
/home/travis/build/openfoodfacts/openfoodfacts-androidapp/app/src/main/res/layout/fragment_select_flavor_bottom_sheet.xml:86: error: resource mipmap/pet_category_icon (aka org.openpetfoodfacts.scanner:mipmap/pet_category_icon) not found.
/home/travis/build/openfoodfacts/openfoodfacts-androidapp/app/src/main/res/layout/fragment_select_flavor_bottom_sheet.xml:116: error: resource mipmap/product_category_icon (aka org.openpetfoodfacts.scanner:mipmap/product_category_icon) not found.
error: failed linking file resources.
can you rebase @jaindiv26 ?
Closing due to inactivity
@Karljoones @jaindiv26 @deniger I'd very much like to see if we can save this PR by rebasing it.
I can look on it after #4214 I often want to add dog food but it is too lazy to download separate app for it :)