Changes

Jump to navigation Jump to search
2,741 bytes removed ,  08:51, 14 October 2014
Created page with "This project aims at improving Wikidata with Open Food Facts Data, with the aim of eventually reusing the data, and linking the Open Food Facts data with Wikidata, and thus wi..."
Line 1: Line 1: −
This page contains notes regarding the development of the Open Food Facts mobile apps.
+
This project aims at improving Wikidata with Open Food Facts Data, with the aim of eventually reusing the data, and linking the Open Food Facts data with Wikidata, and thus with many other services.
   −
The current Open Food Facts apps for iOS, Android and Windows Phone use Apache Cordova (previously known as Phonegap).
+
=== Companies ===
 
+
* Marking companies as "instance of" companies
Cordova: http://cordova.apache.org/
+
* Adding their "parent companies" (You can use http://www.businessinsider.com/10-companies-that-control-what-we-buy-2014-7?utm_content=buffer30561&utm_medium=social&utm_source=facebook.com&utm_campaign=buffer)
 
+
* Adding the Wikidata item number (QXXXXXX) on the Open Food Facts taxonomy
Installing Cordova 3.6 : http://cordova.apache.org/docs/en/3.6.0/guide_overview_index.md.html
+
=== Brands ===
 
+
* Marking brands as "instance of" brands
http://cordova.apache.org/docs/en/3.6.0/guide_cli_index.md.html#The%20Command-Line%20Interface
+
* Adding the Wikidata item number (QXXXXXX) on the Open Food Facts taxonomy
 
+
=== Categories ===
Following notes are for the Windows Platform, but most of it probably applies for Mac or Linux.
+
* Marking categories as "instance of" their parent category
 
+
* Adding the Wikidata item number (QXXXXXX) on the Open Food Facts taxonomy
Install Node.js
+
=== Labels ===
 
+
* Adding the Wikidata item number (QXXXXXX) on the Open Food Facts taxonomy
* http://nodejs.org/
+
=== Additives ===
* Current Version: v0.10.32
+
* Marking additives as "instance of" food additives, or better yet, in the sub category
 
+
* Adding the Wikidata item number (QXXXXXX) on the Open Food Facts taxonomy
Install git client
  −
 
  −
* http://git-scm.com/
  −
 
  −
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"
  −
**Install Eclipse ADT  (Note : for win8 32bit/64bit install 32bit ADT)
  −
**Setup Environment Variables :
  −
***Add to existing system variable "path" : <path to adt-bundle\sdk\tools>;<path to adt-bundle\sdk\platform-tools>
  −
** http://docs.phonegap.com/en/edge/guide_platforms_android_index.md.html
  −
*** http://developer.android.com/sdk/index.html
  −
*** 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
  −
 
  −
"error failed to run javac -version make sure"
  −
 
  −
Java JDK
  −
* http://www.oracle.com/technetwork/java/javase/downloads/index.html
  −
* JAVA_HOME : C:\Program Files\Java\jdk1.8.0_20
  −
* add to PATH : C:\Program Files\Java\jdk1.8.0_20\bin
  −
 
  −
ANT
  −
* http://ant.apache.org/manual/index.html
  −
* set ANT_HOME
  −
* add %ANT_HOME%/bin to path
  −
 
  −
"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 ===
  −
 
  −
* https://moodstocks.com/docs/phonegap/using-the-moodstocks-sdk-in-your-phonegap-application/
  −
 
  −
Instructions pas à jour pour cordova 3.6 on dirait, par contre il y a un autre example :
  −
 
  −
* https://github.com/Moodstocks/moodstocks-phonegap-plugin/blob/master/src/android/Demo.java
  −
 
  −
<pre>
  −
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")
  −
  }
  −
 
  −
</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 ===
  −
 
  −
cordova plugin add org.apache.cordova.camera
  −
 
  −
== 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/
 

Navigation menu