Difference between pages "Local Communities/UKTeam/Taxonomy" and "Mobile App/Cordova Development Notes"

From Open Food Facts wiki
(Difference between pages)
Jump to navigation Jump to search
 
 
Line 1: Line 1:
<pre>
+
This page contains notes regarding the development of the Open Food Facts mobile apps.
Milk and milk products excluding cheese
+
 
Liquid wholemilk, including school and welfare
+
The current Open Food Facts apps for iOS, Android and Windows Phone use Apache Cordova (previously known as Phonegap).
School milk
+
 
Welfare milk
+
Cordova: http://cordova.apache.org/
Liquid wholemilk, full price
+
 
UHT milk
+
Installing Cordova 3.6 : http://cordova.apache.org/docs/en/3.6.0/guide_overview_index.md.html
Sterilised
+
 
Pasteurised/ homogenised
+
http://cordova.apache.org/docs/en/3.6.0/guide_cli_index.md.html#The%20Command-Line%20Interface
Other milk and cream
+
 
Skimmed milks
+
Following notes are for the Windows Platform, but most of it probably applies for Mac or Linux.
Fully skimmed milk
+
 
Semi-skimmed milk
+
Install Node.js
Condensed or evaporated milk
+
 
Infant milks
+
* http://nodejs.org/
Infant or baby milks - ready to drink
+
* Current Version: v0.10.32
Infant or baby milks - dried
+
 
Instant dried milk
+
Install git client
Yoghurt and fromage frais
+
 
Yoghurt
+
* http://git-scm.com/
Fromage frais
+
 
Other milks and dairy desserts
+
Install Cordova
Dairy desserts - not frozen
+
 
Dried milk products
+
in git-bash client:
Milk drinks and other milks
+
 
Non-dairy milk substitutes
+
* npm install -g cordova
Cream
+
 
Cheese
+
cordova -v : 3.6.3-0.2.13
Natural cheese
+
 
Hard cheese - cheddar type
+
* "error android_home is not set and android command not in your path" when doing "cordova platform add android"
Hard cheese - other uk or foreign equivalent
+
**Install Eclipse ADT  (Note : for win8 32bit/64bit install 32bit ADT)
Hard cheese - edam or other foreign
+
**Setup Environment Variables :
Cottage cheese
+
***Add to existing system variable "path" : <path to adt-bundle\sdk\tools>;<path to adt-bundle\sdk\platform-tools>
Soft natural cheese
+
** http://docs.phonegap.com/en/edge/guide_platforms_android_index.md.html
Processed cheese
+
*** http://developer.android.com/sdk/index.html
Carcase meat
+
*** C:\Users\Stéphane\AppData\Roaming\npm;C:\Users\Stéphane\AppData\Local\Android\android-sdk\tools;C:\Users\Stéphane\AppData\Local\Android\android-sdk\tools;C:\Users\Stéphane\AppData\Local\Android\android-sdk\platform-tools
Beef and veal
+
 
Beef joints - on the bone
+
"error failed to run javac -version make sure"
Beef joints - boned
+
 
Beef steak - less expensive
+
Java JDK
Beef steak - more expensive
+
* http://www.oracle.com/technetwork/java/javase/downloads/index.html
Minced beef
+
* JAVA_HOME : C:\Program Files\Java\jdk1.8.0_20
All other beef and veal
+
* add to PATH : C:\Program Files\Java\jdk1.8.0_20\bin
Mutton and lamb
+
 
Mutton
+
ANT
Lamb joints
+
* http://ant.apache.org/manual/index.html
Lamb chops
+
* set ANT_HOME
All other lamb
+
* add %ANT_HOME%/bin to path
Pork
+
 
Pork joints
+
"Error: Failed to run "java -version"
Pork chops
+
 
