Ionic

Prerequisites

nodejs (latest)

sudo apt-get install build-essential curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - sudo apt install nodejs

nodeenv

sudo apt-get install python-pip sudo pip install nodeenv

Project

Create library

LIB=<some-path> nodeenv --node=0.10.33 $LIB . $LIB/bin/activate
npm install -g ionic npm install -g bower

update

npm update -g ionic cordova

Create project

Activate library

. $LIB/bin/activate
NAME=PeperStart ionic start $NAME blank cd $NAME ionic browser add crosswalk #(this command enable also android platform)

Update libs

. $LIB/bin/activate npm install -g ionic cd <project> ionic lib update

Eclipse

$P is $NAME/platforms/android path

Import → “Existing Android Code …” → $NAME/platforms/android and deselect all subprojects

Project → Build Path → Configure Build Path

Source → Link source → $P/Cordovalib/src with name src-cordovalib

Libraries → Add external JAR → $P/Cordovalib/xwalkcorelibrary/xwalkcorelibraryjavaapppart.jar * Libraries → Add external JAR → $P/Cordovalib/xwalkcorelibrary/xwalkcorelibraryjavalibrarypart.jar

Native lib integration

Create zip file named gpio.jar and put into platforms/android/libs

lib
└── armeabi
└── libgpio.so

build.gradle search inside libs for *jar (see dependancy section)

Tips

Video fullscreen autoplay

<video ng-controller="startVideo" controls="" style="width:100%; height:auto" autoplay="false"> <source src=""></source> </video>
.controller('startVideo', function($scope) { angular.element('video').attr('src','http://...'); });