Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| tips:ionic [2017/08/07 13:40] – scipio | tips:ionic [2017/08/07 13:54] (current) – scipio | ||
|---|---|---|---|
| Line 18: | Line 18: | ||
| </ | </ | ||
| - | ===== Project ===== | + | ===== Create library |
| - | + | ||
| - | ==== Create library ==== | + | |
| <code bash> | <code bash> | ||
| Line 38: | Line 36: | ||
| </ | </ | ||
| - | ==== Create project ==== | + | ===== Update libs ===== |
| - | + | ||
| - | * https:// | + | |
| - | * https:// | + | |
| - | * https:// | + | |
| - | + | ||
| - | Activate library | + | |
| - | <code bash> | + | |
| - | . $LIB/ | + | |
| - | </ | + | |
| - | + | ||
| - | <code bash> | + | |
| - | NAME=PeperStart | + | |
| - | ionic start $NAME blank | + | |
| - | cd $NAME | + | |
| - | ionic browser add crosswalk #(this command enable also android platform) | + | |
| - | </ | + | |
| - | + | ||
| - | ==== Update libs ==== | + | |
| <code bash> | <code bash> | ||
| Line 66: | Line 46: | ||
| </ | </ | ||
| - | ==== Android ==== | + | ===== Android |
| It is important to install native gradle or use gradle shipped with android studio (see PATH below) | It is important to install native gradle or use gradle shipped with android studio (see PATH below) | ||
| Line 109: | Line 89: | ||
| </ | </ | ||
| - | === Add Native | + | ==== Add java sources and native |
| Add opencv support http:// | Add opencv support http:// | ||
| Line 178: | Line 158: | ||
| </ | </ | ||
| - | ==== Android Studio ==== | + | with <hook src=" |
| + | <file xml res/ | ||
| + | < | ||
| + | <param name=" | ||
| + | <param name=" | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | define typescript interface | ||
| + | <file typescript src/ | ||
| + | import { Injectable } from ' | ||
| + | |||
| + | declare var cordova: | ||
| + | |||
| + | @Injectable() | ||
| + | export class TestPlugin { | ||
| + | public testCall() { | ||
| + | cordova.exec( | ||
| + | function(data) { console.log(" | ||
| + | function(error) { console.log(" | ||
| + | " | ||
| + | " | ||
| + | []); | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== Android Studio | ||
| After project creation via cli (see up) import project (Eclipse, ADT, gradle) from folder < | After project creation via cli (see up) import project (Eclipse, ADT, gradle) from folder < | ||