Pork fillets and steaks
+
which java
All other pork
+
--> un vieux java dans C:\Windows\System32 était la cause du problème.. :-(
Non-carcase meat and meat products
+
 
Liver
+
http://stackoverflow.com/questions/24493693/cordova-android-revision-to-low
Ox liver
+
 
Lambs liver
+
Run SDK Manager, install Android build tools.
Pigs liver
+
 
All other liver
+
== android version code ==
All offal other than liver
+
 
Bacon and ham, uncooked
+
in config.xml : http://stackoverflow.com/questions/23001780/how-to-get-cordova-3-4-0-to-set-android-version-name-code-on-build
Bacon and ham joints, uncooked
+
 
Bacon and ham rashers, uncooked
+
 
Bacon and ham, cooked
+
=== Install Moodstocks ===
Cooked poultry not purchased in cans
+
 
Chicken and turkey, cooked
+
* https://moodstocks.com/docs/phonegap/using-the-moodstocks-sdk-in-your-phonegap-application/
Takeaway chicken
+
 
Corned beef, canned or sliced
+
Instructions pas à jour pour cordova 3.6 on dirait, par contre il y a un autre example :
Other cooked meat
+
 
Other canned meat and canned meat products
+
* https://github.com/Moodstocks/moodstocks-phonegap-plugin/blob/master/src/android/Demo.java
Chicken, uncooked - whole chicken or chicken pieces
+
 
Other poultry, uncooked (including frozen)
+
<pre>
Turkey, uncooked - whole turkey or turkey pieces
+
public class Demo extends CordovaActivity {
Poultry other than chicken or turkey, uncooked
+
 
Other fresh, chilled and frozen meat
+
  private boolean scanActivityStarted = false;
Sausages, uncooked - pork
+
 
Sausages, uncooked - beef and other sausages
+
  @Override
Meat pies and sausage rolls, ready to eat
+
  public void onCreate(Bundle savedInstanceState) {
Meat pies, ready to eat
+
    super.onCreate(savedInstanceState);
Sausage rolls, ready to eat
+
    this.init();
Meat pies, pasties and puddings, frozen or not frozen
+
    // Set by <content src="index.html" /> in config.xml
Burgers, frozen or not frozen
+
    super.loadUrl(Config.getStartUrl());
Ready meals and convenience meat products
+
    //super.loadUrl("file:///android_asset/www/index.html")
Complete meat-based ready meals, frozen or not frozen
+
  }
Other convenience meat products, frozen or not frozen
+
 
Pate and delicatessen type sausage
 
Pate
 
Delicatessen type sausages
 
Meat pastes and spreads
 
Takeaway meats
 
Takeaway meat pies and pasties
 
Takeaway burger and bun
 
Takeaway kebabs
 
Takeaway sausages and saveloys
 
Takeaway meat based meals
 
Takeaway miscellaneous meats
 
Fish
 
White fish, fresh, chilled or frozen
 
White fish, fresh or chilled
 
White fish, frozen
 
Herrings and other blue fish, fresh, chilled or frozen
 
Herrings and other blue fish, fresh or chilled
 
Herrings and other blue fish, frozen
 
Salmon, fresh, chilled or frozen
 
Salmon, fresh or chilled
 
Salmon, frozen
 
Blue fish, dried or salted or smoked
 
White fish, dried, salted or smoked
 
Shellfish
 
Shellfish, fresh or chilled
 
Shellfish, frozen
 
Takeaway fish
 
Salmon, tinned
 
Other tinned or bottled fish
 
Ready meals and other fish products - frozen or not frozen
 
Takeaway fish meals and fish products
 
Takeaway fish products
 
Takeaway fish based meals
 
Eggs
 
Fats
 
Butter
 
Margarine
 
Soft margarine
 
Other margarine
 
Lard, cooking fat
 
Vegetable and salad oils
 
Olive oil
 
Other vegetable and salad oils
 
All other fats
 
Reduced fat spreads
 
Low fat spreads
 
Suet and dripping
 
Imitatation cream
 
Sugar and preserves
 
Sugar
 
Jams and fruit curds
 
Marmalade
 
Syrup, treacle
 
Honey
 
Fresh and processed fruit and vegetables, including potatoes
 
Fresh and processed vegetables, including potatoes
 
Fresh and processed potatoes
 
Fresh potatoes
 
Fresh new potatoes
 
Fresh baking potatoes
 
Other fresh potatoes
 
Processed potatoes
 
Chips and takeaway chips
 
Chips - frozen or not frozen
 
Takeaway chips
 
Instant potato
 
Canned potatoes
 
Crisps and potato snacks
 
Other potato products, frozen or not frozen
 
Fresh and processed fruit and vegetables, excluding potatoes
 
Fresh and processed vegetables, excluding potatoes
 
Fresh green vegetables
 
Fresh cabbages
 
Fresh brussels sprouts
 
Fresh cauliflower
 
Leafy salads fresh
 
Lettuce and leafy salads
 
Prepared lettuce salads
 
Fresh peas
 
Fresh beans
 
Other fresh green vegetables
 
Other fresh vegetables
 
Fresh carrots
 
Fresh turnips and swede
 
Other fresh root vegetables
 
Fresh onions, leeks and shallots
 
Fresh cucumbers
 
Fresh mushrooms
 
Fresh tomatoes
 
Miscellaneous fresh vegtables
 
Fresh vegetable stewpack, stirfry pack etc.
 
Fresh stem vegetables
 
Fresh marrow, courgettes, aubergine, pumpkin and other vegetables
 
Fresh herbs
 
Processed vegetables excluding processed potatoes
 
Tomatoes, canned or bottled
 
Peas, canned
 
Beans canned
 
Baked beans in sauce
 
Other canned beans and pulses
 
Other canned vegetables
 
Dried pulses other than air-dried
 
Air-dried vegetables
 
Vegetable juices and purees
 
Tomato puree and vegetable purees
 
Vegetable juices eg tomato juice, carrot juice
 
Peas, frozen
 
Beans, frozen
 
Ready meals and other vegetable products (inc takeaways)
 
Ready meals and other vegetable products, frozen or not frozen
 
All vegetable takeaway products
 
Other frozen vegetables
 
Fresh and processed fruit
 
Fresh fruit
 
Fresh oranges
 
Other fresh citrus fruits
 
Fresh apples
 
Fresh pears
 
Fresh stone fruit
 
Fresh grapes
 
Other fresh soft fruit
 
Fresh bananas
 
Fresh melons
 
Other fresh fruit
 
Processed fruit and fruit products
 
Tinned peaches, pears and pineapples
 
All other tinned or bottled fruit
 
Dried fruit
 
Frozen strawberries, apple slices, peach halves, oranges and other frozen fruits
 
Nuts, edible seeds and peanut butter
 
Nuts and edible seeds
 
Peanut butter
 
Pure fruit juices
 
Bread
 
White bread
 
White bread, standard, unsliced
 
White bread, standard, sliced
 
White bread, premium, sliced and unsliced
 
White bread, soft grain, sliced and unsliced
 
Brown and wholemeal bread
 
Brown bread, sliced and unsliced
 
Wholemeal and granary bread, sliced and unsliced
 
Total other bread
 
Rolls - white, brown or wholemeal
 
Malt bread and fruit loaves
 
Vienna and french bread
 
Starch reduced bread and rolls
 
Other breads
 
Sandwiches
 
Sandwiches from takeaway
 
Takeaway breads
 
Flour
 
Cakes, buns and pastries
 
Cakes and pastries
 
Cakes and pastries, not frozen
 
Takeaway pastries
 
Buns, scones and teacakes
 
Biscuits and crispbreads
 
Chocolate biscuits
 
Biscuits other than chocolate
 
Sweet biscuits (not chocolate) and cereal bars
 
Cream crackers and other unsweetened biscuits
 
Crispbread
 
Other cereals and cereal products
 
Oatmeal and oat products
 
Breakfast cereals
 
Muesli
 
High fibre breakfast cereals
 
Sweetened breakfast cereals
 
Other breakfast cereals
 
Canned milk puddings
 
Canned or fresh carton custard
 
All canned milk puddings
 
Puddings
 
Rice
 
Dried rice
 
Cooked rice
 
Takeaway rice
 
Invalid foods, slimming foods and sports foods
 
Infant cereal foods
 
Cakes and pastries - frozen
 
Pasta
 
Canned pasta
 
Dried and fresh pasta
 
Takeaway pasta and noodles
 
Pizza
 
Pizzas, frozen and not frozen
 
Takeaway pizza
 
Other cereal convenience foods
 
Cake, pudding and dessert mixes
 
Cereal snacks
 
Quiches and flans, frozen and not frozen
 
Takeaway crisps, savoury snacks, popcorn, popadums, prawn crackers
 
Other cereal foods, frozen and not frozen
 
Other cereals
 
Beverages
 
Tea
 
Coffee beans and ground coffee
 
Instant coffee
 
Coffee essences
 
Tea and coffee from takeaway
 
Cocoa and chocolate drinks
 
Malt drinks and chocolate versions of malted drinks
 
Other food and drink
 
Mineral or spring waters
 
Baby foods
 
Soups - canned or cartons
 
Soups - dehydrated or powdered
 
Soups - from takeaway
 
Spreads and dressings
 
Salad dressings
 
Other spreads and dresssings
 
Pickles and sauces
 
Pickles
 
Sauces
 
Takeaway sauces and mayonnnaise
 
Stock cubes and meat and yeast extracts
 
Jelly squares or crystals
 
Ice cream tub or block
 
Ice cream products including takeaways
 
Ice cream cornets, choc-ices, lollies with ice cream
 
Ice lollies, sorbet, frozen mousse, frozen yoghurt
 
Takeaway ice cream, ice cream products, milkshakes
 
Soya and novel protein foods
 
Salt
 
Artificial sweeteners
 
Other miscellaneous payments, expenditure only
 
Vinegar
 
Spices and dried herbs
 
Bisto, gravy granules, stuffing mix, baking powder, yeast
 
Wine and beer making kits
 
Fruit teas, instant tea, herbal tea, rosehip tea
 
Other payments for food and drink, type not specified
 
Other takeaway food brought home
 
Meals on wheels - items not specified
 
Soft drinks
 
Soft drinks, concentrated, not low calorie
 
Soft drinks, not concentrated,  not low calorie
 
Soft drinks, concentrated, low calorie
 
Soft drinks, not concentrated, low calorie
 
Confectionery
 
Chocolate bars - solid
 
Chocolate bars - filled
 
Chewing gum
 
Mints and boiled sweets
 
Mints
 
Boiled sweets
 
Fudges, toffees, caramels
 
Takeaway confectionery
 
Alcoholic drinks
 
Beers
 
Lagers and continental beers
 
Ciders and perry
 
Wine and champagne
 
Champagne, sparkling wines and wine with mixer
 
Table wine
 
Spirits with mixer
 
Fortified wines
 
Spirits
 
Liqueurs and cocktails
 
Alcopops
 
 
</pre>
 
</pre>
 +
 +
== Cordova plugins ==
 +
 +
* http://plugins.cordova.io/#/package/com.phonegap.plugins.barcodescanner
 +
* https://moodstocks.com/docs/phonegap/using-the-moodstocks-sdk-in-your-phonegap-application/
 +
 +
=== Bugs ===
 +
 +
2ème scan avec Moodstocks:
 +
 +
java.lang.RuntimeException : Unable to start activity ComponentInfo ... The specified child already has a parent. You must call removeView() on the child's parent first.
 +
 +
-> pb de jquerymobile qui "sort" pas proprement du scan lorsqu'on clique sur "back" ?
 +
 +
=== Import sur Google Play ===
 +
 +
* "Vous avez importé un fichier APK qui n'est pas aligné au format zip. Veuillez exécuter un utilitaire d'alignement zipalign sur votre fichier APK, puis le réimporter."
 +
 +
=== Camera, File, File transfer plugins ===
 +
 +
cordova plugin add org.apache.cordova.camera
 +
cordova plugin add org.apache.cordova.file
 +
cordova plugin add org.apache.cordova.file-transfer
 +
 +
== Firefox OS ==
 +
 +
* https://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager
 +
* https://github.com/gasolin/qrcode_scanner/
 +
* https://github.com/SunboX/QR-Reader
 +
 +
== May be of interest for future apps ==
 +
 +
* http://ionicframework.com/

Revision as of 09:58, 24 October 2014

This page contains notes regarding the development of the Open Food Facts mobile apps.

The current Open Food Facts apps for iOS, Android and Windows Phone use Apache Cordova (previously known as Phonegap).

Cordova: http://cordova.apache.org/

Installing Cordova 3.6 : http://cordova.apache.org/docs/en/3.6.0/guide_overview_index.md.html

http://cordova.apache.org/docs/en/3.6.0/guide_cli_index.md.html#The%20Command-Line%20Interface

Following notes are for the Windows Platform, but most of it probably applies for Mac or Linux.

Install Node.js

Install git client

Install Cordova

in git-bash client:

  • npm install -g cordova

cordova -v : 3.6.3-0.2.13

  • "error android_home is not set and android command not in your path" when doing "cordova platform add android"

"error failed to run javac -version make sure"

Java JDK

ANT

"Error: Failed to run "java -version"

which java --> un vieux java dans C:\Windows\System32 était la cause du problème.. :-(

http://stackoverflow.com/questions/24493693/cordova-android-revision-to-low

Run SDK Manager, install Android build tools.

android version code

in config.xml : http://stackoverflow.com/questions/23001780/how-to-get-cordova-3-4-0-to-set-android-version-name-code-on-build


Install Moodstocks

Instructions pas à jour pour cordova 3.6 on dirait, par contre il y a un autre example :

public class Demo extends CordovaActivity {

  private boolean scanActivityStarted = false;

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    this.init();
    // Set by <content src="index.html" /> in config.xml
    super.loadUrl(Config.getStartUrl());
    //super.loadUrl("file:///android_asset/www/index.html")
  }

Cordova plugins

Bugs

2ème scan avec Moodstocks:

java.lang.RuntimeException : Unable to start activity ComponentInfo ... The specified child already has a parent. You must call removeView() on the child's parent first.

-> pb de jquerymobile qui "sort" pas proprement du scan lorsqu'on clique sur "back" ?

Import sur Google Play

  • "Vous avez importé un fichier APK qui n'est pas aligné au format zip. Veuillez exécuter un utilitaire d'alignement zipalign sur votre fichier APK, puis le réimporter."

Camera, File, File transfer plugins

cordova plugin add org.apache.cordova.camera cordova plugin add org.apache.cordova.file cordova plugin add org.apache.cordova.file-transfer

Firefox OS

May be of interest for future apps