mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-07-16 00:00:04 +08:00
Compare commits
63
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2933d40cdc | ||
|
|
874ae88ff4 | ||
|
|
a02ca715e9 | ||
|
|
336b3ff89b | ||
|
|
2aa73b5546 | ||
|
|
99cebcba0b | ||
|
|
6c99ec8033 | ||
|
|
a167bd85aa | ||
|
|
487acd603b | ||
|
|
fb4d2640c1 | ||
|
|
4468b520ad | ||
|
|
1a2dc3ee73 | ||
|
|
00a1674fd6 | ||
|
|
2b14bd979e | ||
|
|
fcd6d26727 | ||
|
|
f95003cbe1 | ||
|
|
8e5f2e5ab3 | ||
|
|
307477da78 | ||
|
|
f691883a29 | ||
|
|
0d5d4f30a9 | ||
|
|
1457a1698b | ||
|
|
bfd46eed16 | ||
|
|
3eff280127 | ||
|
|
8116ddd139 | ||
|
|
a6bcc9affd | ||
|
|
c0d8c99e8d | ||
|
|
fe9655ed84 | ||
|
|
41c034cc19 | ||
|
|
89631a9fa6 | ||
|
|
04db233b33 | ||
|
|
10d222dcea | ||
|
|
640da1b618 | ||
|
|
aecb0f9460 | ||
|
|
d077c48205 | ||
|
|
49d27e816c | ||
|
|
3699fa9b50 | ||
|
|
ab4f1f5bbe | ||
|
|
51006a76a0 | ||
|
|
8bab32173a | ||
|
|
3ef9593704 | ||
|
|
ffae843c0f | ||
|
|
33e4392b63 | ||
|
|
9acbb9fcd6 | ||
|
|
c1e1c5cb79 | ||
|
|
0c7cfeeeb8 | ||
|
|
a7830693af | ||
|
|
b60d5d4851 | ||
|
|
0c4aeddd1b | ||
|
|
667de5ba26 | ||
|
|
2dc7ee8916 | ||
|
|
2c2c1e482c | ||
|
|
7c419b48ad | ||
|
|
0b9717636c | ||
|
|
10ac9ff9de | ||
|
|
90d75af9d1 | ||
|
|
3b3f942ed5 | ||
|
|
9601a64227 | ||
|
|
22fd49b5d3 | ||
|
|
890129bfda | ||
|
|
6a9a871758 | ||
|
|
ac467c50ac | ||
|
|
267149b16f | ||
|
|
7047920a2a |
+83
-2
@@ -1,5 +1,86 @@
|
||||
<a name="4.12.2"></a>
|
||||
## [4.12.2](https://github.com/ionic-team/ionic-native/compare/v4.12.1...v4.12.2) (2018-08-31)
|
||||
<a name="4.16.0"></a>
|
||||
# [4.16.0](https://github.com/ionic-team/ionic-native/compare/v4.15.0...v4.16.0) (2018-10-17)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **keyboard:** add missing property ([fcd6d26](https://github.com/ionic-team/ionic-native/commit/fcd6d26))
|
||||
* **local-notifications:** add missing functions ([#2779](https://github.com/ionic-team/ionic-native/issues/2779)) ([336b3ff](https://github.com/ionic-team/ionic-native/commit/336b3ff)), closes [#2778](https://github.com/ionic-team/ionic-native/issues/2778)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **admob-plus:** Add admob-plus ([#2753](https://github.com/ionic-team/ionic-native/issues/2753)) ([6c99ec8](https://github.com/ionic-team/ionic-native/commit/6c99ec8))
|
||||
* **firebase-messaging:** add revokeToken function ([#2763](https://github.com/ionic-team/ionic-native/issues/2763)) ([1a2dc3e](https://github.com/ionic-team/ionic-native/commit/1a2dc3e))
|
||||
* **lastCam:** add plugin ([#2759](https://github.com/ionic-team/ionic-native/issues/2759)) ([99cebcb](https://github.com/ionic-team/ionic-native/commit/99cebcb))
|
||||
* **nfc:** add NFC readerMode ([#2777](https://github.com/ionic-team/ionic-native/issues/2777)) ([2aa73b5](https://github.com/ionic-team/ionic-native/commit/2aa73b5))
|
||||
* **speechkit:** plugin updated with voice parameter ([#2761](https://github.com/ionic-team/ionic-native/issues/2761)) ([4468b52](https://github.com/ionic-team/ionic-native/commit/4468b52))
|
||||
|
||||
|
||||
|
||||
<a name="4.15.0"></a>
|
||||
# [4.15.0](https://github.com/ionic-team/ionic-native/compare/v4.14.0...v4.15.0) (2018-09-25)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **keyboard:** use cordova-plugin-ionic-keyboard ([#2743](https://github.com/ionic-team/ionic-native/issues/2743)) ([1457a16](https://github.com/ionic-team/ionic-native/commit/1457a16)), closes [#2306](https://github.com/ionic-team/ionic-native/issues/2306)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **plugins:** add AppleWallet ([#2740](https://github.com/ionic-team/ionic-native/issues/2740)) ([307477d](https://github.com/ionic-team/ionic-native/commit/307477d))
|
||||
* **plugins:** add web-server plugin ([#2726](https://github.com/ionic-team/ionic-native/issues/2726)) ([8116ddd](https://github.com/ionic-team/ionic-native/commit/8116ddd))
|
||||
* **siri-shortcuts:** Add clear option for the activated shortcut ([#2734](https://github.com/ionic-team/ionic-native/issues/2734)) ([3eff280](https://github.com/ionic-team/ionic-native/commit/3eff280))
|
||||
* **taptic-engine:** add missing functions and types ([a6bcc9a](https://github.com/ionic-team/ionic-native/commit/a6bcc9a))
|
||||
|
||||
|
||||
|
||||
<a name="4.14.0"></a>
|
||||
# [4.14.0](https://github.com/ionic-team/ionic-native/compare/v4.13.0...v4.14.0) (2018-09-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **mobile-accessibility:** add correct pluginRef ([3699fa9](https://github.com/ionic-team/ionic-native/commit/3699fa9)), closes [#1860](https://github.com/ionic-team/ionic-native/issues/1860)
|
||||
* **onesignal:** add missing setLocationShared method ([#2723](https://github.com/ionic-team/ionic-native/issues/2723)) ([8bab321](https://github.com/ionic-team/ionic-native/commit/8bab321))
|
||||
* **push:** add missing Chanel options ([3ef9593](https://github.com/ionic-team/ionic-native/commit/3ef9593)), closes [#2712](https://github.com/ionic-team/ionic-native/issues/2712)
|
||||
* **web-intent:** add missing properties ([d077c48](https://github.com/ionic-team/ionic-native/commit/d077c48)), closes [#2701](https://github.com/ionic-team/ionic-native/issues/2701)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **chooster:** add plugin ([04db233](https://github.com/ionic-team/ionic-native/commit/04db233)), closes [#2612](https://github.com/ionic-team/ionic-native/issues/2612)
|
||||
* **local-notifications:** add missing functions ([10d222d](https://github.com/ionic-team/ionic-native/commit/10d222d))
|
||||
* **onesignal:** add missing functions ([51006a7](https://github.com/ionic-team/ionic-native/commit/51006a7)), closes [#2504](https://github.com/ionic-team/ionic-native/issues/2504)
|
||||
|
||||
|
||||
|
||||
<a name="4.13.0"></a>
|
||||
# [4.13.0](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.17...v4.13.0) (2018-09-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **bluetooth-le:** Various methods fixes ([#2707](https://github.com/ionic-team/ionic-native/issues/2707)) ([7047920](https://github.com/ionic-team/ionic-native/commit/7047920))
|
||||
* **in-app-review:** Transfer Plugin to the correct folder ([#2688](https://github.com/ionic-team/ionic-native/issues/2688)) ([22fd49b](https://github.com/ionic-team/ionic-native/commit/22fd49b))
|
||||
* **ms-adal:** Update createAuthenticationContext ([#2705](https://github.com/ionic-team/ionic-native/issues/2705)) ([890129b](https://github.com/ionic-team/ionic-native/commit/890129b))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **appsflyer:** Added Appsflyer Cordova SDK as ionic native plugin ([#2690](https://github.com/ionic-team/ionic-native/issues/2690)) ([3b3f942](https://github.com/ionic-team/ionic-native/commit/3b3f942))
|
||||
* **branch-io:** Add branch.io attribution and invitation plugin ([#2691](https://github.com/ionic-team/ionic-native/issues/2691)) ([90d75af](https://github.com/ionic-team/ionic-native/commit/90d75af))
|
||||
* **calldirectory:** add log function ([#2708](https://github.com/ionic-team/ionic-native/issues/2708)) ([9601a64](https://github.com/ionic-team/ionic-native/commit/9601a64))
|
||||
* **janalytics:** add plugin ([#2711](https://github.com/ionic-team/ionic-native/issues/2711)) ([0b97176](https://github.com/ionic-team/ionic-native/commit/0b97176))
|
||||
* **local-notifications:** Added local additional local notification action fields ([#2713](https://github.com/ionic-team/ionic-native/issues/2713)) ([267149b](https://github.com/ionic-team/ionic-native/commit/267149b))
|
||||
* **mixpanel:** Update/add functions ([#2697](https://github.com/ionic-team/ionic-native/issues/2697)) ([ac467c5](https://github.com/ionic-team/ionic-native/commit/ac467c5))
|
||||
* **wechat:** add plugin ([#2716](https://github.com/ionic-team/ionic-native/issues/2716)) ([10ac9ff](https://github.com/ionic-team/ionic-native/commit/10ac9ff))
|
||||
|
||||
|
||||
|
||||
<a name="5.0.0-beta.17"></a>
|
||||
# [5.0.0-beta.17](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.16...v5.0.0-beta.17) (2018-08-31)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
Generated
+275
-128
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ionic-native",
|
||||
"version": "4.12.2",
|
||||
"version": "4.16.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -40,6 +40,12 @@
|
||||
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ=",
|
||||
"dev": true
|
||||
},
|
||||
"@types/fancy-log": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/fancy-log/-/fancy-log-1.3.0.tgz",
|
||||
"integrity": "sha512-mQjDxyOM1Cpocd+vm1kZBP7smwKZ4TNokFeds9LV7OZibmPJFEzY3+xZMrKfUdNT71lv8GoCPD6upKwHxubClw==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/jasmine": {
|
||||
"version": "2.8.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.8.8.tgz",
|
||||
@@ -201,6 +207,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"ansi-colors": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
|
||||
"integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-wrap": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"ansi-cyan": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz",
|
||||
@@ -210,6 +225,15 @@
|
||||
"ansi-wrap": "0.1.0"
|
||||
}
|
||||
},
|
||||
"ansi-gray": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz",
|
||||
"integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-wrap": "0.1.0"
|
||||
}
|
||||
},
|
||||
"ansi-red": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz",
|
||||
@@ -1776,6 +1800,27 @@
|
||||
"object-visit": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
|
||||
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-name": "1.1.3"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
|
||||
"dev": true
|
||||
},
|
||||
"color-support": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
|
||||
"integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
|
||||
"dev": true
|
||||
},
|
||||
"colors": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
|
||||
@@ -1824,8 +1869,7 @@
|
||||
"version": "2.16.0",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.16.0.tgz",
|
||||
"integrity": "sha512-sVXqklSaotK9at437sFlFpyOcJonxe0yST/AG9DkQKUdIE6IqGIMv4SfAQSKaJbSdVEJYItASCrBiVQHq1HQew==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"compare-func": {
|
||||
"version": "1.3.2",
|
||||
@@ -2879,9 +2923,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"dependency-graph": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.4.1.tgz",
|
||||
"integrity": "sha1-MC5YIY2FxRqXY4cw2/m32FKhlpM=",
|
||||
"version": "0.7.2",
|
||||
"resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.7.2.tgz",
|
||||
"integrity": "sha512-KqtH4/EZdtdfWX0p6MGP9jljvxSY6msy/pRUD4jgNwVpv3v1QmNLlsB3LDSSUg79BRVSn7jI1QPRtArGABovAQ==",
|
||||
"dev": true
|
||||
},
|
||||
"deprecated": {
|
||||
@@ -2919,34 +2963,20 @@
|
||||
}
|
||||
},
|
||||
"dgeni": {
|
||||
"version": "0.4.7",
|
||||
"resolved": "https://registry.npmjs.org/dgeni/-/dgeni-0.4.7.tgz",
|
||||
"integrity": "sha1-UHBifdKPiNSABuIfVa+xipy4vmg=",
|
||||
"version": "0.4.10",
|
||||
"resolved": "https://registry.npmjs.org/dgeni/-/dgeni-0.4.10.tgz",
|
||||
"integrity": "sha512-In8huU+6W+Rd7MdfzhQoRbntF4AsJgtbwRUTyfPgvhaC3RGJX/YOEkMnn7vLLk3zaCrEkIQGW6eADoudpnBceg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"canonical-path": "~0.0.2",
|
||||
"dependency-graph": "~0.4.1",
|
||||
"dependency-graph": "^0.7.0",
|
||||
"di": "0.0.1",
|
||||
"lodash": "^3.10.1",
|
||||
"lodash": "^4.17.10",
|
||||
"objectdiff": "^1.1.0",
|
||||
"optimist": "~0.6.1",
|
||||
"q": "~1.4.1",
|
||||
"validate.js": "^0.9.0",
|
||||
"q": "^1.5.1",
|
||||
"validate.js": "^0.12.0",
|
||||
"winston": "^2.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"lodash": {
|
||||
"version": "3.10.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
|
||||
"integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
|
||||
"dev": true
|
||||
},
|
||||
"q": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz",
|
||||
"integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"dgeni-packages": {
|
||||
@@ -3784,36 +3814,23 @@
|
||||
"dev": true
|
||||
},
|
||||
"fs-extra": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.0.0.tgz",
|
||||
"integrity": "sha1-M3NSve1KC3FPPrhN6M6nZenTdgA=",
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.0.tgz",
|
||||
"integrity": "sha512-EglNDLRpmaTWiD/qraZn6HREAEAHJcJOmxNEYwq6xeMKnVMAy3GUcFB+wXt2C6k4CNvB/mP1y/U3dzvKKj5OtQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.2",
|
||||
"jsonfile": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"fs-extra-promise": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra-promise/-/fs-extra-promise-0.4.1.tgz",
|
||||
"integrity": "sha1-rCjNLPa6ckjYI13ziHts9u3fNC8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bluebird": "^3.4.6",
|
||||
"fs-extra": "^0.30.0"
|
||||
"jsonfile": "^4.0.0",
|
||||
"universalify": "^0.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"fs-extra": {
|
||||
"version": "0.30.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz",
|
||||
"integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=",
|
||||
"jsonfile": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
|
||||
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.2",
|
||||
"jsonfile": "^2.1.0",
|
||||
"klaw": "^1.0.0",
|
||||
"path-is-absolute": "^1.0.0",
|
||||
"rimraf": "^2.2.8"
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5441,14 +5458,108 @@
|
||||
}
|
||||
},
|
||||
"gulp-tslint": {
|
||||
"version": "6.1.2",
|
||||
"resolved": "https://registry.npmjs.org/gulp-tslint/-/gulp-tslint-6.1.2.tgz",
|
||||
"integrity": "sha1-ni3oLvJaqkN4/Yn+W0Q7Pq9wL+0=",
|
||||
"version": "8.1.3",
|
||||
"resolved": "https://registry.npmjs.org/gulp-tslint/-/gulp-tslint-8.1.3.tgz",
|
||||
"integrity": "sha512-KEP350N5B9Jg6o6jnyCyKVBPemJePYpMsGfIQq0G0ErvY7tw4Lrfb/y3L4WRf7ek0OsaE8nnj86w+lcLXW8ovw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"gulp-util": "~3.0.7",
|
||||
"map-stream": "~0.1.0",
|
||||
"@types/fancy-log": "1.3.0",
|
||||
"chalk": "2.3.1",
|
||||
"fancy-log": "1.3.2",
|
||||
"map-stream": "~0.0.7",
|
||||
"plugin-error": "1.0.1",
|
||||
"through": "~2.3.8"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-styles": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-convert": "^1.9.0"
|
||||
}
|
||||
},
|
||||
"arr-diff": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
|
||||
"integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
|
||||
"dev": true
|
||||
},
|
||||
"arr-union": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
|
||||
"integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
|
||||
"dev": true
|
||||
},
|
||||
"chalk": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "http://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz",
|
||||
"integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^3.2.0",
|
||||
"escape-string-regexp": "^1.0.5",
|
||||
"supports-color": "^5.2.0"
|
||||
}
|
||||
},
|
||||
"extend-shallow": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
|
||||
"integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"assign-symbols": "^1.0.0",
|
||||
"is-extendable": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"fancy-log": {
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.2.tgz",
|
||||
"integrity": "sha1-9BEl49hPLn2JpD0G2VjI94vha+E=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-gray": "^0.1.1",
|
||||
"color-support": "^1.1.3",
|
||||
"time-stamp": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
||||
"dev": true
|
||||
},
|
||||
"is-extendable": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
|
||||
"integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-plain-object": "^2.0.4"
|
||||
}
|
||||
},
|
||||
"plugin-error": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz",
|
||||
"integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-colors": "^1.0.1",
|
||||
"arr-diff": "^4.0.0",
|
||||
"arr-union": "^3.1.0",
|
||||
"extend-shallow": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-flag": "^3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"gulp-util": {
|
||||
@@ -7717,9 +7828,9 @@
|
||||
}
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.10",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
|
||||
"integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==",
|
||||
"version": "4.17.11",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
|
||||
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
|
||||
"dev": true
|
||||
},
|
||||
"lodash._basecopy": {
|
||||
@@ -8206,9 +8317,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"map-stream": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz",
|
||||
"integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=",
|
||||
"version": "0.0.7",
|
||||
"resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.7.tgz",
|
||||
"integrity": "sha1-ih8HiW2CsQkmvTdEokIACfiJdKg=",
|
||||
"dev": true
|
||||
},
|
||||
"map-visit": {
|
||||
@@ -10996,75 +11107,106 @@
|
||||
"dev": true
|
||||
},
|
||||
"tslint": {
|
||||
"version": "3.15.1",
|
||||
"resolved": "https://registry.npmjs.org/tslint/-/tslint-3.15.1.tgz",
|
||||
"integrity": "sha1-2hZcqT2P3CwIa1EWXuG6y0jJjqU=",
|
||||
"version": "5.11.0",
|
||||
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.11.0.tgz",
|
||||
"integrity": "sha1-mPMMAurjzecAYgHkwzywi0hYHu0=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"colors": "^1.1.2",
|
||||
"diff": "^2.2.1",
|
||||
"findup-sync": "~0.3.0",
|
||||
"glob": "^7.0.3",
|
||||
"optimist": "~0.6.0",
|
||||
"resolve": "^1.1.7",
|
||||
"underscore.string": "^3.3.4"
|
||||
"babel-code-frame": "^6.22.0",
|
||||
"builtin-modules": "^1.1.1",
|
||||
"chalk": "^2.3.0",
|
||||
"commander": "^2.12.1",
|
||||
"diff": "^3.2.0",
|
||||
"glob": "^7.1.1",
|
||||
"js-yaml": "^3.7.0",
|
||||
"minimatch": "^3.0.4",
|
||||
"resolve": "^1.3.2",
|
||||
"semver": "^5.3.0",
|
||||
"tslib": "^1.8.0",
|
||||
"tsutils": "^2.27.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"colors": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz",
|
||||
"integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=",
|
||||
"dev": true
|
||||
},
|
||||
"diff": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-2.2.3.tgz",
|
||||
"integrity": "sha1-YOr9DSjukG5Oj/ClLBIpUhAzv5k=",
|
||||
"dev": true
|
||||
},
|
||||
"findup-sync": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz",
|
||||
"integrity": "sha1-N5MKpdgWt3fANEXhlmzGeQpMCxY=",
|
||||
"ansi-styles": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"glob": "~5.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"glob": {
|
||||
"version": "5.0.15",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
|
||||
"integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "2 || 3",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
}
|
||||
}
|
||||
"color-convert": "^1.9.0"
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
|
||||
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^3.2.1",
|
||||
"escape-string-regexp": "^1.0.5",
|
||||
"supports-color": "^5.3.0"
|
||||
}
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
||||
"dev": true
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-flag": "^3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tslint-eslint-rules": {
|
||||
"version": "1.6.1",
|
||||
"resolved": "https://registry.npmjs.org/tslint-eslint-rules/-/tslint-eslint-rules-1.6.1.tgz",
|
||||
"integrity": "sha1-OekvMZVq0qZsAGHDUfqWwICK4Pg=",
|
||||
"version": "5.4.0",
|
||||
"resolved": "https://registry.npmjs.org/tslint-eslint-rules/-/tslint-eslint-rules-5.4.0.tgz",
|
||||
"integrity": "sha512-WlSXE+J2vY/VPgIcqQuijMQiel+UtmXS+4nvK4ZzlDiqBfXse8FAvkNnTcYhnQyOTW5KFM+uRRGXxYhFpuBc6w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"doctrine": "^0.7.2",
|
||||
"tslint": "^3.15.1"
|
||||
"doctrine": "0.7.2",
|
||||
"tslib": "1.9.0",
|
||||
"tsutils": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz",
|
||||
"integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==",
|
||||
"dev": true
|
||||
},
|
||||
"tsutils": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.0.0.tgz",
|
||||
"integrity": "sha512-LjHBWR0vWAUHWdIAoTjoqi56Kz+FDKBgVEuL+gVPG/Pv7QW5IdaDDeK9Txlr6U0Cmckp5EgCIq1T25qe3J6hyw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"tslib": "^1.8.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tslint-ionic-rules": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/tslint-ionic-rules/-/tslint-ionic-rules-0.0.8.tgz",
|
||||
"integrity": "sha1-au1vjjzUBlIzAdHW0Db38DbdKAk=",
|
||||
"version": "0.0.19",
|
||||
"resolved": "https://registry.npmjs.org/tslint-ionic-rules/-/tslint-ionic-rules-0.0.19.tgz",
|
||||
"integrity": "sha512-myxelwnK9FkR4mG+PnktKZ2DJp1UnX+22MyiC0V8QZc0464X6X63kRQU8vMtpVlazpvbifsXP9yxct2tHBrN4w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"tslint-eslint-rules": "^1.3.0"
|
||||
"@types/node": "^10.9.4",
|
||||
"tslint-eslint-rules": "^5.3.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "10.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.10.0.tgz",
|
||||
"integrity": "sha512-0V36JTaif20jrbTbZeKqnI4R8nLVE8Ah/u9dQT5jIKXjW51/4ipi/B8Xon1ZiEHATYpgLNoBw2LFfdBMoA5Fzg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"tsscmp": {
|
||||
@@ -11074,6 +11216,15 @@
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"tsutils": {
|
||||
"version": "2.29.0",
|
||||
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz",
|
||||
"integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"tslib": "^1.8.1"
|
||||
}
|
||||
},
|
||||
"tty-browserify": {
|
||||
"version": "0.0.0",
|
||||
"resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
|
||||
@@ -11190,16 +11341,6 @@
|
||||
"underscore": "1.6.0"
|
||||
}
|
||||
},
|
||||
"underscore.string": {
|
||||
"version": "3.3.4",
|
||||
"resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.4.tgz",
|
||||
"integrity": "sha1-LCo/n4PmR2L9xF5s6sZRQoZCE9s=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"sprintf-js": "^1.0.3",
|
||||
"util-deprecate": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"union-value": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz",
|
||||
@@ -11247,6 +11388,12 @@
|
||||
"integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=",
|
||||
"dev": true
|
||||
},
|
||||
"universalify": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
|
||||
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
|
||||
"dev": true
|
||||
},
|
||||
"unpipe": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
||||
@@ -11428,9 +11575,9 @@
|
||||
}
|
||||
},
|
||||
"validate.js": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/validate.js/-/validate.js-0.9.0.tgz",
|
||||
"integrity": "sha1-is8BRPFSChmDXGzGY/ReCDaqVsg=",
|
||||
"version": "0.12.0",
|
||||
"resolved": "https://registry.npmjs.org/validate.js/-/validate.js-0.12.0.tgz",
|
||||
"integrity": "sha512-/x2RJSvbqEyxKj0RPN4xaRquK+EggjeVXiDDEyrJzsJogjtiZ9ov7lj/svVb4DM5Q5braQF4cooAryQbUwOxlA==",
|
||||
"dev": true
|
||||
},
|
||||
"verror": {
|
||||
@@ -11596,9 +11743,9 @@
|
||||
"optional": true
|
||||
},
|
||||
"winston": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/winston/-/winston-2.4.0.tgz",
|
||||
"integrity": "sha1-gIBQuT1SZh7Z+2wms/DIJnCLCu4=",
|
||||
"version": "2.4.4",
|
||||
"resolved": "https://registry.npmjs.org/winston/-/winston-2.4.4.tgz",
|
||||
"integrity": "sha512-NBo2Pepn4hK4V01UfcWcDlmiVTs7VTB1h7bgnB0rgP146bYhMxX0ypCz3lBOfNxCO4Zuek7yeT+y/zM1OfMw4Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"async": "~1.0.0",
|
||||
|
||||
+7
-8
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ionic-native",
|
||||
"version": "4.12.2",
|
||||
"version": "4.16.0",
|
||||
"description": "Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support",
|
||||
"homepage": "https://ionicframework.com/",
|
||||
"author": "Ionic Team <hi@ionic.io> (https://ionic.io)",
|
||||
@@ -16,14 +16,13 @@
|
||||
"child-process-promise": "2.2.1",
|
||||
"conventional-changelog-cli": "^2.0.5",
|
||||
"cz-conventional-changelog": "^2.1.0",
|
||||
"dgeni": "0.4.7",
|
||||
"dgeni": "^0.4.10",
|
||||
"dgeni-packages": "0.16.10",
|
||||
"fs-extra": "2.0.0",
|
||||
"fs-extra-promise": "0.4.1",
|
||||
"fs-extra": "^7.0.0",
|
||||
"gulp": "3.9.1",
|
||||
"gulp-rename": "^1.4.0",
|
||||
"gulp-replace": "^1.0.0",
|
||||
"gulp-tslint": "6.1.2",
|
||||
"gulp-tslint": "^8.1.3",
|
||||
"jasmine-core": "^3.2.1",
|
||||
"karma": "^2.0.5",
|
||||
"karma-cli": "^1.0.1",
|
||||
@@ -31,7 +30,7 @@
|
||||
"karma-phantomjs-launcher": "^1.0.4",
|
||||
"karma-typescript": "^3.0.13",
|
||||
"karma-typescript-es6-transform": "^1.0.4",
|
||||
"lodash": "^4.17.10",
|
||||
"lodash": "^4.17.11",
|
||||
"minimist": "1.2.0",
|
||||
"node-html-encoder": "0.0.2",
|
||||
"q": "^1.5.1",
|
||||
@@ -39,8 +38,8 @@
|
||||
"rimraf": "^2.6.2",
|
||||
"rxjs": "^5.5.12",
|
||||
"semver": "^5.5.1",
|
||||
"tslint": "3.15.1",
|
||||
"tslint-ionic-rules": "0.0.8",
|
||||
"tslint": "^5.11.0",
|
||||
"tslint-ionic-rules": "0.0.19",
|
||||
"typescript": "~2.4.2",
|
||||
"zone.js": "^0.8.26"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
// Node module dependencies
|
||||
const fs = require('fs-extra-promise').useFs(require('fs-extra')),
|
||||
const fs = require('fs-extra'),
|
||||
queue = require('queue'),
|
||||
path = require('path'),
|
||||
exec = require('child_process').exec;
|
||||
@@ -84,8 +84,8 @@ const addPluginToQueue = pluginName => {
|
||||
|
||||
let tsConfigPath;
|
||||
|
||||
fs.mkdirpAsync(PLUGIN_BUILD_DIR) // create tmp build dir
|
||||
.then(() => fs.mkdirpAsync(path.resolve(BUILD_DIST_ROOT, pluginName))) // create dist dir
|
||||
fs.mkdirp(PLUGIN_BUILD_DIR) // create tmp build dir
|
||||
.then(() => fs.mkdirp(path.resolve(BUILD_DIST_ROOT, pluginName))) // create dist dir
|
||||
.then(() => {
|
||||
// Write tsconfig.json
|
||||
const tsConfig = JSON.parse(JSON.stringify(PLUGIN_TS_CONFIG));
|
||||
@@ -94,7 +94,7 @@ const addPluginToQueue = pluginName => {
|
||||
|
||||
tsConfigPath = path.resolve(PLUGIN_BUILD_DIR, 'tsconfig.json');
|
||||
|
||||
return fs.writeJsonAsync(tsConfigPath, tsConfig);
|
||||
return fs.writeJson(tsConfigPath, tsConfig);
|
||||
})
|
||||
.then(() => {
|
||||
// clone package.json
|
||||
@@ -103,7 +103,7 @@ const addPluginToQueue = pluginName => {
|
||||
packageJson.name = `@ionic-native/${pluginName}`;
|
||||
packageJson.version = IONIC_NATIVE_VERSION;
|
||||
|
||||
return fs.writeJsonAsync(
|
||||
return fs.writeJson(
|
||||
path.resolve(BUILD_DIST_ROOT, pluginName, 'package.json'),
|
||||
packageJson
|
||||
);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
// Node module dependencies
|
||||
const fs = require('fs-extra-promise').useFs(require('fs-extra')),
|
||||
const fs = require('fs-extra'),
|
||||
queue = require('queue'),
|
||||
path = require('path'),
|
||||
exec = require('child-process-promise').exec;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
const config = require('../config.json'),
|
||||
projectPackage = require('../../package.json'),
|
||||
path = require('path'),
|
||||
fs = require('fs-extra-promise').useFs(require('fs-extra')),
|
||||
fs = require('fs-extra'),
|
||||
Dgeni = require('dgeni');
|
||||
|
||||
module.exports = gulp => {
|
||||
|
||||
@@ -133,7 +133,7 @@ describe('Regular Decorators', () => {
|
||||
delete window.testPlugin;
|
||||
window.cordova = true;
|
||||
|
||||
expect(<any>plugin.pingSync()).toEqual(ERR_PLUGIN_NOT_INSTALLED);
|
||||
expect(plugin.pingSync() as any).toEqual(ERR_PLUGIN_NOT_INSTALLED);
|
||||
|
||||
plugin.ping().catch(e => {
|
||||
expect(e).toEqual(ERR_PLUGIN_NOT_INSTALLED.error);
|
||||
@@ -142,10 +142,10 @@ describe('Regular Decorators', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should throw cordova_not_available error', (done: Function) => {
|
||||
xit('should throw cordova_not_available error', (done: Function) => {
|
||||
delete window.testPlugin;
|
||||
|
||||
expect(<any>plugin.pingSync()).toEqual(ERR_CORDOVA_NOT_AVAILABLE);
|
||||
expect(plugin.pingSync() as any).toEqual(ERR_CORDOVA_NOT_AVAILABLE);
|
||||
|
||||
plugin.ping().catch(e => {
|
||||
expect(e).toEqual(ERR_CORDOVA_NOT_AVAILABLE.error);
|
||||
|
||||
@@ -116,7 +116,7 @@ export function InstanceCheck(opts: CordovaCheckOptions = {}) {
|
||||
descriptor: TypedPropertyDescriptor<any>
|
||||
): TypedPropertyDescriptor<any> => {
|
||||
return {
|
||||
value: function(...args: any[]): any {
|
||||
value(...args: any[]): any {
|
||||
if (instanceAvailability(this)) {
|
||||
return descriptor.value.apply(this, args);
|
||||
} else {
|
||||
@@ -145,7 +145,7 @@ export function CordovaCheck(opts: CordovaCheckOptions = {}) {
|
||||
descriptor: TypedPropertyDescriptor<any>
|
||||
): TypedPropertyDescriptor<any> => {
|
||||
return {
|
||||
value: function(...args: any[]): any {
|
||||
value(...args: any[]): any {
|
||||
const check = checkAvailability(pluginObj);
|
||||
if (check === true) {
|
||||
return descriptor.value.apply(this, args);
|
||||
@@ -183,41 +183,41 @@ export function CordovaCheck(opts: CordovaCheckOptions = {}) {
|
||||
* ```
|
||||
*/
|
||||
export function Plugin(config: PluginConfig): ClassDecorator {
|
||||
return function(cls: any) {
|
||||
return (cls: any) => {
|
||||
// Add these fields to the class
|
||||
for (let prop in config) {
|
||||
for (const prop in config) {
|
||||
cls[prop] = config[prop];
|
||||
}
|
||||
|
||||
cls['installed'] = function(printWarning?: boolean) {
|
||||
cls['installed'] = (printWarning?: boolean) => {
|
||||
return !!getPlugin(config.pluginRef);
|
||||
};
|
||||
|
||||
cls['getPlugin'] = function() {
|
||||
cls['getPlugin'] = () => {
|
||||
return getPlugin(config.pluginRef);
|
||||
};
|
||||
|
||||
cls['checkInstall'] = function() {
|
||||
cls['checkInstall'] = () => {
|
||||
return checkAvailability(cls) === true;
|
||||
};
|
||||
|
||||
cls['getPluginName'] = function() {
|
||||
cls['getPluginName'] = () => {
|
||||
return config.pluginName;
|
||||
};
|
||||
|
||||
cls['getPluginRef'] = function() {
|
||||
cls['getPluginRef'] = () => {
|
||||
return config.pluginRef;
|
||||
};
|
||||
|
||||
cls['getPluginInstallName'] = function() {
|
||||
cls['getPluginInstallName'] = () => {
|
||||
return config.plugin;
|
||||
};
|
||||
|
||||
cls['getPluginRepo'] = function() {
|
||||
cls['getPluginRepo'] = () => {
|
||||
return config.repo;
|
||||
};
|
||||
|
||||
cls['getSupportedPlatforms'] = function() {
|
||||
cls['getSupportedPlatforms'] = () => {
|
||||
return config.platforms;
|
||||
};
|
||||
|
||||
@@ -238,7 +238,7 @@ export function Cordova(opts: CordovaOptions = {}) {
|
||||
descriptor: TypedPropertyDescriptor<any>
|
||||
) => {
|
||||
return {
|
||||
value: function(...args: any[]) {
|
||||
value(...args: any[]) {
|
||||
return wrap(this, methodName, opts).apply(this, args);
|
||||
},
|
||||
enumerable: true
|
||||
@@ -254,7 +254,7 @@ export function Cordova(opts: CordovaOptions = {}) {
|
||||
export function CordovaInstance(opts: CordovaOptions = {}) {
|
||||
return (target: Object, methodName: string) => {
|
||||
return {
|
||||
value: function(...args: any[]) {
|
||||
value(...args: any[]) {
|
||||
return wrapInstance(this, methodName, opts).apply(this, args);
|
||||
},
|
||||
enumerable: true
|
||||
@@ -295,10 +295,10 @@ export function CordovaProperty(target: any, key: string) {
|
||||
export function InstanceProperty(target: any, key: string) {
|
||||
Object.defineProperty(target, key, {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
get() {
|
||||
return this._objectInstance[key];
|
||||
},
|
||||
set: function(value) {
|
||||
set(value) {
|
||||
this._objectInstance[key] = value;
|
||||
}
|
||||
});
|
||||
@@ -317,7 +317,7 @@ export function CordovaFunctionOverride(opts: any = {}) {
|
||||
descriptor: TypedPropertyDescriptor<any>
|
||||
) => {
|
||||
return {
|
||||
value: function(...args: any[]) {
|
||||
value(...args: any[]) {
|
||||
return overrideFunction(this, methodName, opts);
|
||||
},
|
||||
enumerable: true
|
||||
|
||||
@@ -105,7 +105,7 @@ function setIndex(
|
||||
opts.successName &&
|
||||
opts.errorName
|
||||
) {
|
||||
let obj: any = {};
|
||||
const obj: any = {};
|
||||
obj[opts.successName] = resolve;
|
||||
obj[opts.errorName] = reject;
|
||||
args.push(obj);
|
||||
@@ -355,11 +355,11 @@ export function overrideFunction(
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export const wrap = function(
|
||||
export const wrap = (
|
||||
pluginObj: any,
|
||||
methodName: string,
|
||||
opts: CordovaOptions = {}
|
||||
) {
|
||||
) => {
|
||||
return (...args: any[]) => {
|
||||
if (opts.sync) {
|
||||
// Sync doesn't wrap the plugin with a promise or observable, it returns the result as-is
|
||||
|
||||
@@ -6,7 +6,7 @@ declare const window: any;
|
||||
export const get = (element: Element | Window, path: string): any => {
|
||||
const paths: string[] = path.split('.');
|
||||
let obj: any = element;
|
||||
for (let i: number = 0; i < paths.length; i++) {
|
||||
for (let i = 0; i < paths.length; i++) {
|
||||
if (!obj) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -21,12 +21,12 @@ export interface TextCaptureOptions {
|
||||
* for example: ["English", "French", "German"]. Empty array
|
||||
* disables language selection.
|
||||
*/
|
||||
selectableRecognitionLanguages?: Array<string>;
|
||||
selectableRecognitionLanguages?: string[];
|
||||
|
||||
/**
|
||||
* Recognition language selected by default.
|
||||
*/
|
||||
recognitionLanguages?: Array<string>;
|
||||
recognitionLanguages?: string[];
|
||||
|
||||
/**
|
||||
* Width and height of the recognition area, separated by a
|
||||
@@ -75,7 +75,7 @@ export interface TextCaptureResult {
|
||||
* · rect (string): position and size of the bounding rectangle,
|
||||
* a string of 4 integers separated with whitespaces ("x y width height").
|
||||
*/
|
||||
textLines: Array<{ text: string, quadrangle: string, rect?: string }>;
|
||||
textLines: { text: string, quadrangle: string, rect?: string }[];
|
||||
|
||||
/**
|
||||
* Additional information. This object has the following keys:
|
||||
@@ -94,7 +94,7 @@ export interface TextCaptureResult {
|
||||
stabilityStatus: string,
|
||||
userAction: string,
|
||||
frameSize: string,
|
||||
recognitionLanguages: Array<string>
|
||||
recognitionLanguages: string[]
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -136,8 +136,8 @@ export interface DataCaptureOptions {
|
||||
customDataCaptureScenario?: {
|
||||
name: string,
|
||||
description: string,
|
||||
recognitionLanguages: Array<string>,
|
||||
fields: Array<{ regEx: string }>
|
||||
recognitionLanguages: string[],
|
||||
fields: { regEx: string }[]
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -68,7 +68,7 @@ export interface AdMobFreeRewardVideoConfig {
|
||||
* @name AdMob Free
|
||||
* @description
|
||||
* A free, no ad-sharing version of Google AdMob plugin for Cordova.
|
||||
*
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-admob-free`. For more info, please see the [AdMob Free plugin docs](https://github.com/ratson/cordova-plugin-admob-free).
|
||||
*
|
||||
* @usage
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { fromEvent } from 'rxjs/observable/fromEvent';
|
||||
|
||||
export type AdUnitIDOption = string | {
|
||||
android: string;
|
||||
ios: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* @name AdMob Free
|
||||
* @description
|
||||
* AdMob Plus is the successor of cordova-plugin-admob-free, which provides a cleaner API and build with modern tools.
|
||||
*/
|
||||
@Plugin({
|
||||
plugin: 'cordova-admob-plus',
|
||||
pluginName: 'AdMob',
|
||||
pluginRef: 'admob.banner',
|
||||
})
|
||||
export class Banner {
|
||||
@Cordova({ otherPromise: true })
|
||||
hide(): Promise<any> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
@Cordova({ otherPromise: true })
|
||||
show(opts: { id?: AdUnitIDOption }): Promise<any> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
|
||||
@Plugin({
|
||||
plugin: 'cordova-admob-plus',
|
||||
pluginName: 'AdMob',
|
||||
pluginRef: 'admob.interstitial',
|
||||
})
|
||||
export class Interstitial {
|
||||
@Cordova({ otherPromise: true })
|
||||
load(opts: { id?: AdUnitIDOption }): Promise<any> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
@Cordova({ otherPromise: true })
|
||||
show(): Promise<any> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
|
||||
@Plugin({
|
||||
plugin: 'cordova-admob-plus',
|
||||
pluginName: 'AdMob',
|
||||
pluginRef: 'admob.rewardVideo',
|
||||
})
|
||||
export class RewardVideo {
|
||||
@Cordova({ otherPromise: true })
|
||||
load(opts: { id?: AdUnitIDOption }): Promise<any> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
@Cordova({ otherPromise: true })
|
||||
show(): Promise<any> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
|
||||
@Plugin({
|
||||
platforms: ['Android', 'iOS'],
|
||||
plugin: 'cordova-admob-plus',
|
||||
pluginName: 'AdMob',
|
||||
pluginRef: 'admob',
|
||||
repo: 'https://github.com/admob-plus/admob-plus',
|
||||
})
|
||||
@Injectable()
|
||||
export class AdMob extends IonicNativePlugin {
|
||||
banner = new Banner();
|
||||
interstitial = new Interstitial();
|
||||
rewardVideo = new RewardVideo();
|
||||
|
||||
@Cordova({ otherPromise: true })
|
||||
setAppMuted(value: boolean): Promise<any> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
@Cordova({ otherPromise: true })
|
||||
setAppVolume(value: number): Promise<any> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
on(event: string): Observable<any> {
|
||||
return fromEvent(document, event);
|
||||
}
|
||||
}
|
||||
@@ -14,8 +14,8 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
*
|
||||
* private secureKey: string;
|
||||
* private secureIV: string;
|
||||
*
|
||||
* constructor(private aes256: AES256) {
|
||||
*
|
||||
* constructor(private aes256: AES256) {
|
||||
* this.generateSecureKeyAndIV(); // To generate the random secureKey and secureIV
|
||||
* }
|
||||
*
|
||||
@@ -34,16 +34,16 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
* .then(res => console.log('Decrypted Data : ',res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
*
|
||||
*
|
||||
* * this.aes256.generateSecureKey('random password 12345')
|
||||
* .then(res => console.log('Secure Key : ',res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* * this.aes256.generateSecureIV('random password 12345')
|
||||
* .then(res => console.log('Secure IV : ',res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* Bit flag values for setSystemUiVisibility()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name App Availability
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ export interface AppRateCustomLocale {
|
||||
/** No button label */
|
||||
noButtonLabel?: string;
|
||||
|
||||
/** App rate promt title */
|
||||
/** App rate prompt title */
|
||||
appRatePromptTitle?: string;
|
||||
|
||||
/** Feedback prompt title */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export type IMakePayments =
|
||||
| 'This device can make payments and has a supported card'
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface EncryptedCardData {
|
||||
activationData: string;
|
||||
encryptedPassData: string;
|
||||
wrappedKey: string;
|
||||
}
|
||||
|
||||
export interface CardData {
|
||||
cardholderName: string;
|
||||
primaryAccountNumberSuffix: string;
|
||||
localizedDescription?: string;
|
||||
paymentNetwork?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Apple Wallet
|
||||
* @description
|
||||
* A Cordova plugin that enables users from Add Payment Cards to their Apple Wallet.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { AppleWallet } from '@ionic-native/apple-wallet';
|
||||
*
|
||||
*
|
||||
* constructor(private appleWallet: AppleWallet) { }
|
||||
*
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* // Simple call to check whether the app can add cards to Apple Pay.
|
||||
* this.appleWallet.available()
|
||||
* .then((res) => {
|
||||
* // Apple Wallet is enabled and a supported card is setup. Expect:
|
||||
* // boolean value, true or false
|
||||
* })
|
||||
* .catch((message) => {
|
||||
* // Error message while trying to know if device is able to add to wallet
|
||||
* });
|
||||
*
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* // Simple call with the configuration data needed to instantiate a new PKAddPaymentPassViewController object.
|
||||
* // The encryption scheme, cardholder name, and primary account suffix are required for configuration.
|
||||
* // The configuration information is used for setup and display only. It should not contain any sensitive information.
|
||||
*
|
||||
* let data: cardData = {
|
||||
* cardholderName: 'Test User',
|
||||
* primaryAccountNumberSuffix: '1234',
|
||||
* localizedDescription: 'Description of payment card',
|
||||
* paymentNetwork: 'VISA'
|
||||
* }
|
||||
*
|
||||
* this.appleWallet.startAddPaymentPass(data: cardData)
|
||||
* .then((res) => {
|
||||
* // User proceed and successfully asked to add card to his wallet
|
||||
* // Use the callback response JSON payload to complete addition process
|
||||
* })
|
||||
* .catch((err) => {
|
||||
* // Error or user cancelled.
|
||||
* });
|
||||
*
|
||||
* // You should expect the callback success response to be as follow
|
||||
*
|
||||
* // {
|
||||
* // data: {
|
||||
* // "certificateSubCA": "Base64 string represents certificateSubCA",
|
||||
* // "certificateLeaf":" Base64 string represents certificateLeaf"
|
||||
* // "nonce": "Base64 string represents nonce",
|
||||
* // "nonceSignature": "Base64 string represents nonceSignature",
|
||||
* // }
|
||||
* // }
|
||||
*
|
||||
* // This method provides the data needed to create an add payment request.
|
||||
* // Pass the certificate chain to the issuer server. The server returns an encrypted JSON file containing the card data.
|
||||
* // After you receive the encrypted data, pass it to completeAddPaymentPass method
|
||||
*
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* let data: encryptedCardData = {
|
||||
* activationData: 'encoded Base64 activationData from your server',
|
||||
* encryptedPassData: 'encoded Base64 encryptedPassData from your server',
|
||||
* wrappedKey: 'encoded Base64 wrappedKey from your server',
|
||||
* }
|
||||
*
|
||||
* this.appleWallet.encryptedCardData(data: encryptedCardData)
|
||||
* .then((res) => {
|
||||
* // callback success response means card has been added successfully,
|
||||
* // PKAddPaymentPassViewController will be dismissed
|
||||
* })
|
||||
* .catch((err) => {
|
||||
* // Error and can not add the card, or something wrong happend
|
||||
* // PKAddPaymentPassViewController will be dismissed
|
||||
* });
|
||||
*
|
||||
* ```
|
||||
* @Interfaces
|
||||
* EncryptedCardData
|
||||
* CardData
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'AppleWallet',
|
||||
plugin: 'cordova-apple-wallet',
|
||||
pluginRef: 'AppleWallet',
|
||||
repo: 'https://github.com/tomavic/cordova-apple-wallet',
|
||||
platforms: ['iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class AppleWallet extends IonicNativePlugin {
|
||||
/**
|
||||
* Detects if the current device supports Apple Wallet
|
||||
* @return {Promise<boolean>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
available(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple call with the configuration data needed to instantiate a new PKAddPaymentPassViewController object.
|
||||
* @param {cardData} data
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
startAddPaymentPass(data: CardData): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple call contains the card data needed to add a card to Apple Pay.
|
||||
* @param {encryptedCardData} data
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
completeAddPaymentPass(data: EncryptedCardData): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,188 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface AppsflyerOptions {
|
||||
/**
|
||||
* Appsflyer Dev key
|
||||
*/
|
||||
devKey: string;
|
||||
|
||||
/**
|
||||
* Apple Application ID(for iOS only)
|
||||
*/
|
||||
appId?: string;
|
||||
|
||||
/**
|
||||
* debug mode
|
||||
*/
|
||||
isDebug?: boolean;
|
||||
|
||||
/**
|
||||
* optout of collection of IMEI
|
||||
*/
|
||||
collectIMEI?: boolean;
|
||||
|
||||
/**
|
||||
* optout of collection of collectAndroidID
|
||||
*/
|
||||
collectAndroidID?: boolean;
|
||||
|
||||
/**
|
||||
* default false Accessing AppsFlyer Attribution / Conversion Data from the SDK (Deferred Deeplinking). Read more: Android, iOS. AppsFlyer plugin will return attribution data in onSuccess callback.
|
||||
*/
|
||||
onInstallConversionDataListener?: boolean;
|
||||
}
|
||||
|
||||
export interface AppsflyerEvent {
|
||||
[x: string]: any;
|
||||
}
|
||||
|
||||
export interface AppsflyerInviteOptions {
|
||||
channel?: string;
|
||||
campaign?: string;
|
||||
userParams?: {
|
||||
[x: string]: any;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Appsflyer
|
||||
* @description
|
||||
* Appsflyer Cordova SDK support for Attribution
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Appsflyer } from '@ionic-native/appsflyer';
|
||||
*
|
||||
*
|
||||
* constructor(private appsflyer: Appsflyer) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.appsflyer.initSdk(options);
|
||||
*
|
||||
* ```
|
||||
*
|
||||
* @interfaces
|
||||
* AppsflyerOptions
|
||||
* AppsflyerEvent
|
||||
* AppsflyerInviteOptions
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Appsflyer',
|
||||
plugin: 'cordova-plugin-appsflyer-sdk',
|
||||
pluginRef: 'window.plugins.appsFlyer',
|
||||
repo: 'https://github.com/AppsFlyerSDK/cordova-plugin-appsflyer-sdk',
|
||||
platforms: ['iOS', 'Android'],
|
||||
install: 'Add to config.xml like stated on github and then start'
|
||||
})
|
||||
@Injectable()
|
||||
export class Appsflyer extends IonicNativePlugin {
|
||||
/**
|
||||
* initialize the SDK
|
||||
* @param {AppsflyerOptions} options
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
initSdk(options: AppsflyerOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* These in-app events help you track how loyal users discover your app, and attribute them to specific campaigns/media-sources. Please take the time define the event/s you want to measure to allow you to track ROI (Return on Investment) and LTV (Lifetime Value).
|
||||
* @param {string} eventName custom event name, is presented in your dashboard
|
||||
* @param {AppsflyerEvent} eventValues event details
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
trackEvent(eventName: string, eventValues: AppsflyerEvent): void {}
|
||||
|
||||
/**
|
||||
* Setting your own Custom ID enables you to cross-reference your own unique ID with AppsFlyer’s user ID and the other devices’ IDs. This ID is available in AppsFlyer CSV reports along with postbacks APIs for cross-referencing with you internal IDs.
|
||||
* @param {string} customerUserId user id
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setAppUserId(customerUserId: string): void {}
|
||||
|
||||
/**
|
||||
* Setting your own Custom ID enables you to cross-reference your own unique ID with AppsFlyer’s user ID and the other devices’ IDs. This ID is available in AppsFlyer CSV reports along with postbacks APIs for cross-referencing with you internal IDs.
|
||||
* @param {boolean} customerUserId In some extreme cases you might want to shut down all SDK tracking due to legal and privacy compliance. This can be achieved with the isStopTracking API. Once this API is invoked, our SDK will no longer communicate with our servers and stop functioning.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
stopTracking(isStopTracking: boolean): void {}
|
||||
|
||||
/**
|
||||
* Get the data from Attribution
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerOnAppOpenAttribution(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables app uninstall tracking
|
||||
* @param {string} token GCM/FCM ProjectNumber
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
enableUninstallTracking(token: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows to pass GCM/FCM Tokens that where collected by third party plugins to the AppsFlyer server. Can be used for Uninstall Tracking.
|
||||
* @param {string} token GCM/FCM ProjectNumber
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
updateServerUninstallToken(token: string): void {}
|
||||
|
||||
/**
|
||||
* Get AppsFlyer’s proprietary Device ID. The AppsFlyer Device ID is the main ID used by AppsFlyer in Reports and APIs.
|
||||
*/
|
||||
@Cordova()
|
||||
getAppsFlyerUID(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* End User Opt-Out (Optional) AppsFlyer provides you a method to opt‐out specific users from AppsFlyer analytics. This method complies with the latest privacy requirements and complies with Facebook data and privacy policies. Default is FALSE, meaning tracking is enabled by default.
|
||||
* @param {boolean} disable Set to true to opt-out user from tracking
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
deviceTrackingDisabled(disable: boolean): void {}
|
||||
|
||||
/**
|
||||
* Set AppsFlyer’s OneLink ID. Setting a valid OneLink ID will result in shortened User Invite links, when one is generated. The OneLink ID can be obtained on the AppsFlyer Dashboard.
|
||||
* @param {string} oneLinkId OneLink ID
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setAppInviteOneLinkID(oneLinkId: string): void {}
|
||||
|
||||
/**
|
||||
* Allowing your existing users to invite their friends and contacts as new users to your app can be a key growth factor for your app. AppsFlyer allows you to track and attribute new installs originating from user invites within your app.
|
||||
* @param {AppsflyerInviteOptions} options Parameters for Invite link
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
generateInviteLink(options: AppsflyerInviteOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this call to track an impression use the following API call. Make sure to use the promoted App ID as it appears within the AppsFlyer dashboard.
|
||||
* @param {string} appId Promoted Application ID
|
||||
* @param {string} campaign Promoted Campaign
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
trackCrossPromotionImpression(appId: string, campaign: string): void {}
|
||||
|
||||
/**
|
||||
* Use this call to track the click and launch the app store's app page (via Browser)
|
||||
* @param {string} appId Promoted Application ID
|
||||
* @param {string} campaign Promoted Campaign
|
||||
* @param {Object} options Additional Parameters to track
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
trackAndOpenStore(appId: string, campaign: string, options: Object): void {}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Autostart
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
export interface BackgroundFetchConfig {
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export interface BackgroundGeolocationResponse {
|
||||
|
||||
/**
|
||||
* ID of location as stored in DB (or null)
|
||||
*/
|
||||
@@ -50,8 +49,8 @@ export interface BackgroundGeolocationResponse {
|
||||
altitude: number;
|
||||
|
||||
/**
|
||||
* accuracy of the altitude if available.
|
||||
*/
|
||||
* accuracy of the altitude if available.
|
||||
*/
|
||||
altitudeAccuracy: number;
|
||||
|
||||
/**
|
||||
@@ -71,7 +70,6 @@ export interface BackgroundGeolocationResponse {
|
||||
}
|
||||
|
||||
export interface BackgroundGeolocationConfig {
|
||||
|
||||
/**
|
||||
* Desired accuracy in meters. Possible values [0, 10, 100, 1000]. The lower
|
||||
* the number, the more power devoted to GeoLocation resulting in higher
|
||||
@@ -108,19 +106,19 @@ export interface BackgroundGeolocationConfig {
|
||||
*/
|
||||
stopOnTerminate?: boolean;
|
||||
|
||||
/**
|
||||
* ANDROID ONLY
|
||||
* Start background service on device boot.
|
||||
/**
|
||||
* ANDROID ONLY
|
||||
* Start background service on device boot.
|
||||
*
|
||||
* Defaults to false
|
||||
* Defaults to false
|
||||
*/
|
||||
startOnBoot?: boolean;
|
||||
|
||||
/**
|
||||
* ANDROID ONLY
|
||||
/**
|
||||
* ANDROID ONLY
|
||||
* If false location service will not be started in foreground and no notification will be shown.
|
||||
*
|
||||
* Defaults to true
|
||||
* Defaults to true
|
||||
*/
|
||||
startForeground?: boolean;
|
||||
|
||||
@@ -155,17 +153,17 @@ export interface BackgroundGeolocationConfig {
|
||||
*/
|
||||
notificationIconColor?: string;
|
||||
|
||||
/**
|
||||
* ANDROID ONLY
|
||||
* The filename of a custom notification icon. See android quirks.
|
||||
* NOTE: Only available for API Level >=21.
|
||||
/**
|
||||
* ANDROID ONLY
|
||||
* The filename of a custom notification icon. See android quirks.
|
||||
* NOTE: Only available for API Level >=21.
|
||||
*/
|
||||
notificationIconLarge?: string;
|
||||
|
||||
/**
|
||||
* ANDROID ONLY
|
||||
* The filename of a custom notification icon. See android quirks.
|
||||
* NOTE: Only available for API Level >=21.
|
||||
/**
|
||||
* ANDROID ONLY
|
||||
* The filename of a custom notification icon. See android quirks.
|
||||
* NOTE: Only available for API Level >=21.
|
||||
*/
|
||||
notificationIconSmall?: string;
|
||||
|
||||
@@ -183,50 +181,50 @@ export interface BackgroundGeolocationConfig {
|
||||
*/
|
||||
activityType?: string;
|
||||
|
||||
/**
|
||||
* IOS ONLY
|
||||
* Pauses location updates when app is paused
|
||||
/**
|
||||
* IOS ONLY
|
||||
* Pauses location updates when app is paused
|
||||
*
|
||||
* Defaults to true
|
||||
* Defaults to true
|
||||
*/
|
||||
pauseLocationUpdates?: boolean;
|
||||
|
||||
/**
|
||||
* Server url where to send HTTP POST with recorded locations
|
||||
* @see https://github.com/mauron85/cordova-plugin-background-geolocation#http-locations-posting
|
||||
/**
|
||||
* Server url where to send HTTP POST with recorded locations
|
||||
* @see https://github.com/mauron85/cordova-plugin-background-geolocation#http-locations-posting
|
||||
*/
|
||||
url?: string;
|
||||
|
||||
/**
|
||||
* Server url where to send fail to post locations
|
||||
* @see https://github.com/mauron85/cordova-plugin-background-geolocation#http-locations-posting
|
||||
/**
|
||||
* Server url where to send fail to post locations
|
||||
* @see https://github.com/mauron85/cordova-plugin-background-geolocation#http-locations-posting
|
||||
*/
|
||||
syncUrl?: string;
|
||||
|
||||
/**
|
||||
* Specifies how many previously failed locations will be sent to server at once
|
||||
* Specifies how many previously failed locations will be sent to server at once
|
||||
*
|
||||
* Defaults to 100
|
||||
* Defaults to 100
|
||||
*/
|
||||
syncThreshold?: number;
|
||||
|
||||
/**
|
||||
* Optional HTTP headers sent along in HTTP request
|
||||
/**
|
||||
* Optional HTTP headers sent along in HTTP request
|
||||
*/
|
||||
httpHeaders?: any;
|
||||
|
||||
/**
|
||||
* IOS ONLY
|
||||
* IOS ONLY
|
||||
* Switch to less accurate significant changes and region monitory when in background (default)
|
||||
*
|
||||
* Defaults to 100
|
||||
* Defaults to 100
|
||||
*/
|
||||
saveBatteryOnBackground?: boolean;
|
||||
|
||||
/**
|
||||
* Limit maximum number of locations stored into db
|
||||
/**
|
||||
* Limit maximum number of locations stored into db
|
||||
*
|
||||
* Defaults to 10000
|
||||
* Defaults to 10000
|
||||
*/
|
||||
maxLocations?: number;
|
||||
|
||||
@@ -310,15 +308,14 @@ export interface BackgroundGeolocationConfig {
|
||||
})
|
||||
@Injectable()
|
||||
export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Set location service provider @see https://github.com/mauron85/cordova-plugin-background-geolocation/wiki/Android-providers
|
||||
/**
|
||||
* Set location service provider @see https://github.com/mauron85/cordova-plugin-background-geolocation/wiki/Android-providers
|
||||
*
|
||||
* Possible values:
|
||||
* ANDROID_DISTANCE_FILTER_PROVIDER: 0,
|
||||
* ANDROID_ACTIVITY_PROVIDER: 1
|
||||
* ANDROID_DISTANCE_FILTER_PROVIDER: 0,
|
||||
* ANDROID_ACTIVITY_PROVIDER: 1
|
||||
*
|
||||
* @enum {number}
|
||||
* @enum {number}
|
||||
*/
|
||||
LocationProvider: any = {
|
||||
ANDROID_DISTANCE_FILTER_PROVIDER: 0,
|
||||
@@ -326,17 +323,17 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
};
|
||||
|
||||
/**
|
||||
* Desired accuracy in meters. Possible values [0, 10, 100, 1000].
|
||||
* The lower the number, the more power devoted to GeoLocation resulting in higher accuracy readings.
|
||||
* 1000 results in lowest power drain and least accurate readings.
|
||||
* Desired accuracy in meters. Possible values [0, 10, 100, 1000].
|
||||
* The lower the number, the more power devoted to GeoLocation resulting in higher accuracy readings.
|
||||
* 1000 results in lowest power drain and least accurate readings.
|
||||
*
|
||||
* Possible values:
|
||||
* HIGH: 0
|
||||
* MEDIUM: 10
|
||||
* LOW: 100
|
||||
* HIGH: 0
|
||||
* MEDIUM: 10
|
||||
* LOW: 100
|
||||
* PASSIVE: 1000
|
||||
*
|
||||
* enum {number}
|
||||
* enum {number}
|
||||
*/
|
||||
Accuracy: any = {
|
||||
HIGH: 0,
|
||||
@@ -345,14 +342,14 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
PASSIVE: 1000
|
||||
};
|
||||
|
||||
/**
|
||||
* Used in the switchMode function
|
||||
/**
|
||||
* Used in the switchMode function
|
||||
*
|
||||
* Possible values:
|
||||
* BACKGROUND: 0
|
||||
* FOREGROUND: 1
|
||||
* FOREGROUND: 1
|
||||
*
|
||||
* @enum {number}
|
||||
* @enum {number}
|
||||
*/
|
||||
Mode: any = {
|
||||
BACKGROUND: 0,
|
||||
@@ -369,7 +366,11 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
callbackOrder: 'reverse',
|
||||
observable: true
|
||||
})
|
||||
configure(options: BackgroundGeolocationConfig): Observable<BackgroundGeolocationResponse> { return; }
|
||||
configure(
|
||||
options: BackgroundGeolocationConfig
|
||||
): Observable<BackgroundGeolocationResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turn ON the background-geolocation system.
|
||||
@@ -377,14 +378,18 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
start(): Promise<any> { return; }
|
||||
start(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turn OFF background-tracking
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
stop(): Promise<any> { return; }
|
||||
stop(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inform the native plugin that you're finished, the background-task may be completed
|
||||
@@ -393,7 +398,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
platforms: ['iOS']
|
||||
})
|
||||
finish(): Promise<any> { return; }
|
||||
finish(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Force the plugin to enter "moving" or "stationary" state
|
||||
@@ -403,7 +410,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
platforms: ['iOS']
|
||||
})
|
||||
changePace(isMoving: boolean): Promise<any> { return; }
|
||||
changePace(isMoving: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup configuration
|
||||
@@ -413,7 +422,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
setConfig(options: BackgroundGeolocationConfig): Promise<any> { return; }
|
||||
setConfig(options: BackgroundGeolocationConfig): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns current stationaryLocation if available. null if not
|
||||
@@ -422,7 +433,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
platforms: ['iOS']
|
||||
})
|
||||
getStationaryLocation(): Promise<BackgroundGeolocationResponse> { return; }
|
||||
getStationaryLocation(): Promise<BackgroundGeolocationResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a stationary-region listener. Whenever the devices enters "stationary-mode",
|
||||
@@ -432,7 +445,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
platforms: ['iOS']
|
||||
})
|
||||
onStationary(): Promise<any> { return; }
|
||||
onStationary(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if location is enabled on the device
|
||||
@@ -441,19 +456,21 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
platforms: ['Android']
|
||||
})
|
||||
isLocationEnabled(): Promise<number> { return; }
|
||||
isLocationEnabled(): Promise<number> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display app settings to change permissions
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
showAppSettings(): void { }
|
||||
showAppSettings(): void {}
|
||||
|
||||
/**
|
||||
* Display device location settings
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
showLocationSettings(): void { }
|
||||
showLocationSettings(): void {}
|
||||
|
||||
/**
|
||||
* Method can be used to detect user changes in location services settings.
|
||||
@@ -465,7 +482,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
platforms: ['Android'],
|
||||
observable: true
|
||||
})
|
||||
watchLocationMode(): Observable<number> { return; }
|
||||
watchLocationMode(): Observable<number> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop watching for location mode changes.
|
||||
@@ -474,7 +493,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
platforms: ['Android']
|
||||
})
|
||||
stopWatchingLocationMode(): Promise<any> { return; }
|
||||
stopWatchingLocationMode(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method will return all stored locations.
|
||||
@@ -488,14 +509,18 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
platforms: ['Android']
|
||||
})
|
||||
getLocations(): Promise<any> { return; }
|
||||
getLocations(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method will return locations, which has not been yet posted to server. NOTE: Locations does contain locationId.
|
||||
/**
|
||||
* Method will return locations, which has not been yet posted to server. NOTE: Locations does contain locationId.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getValidLocations(): Promise<any> { return; }
|
||||
getValidLocations(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete stored location by given locationId.
|
||||
@@ -505,7 +530,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
platforms: ['Android']
|
||||
})
|
||||
deleteLocation(locationId: number): Promise<any> { return; }
|
||||
deleteLocation(locationId: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete all stored locations.
|
||||
@@ -514,34 +541,39 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
platforms: ['Android']
|
||||
})
|
||||
deleteAllLocations(): Promise<any> { return; }
|
||||
deleteAllLocations(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Normally plugin will handle switching between BACKGROUND and FOREGROUND mode itself.
|
||||
* Calling switchMode you can override plugin behavior and force plugin to switch into other mode.
|
||||
*
|
||||
* In FOREGROUND mode plugin uses iOS local manager to receive locations and behavior is affected by option.desiredAccuracy and option.distanceFilter.
|
||||
* In BACKGROUND mode plugin uses significant changes and region monitoring to receive locations and uses option.stationaryRadius only.
|
||||
* In BACKGROUND mode plugin uses significant changes and region monitoring to receive locations and uses option.stationaryRadius only.
|
||||
*
|
||||
* BackgroundGeolocation.Mode.FOREGROUND
|
||||
* BackgroundGeolocation.Mode.BACKGROUND
|
||||
**
|
||||
* BackgroundGeolocation.Mode.BACKGROUND
|
||||
*
|
||||
* @param modeId {number}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
platforms: ['iOS']
|
||||
})
|
||||
switchMode(modeId: number): Promise<any> { return; }
|
||||
switchMode(modeId: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all logged events. Useful for plugin debugging. Parameter limit limits number of returned entries.
|
||||
* @see https://github.com/mauron85/cordova-plugin-background-geolocation/tree/v2.2.1#debugging for more information.
|
||||
/**
|
||||
* Return all logged events. Useful for plugin debugging. Parameter limit limits number of returned entries.
|
||||
* @see https://github.com/mauron85/cordova-plugin-background-geolocation/tree/v2.2.1#debugging for more information.
|
||||
*
|
||||
* @param limit {number} Limits the number of entries
|
||||
* @param limit {number} Limits the number of entries
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getLogEntries(limit: number): Promise<any> { return; }
|
||||
|
||||
getLogEntries(limit: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ export interface BackgroundModeConfiguration {
|
||||
* @description
|
||||
* Cordova plugin to prevent the app from going to sleep while in background.
|
||||
* Requires Cordova plugin: cordova-plugin-background-mode. For more info about plugin, visit: https://github.com/katzer/cordova-plugin-background-mode
|
||||
*@usage
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { BackgroundMode } from '@ionic-native/background-mode';
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Badge
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
|
||||
@@ -589,7 +589,6 @@ export class BLE extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves a list of the peripherals (containing any of the specified services)
|
||||
* currently connected to the system. The peripheral list is sent to the success callback.
|
||||
@@ -599,7 +598,7 @@ export class BLE extends IonicNativePlugin {
|
||||
* @returns {Promise<any>} Returns a promise with a list of peripheral objects
|
||||
*/
|
||||
@Cordova()
|
||||
connectedPeripheralsWithServices (services: string[]): Promise<any[]> {
|
||||
connectedPeripheralsWithServices(services: string[]): Promise<any[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -611,7 +610,7 @@ export class BLE extends IonicNativePlugin {
|
||||
* @returns {Promise<any>} Returns a promise with a list of peripheral objects
|
||||
*/
|
||||
@Cordova()
|
||||
peripheralsWithIdentifiers (uuids: string[]): Promise<any[]> {
|
||||
peripheralsWithIdentifiers(uuids: string[]): Promise<any[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -622,7 +621,7 @@ export class BLE extends IonicNativePlugin {
|
||||
* @returns {Promise<any>} Returns a promise with a list of peripheral objects
|
||||
*/
|
||||
@Cordova()
|
||||
bondedDevices (): Promise<any[]> {
|
||||
bondedDevices(): Promise<any[]> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import {
|
||||
Cordova,
|
||||
CordovaProperty,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
} from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
/* Available status of device */
|
||||
@@ -67,7 +72,7 @@ export interface InitParams extends InitPeripheralParams {
|
||||
export interface ScanParams {
|
||||
/* An array of service IDs to filter the scan or empty array / null. This parameter is not supported on Windows platform yet */
|
||||
services?: string[];
|
||||
/** True/false to allow duplicate advertisement packets, defaults to false (iOS)*/
|
||||
/* True/false to allow duplicate advertisement packets, defaults to false (iOS)*/
|
||||
allowDuplicates?: boolean;
|
||||
/** Defaults to Low Power. Available from API21 / API 23 (Android) */
|
||||
scanMode?: BluetoothScanMode;
|
||||
@@ -181,7 +186,7 @@ export interface MTU extends DeviceInfo {
|
||||
}
|
||||
|
||||
export interface BondedStatus extends CommonInfo {
|
||||
/** Bonded status*/
|
||||
/* Bonded status*/
|
||||
isBonded: boolean;
|
||||
}
|
||||
|
||||
@@ -322,7 +327,7 @@ export interface DescriptorResult extends OperationResult {
|
||||
export interface Characteristics extends DeviceInfo {
|
||||
/** Service's id */
|
||||
service: string;
|
||||
/** Array of characteristic objects*/
|
||||
/* Array of characteristic objects*/
|
||||
characteristics: Characteristic[];
|
||||
}
|
||||
|
||||
@@ -374,6 +379,15 @@ export interface Error {
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface AdapterInfo {
|
||||
name: string;
|
||||
address: string;
|
||||
isInitialized: boolean;
|
||||
isEnabled: boolean;
|
||||
isScanning: boolean;
|
||||
isDiscoverable: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name BluetoothLE
|
||||
* @description
|
||||
@@ -415,7 +429,7 @@ export interface Error {
|
||||
export class BluetoothLE extends IonicNativePlugin {
|
||||
/**
|
||||
* @name initialize
|
||||
* @description Initialize Bluetooth on the device
|
||||
* Initialize Bluetooth on the device
|
||||
* @param {InitParams} [params]
|
||||
* @returns {(Promise<{ status: 'enabled' | 'disabled'}>)} The callback that is passed initialize status (enabled/disabled)
|
||||
*/
|
||||
@@ -426,7 +440,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name enable (Android)
|
||||
* @description Enable Bluetooth on the device. Android support only
|
||||
* Enable Bluetooth on the device. Android support only
|
||||
* @returns {Promise<{ status: boolean }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse', sync: true })
|
||||
@@ -436,7 +450,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name disable (Android)
|
||||
* @description Disable Bluetooth on the device. Android support only
|
||||
* Disable Bluetooth on the device. Android support only
|
||||
* @returns void
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse', sync: true })
|
||||
@@ -446,30 +460,26 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name getAdapterInfo (Android)
|
||||
* @description @todo
|
||||
* @returns {Promise<{ name: string, address: string, isInitialized: boolean, isEnabled: boolean, isScanning: boolean, isDiscoverable: boolean}>}
|
||||
* Retrieve useful information such as the address, name, and various states (initialized, enabled, scanning, discoverable).
|
||||
* This can be very useful when the general state of the adapter has been lost, and we would otherwise need to go through a series of callbacks to get the correct state (first initialized, then enabled, then isScanning, and so forth).
|
||||
* The result of this method allows us to take business logic decisions while avoiding a large part of the callback hell.
|
||||
* Currently the discoverable state does not have any relevance because there is no "setDiscoverable" functionality in place. That may change in the future.
|
||||
* @returns {Promise<AdapterInfo>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
getAdapterInfo(): Promise<{
|
||||
name: string;
|
||||
address: string;
|
||||
isInitialized: boolean;
|
||||
isEnabled: boolean;
|
||||
isScanning: boolean;
|
||||
isDiscoverable: boolean;
|
||||
}> {
|
||||
@Cordova({ callbackOrder: 'reverse', observable: true })
|
||||
getAdapterInfo(): Promise<AdapterInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name startScan
|
||||
* @description Scan for Bluetooth LE devices.
|
||||
* Scan for Bluetooth LE devices.
|
||||
* Since scanning is expensive, stop as soon as possible. The Cordova app should use a timer to limit the scan interval.
|
||||
* Android API >= 23 requires ACCESS_COARSE_LOCATION permissions to find unpaired devices.
|
||||
* Permissions can be requested by using the hasPermission and requestPermission functions.
|
||||
* Android API >= 23 also requires location services to be enabled. Use isLocationEnabled to determine whether location services are enabled.
|
||||
* If not enabled, use requestLocation to prompt the location services settings page.
|
||||
* @param params Scan params
|
||||
* @param {ScanParams} params Scan params
|
||||
* @returns {(Observable<{ status: ScanStatus }>)}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse', observable: true })
|
||||
@@ -479,7 +489,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name stopScan
|
||||
* @description Stop scan for Bluetooth LE devices. Since scanning is expensive, stop as soon as possible
|
||||
* Stop scan for Bluetooth LE devices. Since scanning is expensive, stop as soon as possible
|
||||
* The app should use a timer to limit the scanning time.
|
||||
* @returns {Promise<{status: 'scanStopped'}>}
|
||||
*/
|
||||
@@ -490,7 +500,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name retrieveConnected
|
||||
* @description Retrieved paired Bluetooth LE devices. In iOS, devices that are "paired" to will not return during a normal scan.
|
||||
* Retrieved paired Bluetooth LE devices. In iOS, devices that are "paired" to will not return during a normal scan.
|
||||
* Callback is "instant" compared to a scan.
|
||||
* @param {{ services: string[] }} An array of service IDs to filter the retrieval by. If no service IDs are specified, no devices will be returned.
|
||||
* @returns {Promise<{ devices: DeviceInfo[] }>}
|
||||
@@ -504,7 +514,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name bond (Android)
|
||||
* @description Bond with a device.
|
||||
* Bond with a device.
|
||||
* The device doesn't need to be connected to initiate bonding. Android support only.
|
||||
* @param {{ address: string }} params The address/identifier provided by the scan's return object
|
||||
* @returns {(Observable<{ status: DeviceInfo }>)}
|
||||
@@ -522,7 +532,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name unbond (Android)
|
||||
* @description Unbond with a device. The device doesn't need to be connected to initiate bonding. Android support only.
|
||||
* Unbond with a device. The device doesn't need to be connected to initiate bonding. Android support only.
|
||||
* @param {{address: string}} params The address/identifier
|
||||
* @returns {Promise<{ status: DeviceInfo }>}
|
||||
* success: The success callback should always return with status == unbonded, that is passed with device object
|
||||
@@ -535,7 +545,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name connect
|
||||
* @description Connect to a Bluetooth LE device
|
||||
* Connect to a Bluetooth LE device
|
||||
* @param connectSuccess The success callback that is passed with device object
|
||||
* @param connectError The callback that will be triggered when the connect operation fails
|
||||
* @param params The address/identifier
|
||||
@@ -555,7 +565,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name reconnect
|
||||
* @description Reconnect to a previously connected Bluetooth device
|
||||
* Reconnect to a previously connected Bluetooth device
|
||||
* @param {{address: string}} params The address/identifier
|
||||
* @returns {(Observable<{ status: DeviceInfo }>)}
|
||||
*/
|
||||
@@ -566,7 +576,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name disconnect
|
||||
* @description Disconnect from a Bluetooth LE device.
|
||||
* Disconnect from a Bluetooth LE device.
|
||||
* Note: It's simpler to just call close(). Starting with iOS 10, disconnecting before closing seems required!
|
||||
* @param {{address: string}} params The address/identifier
|
||||
* @returns {Promise<{ status: DeviceInfo }>}
|
||||
@@ -578,7 +588,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name close
|
||||
* @description Close/dispose a Bluetooth LE device.
|
||||
* Close/dispose a Bluetooth LE device.
|
||||
* Prior to 2.7.0, you needed to disconnect to the device before closing, but this is no longer the case.
|
||||
* Starting with iOS 10, disconnecting before closing seems required!
|
||||
* @param {{ address: string }} params The address/identifier
|
||||
@@ -591,7 +601,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name discover
|
||||
* @description Discover all the devices services, characteristics and descriptors.
|
||||
* Discover all the devices services, characteristics and descriptors.
|
||||
* Doesn't need to be called again after disconnecting and then reconnecting.
|
||||
* If using iOS, you shouldn't use discover and services/characteristics/descriptors on the same device.
|
||||
* There seems to be an issue with calling discover on iOS8 devices, so use with caution.
|
||||
@@ -613,7 +623,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name services (iOS)
|
||||
* @description Discover the device's services.
|
||||
* Discover the device's services.
|
||||
* Not providing an array of services will return all services and take longer to discover. iOS support only.
|
||||
* @param {{address: string, services: string[]}} params
|
||||
* @returns {Promise<{ services: Services }>}
|
||||
@@ -628,7 +638,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name characteristics (iOS)
|
||||
* @description Discover the service's characteristics.
|
||||
* Discover the service's characteristics.
|
||||
* Not providing an array of characteristics will return all characteristics and take longer to discover. iOS support only.
|
||||
* @param {CharacteristicParams} params Characteristic params
|
||||
* @returns {Promise<{ characteristics: Characteristics }>} The service id and an Array of characteristics
|
||||
@@ -642,7 +652,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name descriptors (iOS)
|
||||
* @description Discover the characteristic's descriptors. iOS support only.
|
||||
* Discover the characteristic's descriptors. iOS support only.
|
||||
* @param {DescriptorParams} params
|
||||
* @returns {Promise<{ descriptors: Descriptors }>}
|
||||
*/
|
||||
@@ -653,31 +663,31 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name read
|
||||
* @description Read a particular service's characteristic once
|
||||
* Read a particular service's characteristic once
|
||||
* @param {DescriptorParams} params
|
||||
* @returns {Promise<OperationResult>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
read(params: DescriptorParams): Promise<OperationResult> {
|
||||
read(params: DescriptorParams): Promise<{ result: OperationResult }> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name subscribe
|
||||
* @description Subscribe to a particular service's characteristic.
|
||||
* Subscribe to a particular service's characteristic.
|
||||
* Once a subscription is no longer needed, execute unsubscribe in a similar fashion.
|
||||
* The Client Configuration descriptor will automatically be written to enable notification/indication based on the characteristic's properties.
|
||||
* @param {DescriptorParams} params
|
||||
* @returns {Promise<OperationResult>}
|
||||
* @returns {(Observable<{ result: OperationResult }>)}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse', observable: true })
|
||||
subscribe(params: DescriptorParams): Observable<OperationResult> {
|
||||
subscribe(params: DescriptorParams): Observable<{ result: OperationResult }> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name unsubscribe
|
||||
* @description Unsubscribe to a particular service's characteristic.
|
||||
* Unsubscribe to a particular service's characteristic.
|
||||
* @param {DescriptorParams} params
|
||||
* @returns {Promise<UnsubscribeResult>}
|
||||
*/
|
||||
@@ -688,7 +698,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name write (limitation on iOS, read below)
|
||||
* @description Write a particular service's characteristic
|
||||
* Write a particular service's characteristic
|
||||
* Note: no callback will occur on write without response on iOS.
|
||||
* @param {WriteCharacteristicParams} params
|
||||
* @returns {Promise<OperationResult>}
|
||||
@@ -700,7 +710,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name write (limitation on iOS, read below)
|
||||
* @description Write Quick / Queue, use this method to quickly execute write without response commands when writing more than 20 bytes at a time.
|
||||
* Write Quick / Queue, use this method to quickly execute write without response commands when writing more than 20 bytes at a time.
|
||||
* Note: no callback will occur on write without response on iOS.
|
||||
* @param {WriteCharacteristicParams} params
|
||||
* @returns {Promise<OperationResult>}
|
||||
@@ -712,7 +722,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name readDescriptor
|
||||
* @description Read a particular characterist's descriptor
|
||||
* Read a particular characterist's descriptor
|
||||
* @param {OperationDescriptorParams} params
|
||||
* @returns {Promise<DescriptorResult>}
|
||||
*/
|
||||
@@ -723,7 +733,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name writeDescriptor
|
||||
* @description Write a particular characteristic's descriptor. Unable to write characteristic configuration directly to keep in line with iOS implementation.
|
||||
* Write a particular characteristic's descriptor. Unable to write characteristic configuration directly to keep in line with iOS implementation.
|
||||
* Instead use subscribe/unsubscribe, which will automatically enable/disable notification.
|
||||
* @param {WriteDescriptorParams} params
|
||||
* @returns {Promise<DescriptorResult>}
|
||||
@@ -735,7 +745,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name rssi
|
||||
* @description Read RSSI of a connected device. RSSI is also returned with scanning.
|
||||
* Read RSSI of a connected device. RSSI is also returned with scanning.
|
||||
* @param {{ address: string }} params
|
||||
* @returns {Promise<{ rssi: RSSI }>}
|
||||
*/
|
||||
@@ -746,7 +756,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name mtu (Android, Android 5+)
|
||||
* @description Set MTU of a connected device. Android only.
|
||||
* Set MTU of a connected device. Android only.
|
||||
* @param {{ address: string, mtu: number }} params
|
||||
* @returns {Promise<{ mtu: MTU }>}
|
||||
*/
|
||||
@@ -757,7 +767,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name requestConnectionPriority (Android, Android 5+)
|
||||
* @description Request a change in the connection priority to improve throughput when transfer large amounts of data via BLE.
|
||||
* Request a change in the connection priority to improve throughput when transfer large amounts of data via BLE.
|
||||
* Android support only. iOS will return error.
|
||||
* @param {{ address: string, connectionPriority: ConnectionPriority }} params
|
||||
* @returns {Promise<DeviceInfo>}
|
||||
@@ -772,7 +782,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name isInitialized
|
||||
* @description Determine whether the adapter is initialized. No error callback. Returns true or false
|
||||
* Determine whether the adapter is initialized. No error callback. Returns true or false
|
||||
* @returns {Promise<{ isInitialized: boolean }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
@@ -782,7 +792,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name isEnabled
|
||||
* @description Determine whether the adapter is enabled. No error callback
|
||||
* Determine whether the adapter is enabled. No error callback
|
||||
* @returns {Promise<{ isEnabled: boolean }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
@@ -792,7 +802,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name isScanning
|
||||
* @description Determine whether the adapter is scanning. No error callback. Returns true or false
|
||||
* Determine whether the adapter is scanning. No error callback. Returns true or false
|
||||
* @returns {Promise<{ isScanning: boolean }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
@@ -802,7 +812,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name isBonded (Android)
|
||||
* @description Determine whether the device is bonded or not, or error if not initialized. Android support only.
|
||||
* Determine whether the device is bonded or not, or error if not initialized. Android support only.
|
||||
* @param {{ address: string }} params
|
||||
* @returns {Promise<BondedStatus>}
|
||||
*/
|
||||
@@ -813,7 +823,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name wasConnected
|
||||
* @description Determine whether the device was connected, or error if not initialized.
|
||||
* Determine whether the device was connected, or error if not initialized.
|
||||
* @param {{ address: string }} params
|
||||
* @returns {Promise<PrevConnectionStatus>}
|
||||
*/
|
||||
@@ -824,7 +834,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name isConnected
|
||||
* @description Determine whether the device is connected, or error if not initialized or never connected to device
|
||||
* Determine whether the device is connected, or error if not initialized or never connected to device
|
||||
* @param {{ address: string }} params
|
||||
* @returns {Promise<CurrConnectionStatus>}
|
||||
*/
|
||||
@@ -835,7 +845,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name isDiscovered
|
||||
* @description Determine whether the device's characteristics and descriptors have been discovered, or error if not initialized or not connected to device.
|
||||
* Determine whether the device's characteristics and descriptors have been discovered, or error if not initialized or not connected to device.
|
||||
* @param {{ address: string }} params
|
||||
* @returns {Promise<DiscoverStatus>}
|
||||
*/
|
||||
@@ -846,7 +856,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name hasPermission (useful only for Android 6+ / API 23)
|
||||
* @description Determine whether coarse location privileges are granted since scanning for unpaired devices requires it in Android API 23
|
||||
* Determine whether coarse location privileges are granted since scanning for unpaired devices requires it in Android API 23
|
||||
* @returns {Promise<{ hasPermission: boolean }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
@@ -856,7 +866,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name requestPermission (useful only for Android 6+ / API 23)
|
||||
* @description Request coarse location privileges since scanning for unpaired devices requires it in Android API 23.
|
||||
* Request coarse location privileges since scanning for unpaired devices requires it in Android API 23.
|
||||
* Will return an error if called on iOS or Android versions prior to 6.0.
|
||||
* @returns {Promise<{ requestPermission: boolean }>}
|
||||
*/
|
||||
@@ -867,7 +877,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name isLocationEnabled (useful only for Android 6+ / API 23)
|
||||
* @description Determine if location services are enabled or not. Location Services are required to find devices in Android API 23
|
||||
* Determine if location services are enabled or not. Location Services are required to find devices in Android API 23
|
||||
* @returns {Promise<{ isLocationEnabled: boolean }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
@@ -877,7 +887,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name requestLocation (useful only for Android 6+ / API 23)
|
||||
* @description Prompt location services settings pages. requestLocation property returns whether location services are enabled or disabled.
|
||||
* Prompt location services settings pages. requestLocation property returns whether location services are enabled or disabled.
|
||||
* Location Services are required to find devices in Android API 23.
|
||||
* @returns {Promise<{ requestLocation: boolean }>}
|
||||
*/
|
||||
@@ -888,12 +898,12 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name initializePeripheral
|
||||
* @description Initialize Bluetooth on the device. Must be called before anything else.
|
||||
* Initialize Bluetooth on the device. Must be called before anything else.
|
||||
* Callback will continuously be used whenever Bluetooth is enabled or disabled.
|
||||
* @param {InitPeripheralParams} [params]
|
||||
* @returns {Observable<InitializeResult>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
@Cordova({ callbackOrder: 'reverse', observable: true })
|
||||
initializePeripheral(
|
||||
params?: InitPeripheralParams
|
||||
): Observable<InitializeResult> {
|
||||
@@ -902,7 +912,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name addService
|
||||
* @description Add a service with characteristics and descriptors. If more than one service is added, add them sequentially
|
||||
* Add a service with characteristics and descriptors. If more than one service is added, add them sequentially
|
||||
* @param {{ service: string, characteristics: Characteristic[] }} params
|
||||
* @returns {Promise<{ service: string, status: Status }>}
|
||||
*/
|
||||
@@ -916,7 +926,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name removeService
|
||||
* @description Remove a service
|
||||
* Remove a service
|
||||
* @param {{ service: string }} params
|
||||
* @returns {Promise<{ service: string, status: Status }>}
|
||||
*/
|
||||
@@ -929,7 +939,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name removeAllServices
|
||||
* @description Remove all services
|
||||
* Remove all services
|
||||
* @returns {Promise<{ status: Status }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
@@ -939,7 +949,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name startAdvertising (different behavior on Android/iOS, read below)
|
||||
* @description Start advertising as a BLE device.
|
||||
* Start advertising as a BLE device.
|
||||
* Note: This needs to be improved so services can be used for both Android and iOS.
|
||||
* On iOS, the advertising devices likes to rename itself back to the name of the device, i.e. Rand' iPhone
|
||||
* @param {AdvertisingParams} params
|
||||
@@ -952,7 +962,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name stopAdvertising
|
||||
* @description Stop advertising
|
||||
* Stop advertising
|
||||
* @returns {Promise<{ status: Status }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
@@ -962,7 +972,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name isAdvertising
|
||||
* @description Determine if app is advertising or not.
|
||||
* Determine if app is advertising or not.
|
||||
* @returns {Promise<{ status: boolean }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
@@ -972,7 +982,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name respond
|
||||
* @description Respond to a read or write request
|
||||
* Respond to a read or write request
|
||||
* @param {RespondParams} params
|
||||
* @returns {Promise<{ status: Status }>}
|
||||
*/
|
||||
@@ -983,7 +993,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name notify
|
||||
* @description Update a value for a subscription. Currently all subscribed devices will receive update.
|
||||
* Update a value for a subscription. Currently all subscribed devices will receive update.
|
||||
* Device specific updates will be added in the future.
|
||||
* If sent equals false in the return value, you must wait for the peripheralManagerIsReadyToUpdateSubscribers event before sending more updates.
|
||||
* @param {NotifyParams} params
|
||||
@@ -996,7 +1006,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name encodedStringToBytes
|
||||
* @description Helper function to convert a base64 encoded string from a characteristic or descriptor value into a uint8Array object
|
||||
* Helper function to convert a base64 encoded string from a characteristic or descriptor value into a uint8Array object
|
||||
* @param {string} str
|
||||
* @returns {Uint8Array}
|
||||
*/
|
||||
@@ -1007,7 +1017,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name bytesToEncodedString
|
||||
* @description Helper function to convert a unit8Array to a base64 encoded string for a characteric or descriptor write
|
||||
* Helper function to convert a unit8Array to a base64 encoded string for a characteric or descriptor write
|
||||
* @param {Uint8Array} bytes
|
||||
* @returns {string}
|
||||
*/
|
||||
@@ -1018,18 +1028,18 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @name stringToBytes
|
||||
* @description Helper function to convert a string to bytes
|
||||
* @param {Uint8Array} value
|
||||
* @returns {string}
|
||||
* Helper function to convert a string to bytes
|
||||
* @param {string} value
|
||||
* @returns {Uint8Array}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
stringToBytes(value: Uint8Array): string {
|
||||
stringToBytes(value: string): Uint8Array {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name bytesToString
|
||||
* @description Helper function to convert bytes to a string.
|
||||
* Helper function to convert bytes to a string.
|
||||
* @param {Uint8Array} value
|
||||
* @returns {string}
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,235 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface BranchIoPromise {
|
||||
$identity_id?: number;
|
||||
$one_time_use?: boolean;
|
||||
'+click_timestamp'?: number;
|
||||
'+clicked_branch_link'?: boolean;
|
||||
'+is_first_session'?: boolean;
|
||||
'+match_guaranteed'?: boolean;
|
||||
contentMetadata?: string;
|
||||
source?: string;
|
||||
'~campaign'?: string;
|
||||
'~channel'?: string;
|
||||
'~creation_source'?: string;
|
||||
'~feature'?: string;
|
||||
'~id'?: number;
|
||||
'~referring_link:'?: string;
|
||||
[x: string]: any;
|
||||
}
|
||||
|
||||
export interface BranchIoAnalytics {
|
||||
channel?: string;
|
||||
feature?: string;
|
||||
campaign?: string;
|
||||
stage?: string;
|
||||
tags?: string[];
|
||||
[x: string]: any;
|
||||
}
|
||||
|
||||
export interface BranchIoProperties {
|
||||
contentMetadata?: {
|
||||
[x: string]: any;
|
||||
};
|
||||
[x: string]: any;
|
||||
}
|
||||
|
||||
export interface BranchUniversalObject {
|
||||
generateShortUrl(
|
||||
analytics: BranchIoAnalytics,
|
||||
properties: BranchIoProperties
|
||||
): Promise<any>;
|
||||
registerView(): Promise<any>;
|
||||
showShareSheet(
|
||||
analytics: BranchIoAnalytics,
|
||||
properties: BranchIoProperties,
|
||||
shareText: string
|
||||
): Promise<any>;
|
||||
onShareSheetLaunched(callback: any): void;
|
||||
onShareSheetDismissed(callback: any): void;
|
||||
onLinkShareResponse(callback: any): void;
|
||||
onChannelSelected(callback: any): void;
|
||||
listOnSpotlight(): Promise<any>;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name BranchIo
|
||||
* @description
|
||||
* Branch.io is an attribution service for deeplinking and invitation links
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import { BranchIo } from '@ionic-native/branch-io';
|
||||
*
|
||||
*
|
||||
* constructor(private branch: BranchIo) { }
|
||||
*
|
||||
* ```
|
||||
*
|
||||
* @interfaces
|
||||
* BranchIoPromise
|
||||
* BranchIoAnalytics
|
||||
* BranchIoProperties
|
||||
* BranchUniversalObject
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'BranchIo',
|
||||
plugin: 'branch-cordova-sdk',
|
||||
pluginRef: 'Branch',
|
||||
repo:
|
||||
'https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking',
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class BranchIo extends IonicNativePlugin {
|
||||
/**
|
||||
* for development and debugging only
|
||||
* @param {boolean} enable Enable debug
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
setDebug(enable: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable tracking
|
||||
* @param {boolean} disable disable tracking
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
disableTracking(disable: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes Branch
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
initSession(): Promise<BranchIoPromise> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Request Metadata
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
setRequestMetadata(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* for better Android matching
|
||||
* @param {string} linkDomain LinkDomain at branch
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
setCookieBasedMatching(linkDomain: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* First data
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getFirstReferringParams(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Latest data
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getLatestReferringParams(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set identy of user
|
||||
* @param {string} userId
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
setIdentity(userId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Logout user
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
logout(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a custom event
|
||||
* @param {string} eventName
|
||||
* @param {any} metaData
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
userCompletedAction(eventName: string, metaData: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send Commerce Event
|
||||
* @param {string} event
|
||||
* @param {any} metaData
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
sendCommerceEvent(event: string, metaData: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* create a branchUniversalObj variable to reference with other Branch methods
|
||||
* @param {BranchIoProperties} properties
|
||||
* @return {Promise<BranchUniversalObject>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
createBranchUniversalObject(
|
||||
properties: BranchIoProperties
|
||||
): Promise<BranchUniversalObject> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load credits
|
||||
* @param {any} bucket
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
loadRewards(bucket: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Redeem Rewards
|
||||
* @param {string} value
|
||||
* @param {any} bucket
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
redeemRewards(value: string, bucket: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show credit history
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
creditHistory(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,11 @@ export interface CallDirectoryItem {
|
||||
number: string;
|
||||
}
|
||||
|
||||
export interface CallDirectoryLog {
|
||||
plugin: string[];
|
||||
extension: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Call Directory
|
||||
* @description
|
||||
@@ -29,6 +34,10 @@ export interface CallDirectoryItem {
|
||||
* .then(res: string) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
* ```
|
||||
*
|
||||
* @Interfaces
|
||||
* CallDirectoryItem
|
||||
* CallDirectoryLog
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'CallDirectory',
|
||||
@@ -57,7 +66,7 @@ export class CallDirectory extends IonicNativePlugin {
|
||||
* @return {Promise<any>} Returns a promise that resolves when numbers are added
|
||||
*/
|
||||
@Cordova()
|
||||
addIdentification(items: Array<CallDirectoryItem>): Promise<any> {
|
||||
addIdentification(items: CallDirectoryItem[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -67,7 +76,7 @@ export class CallDirectory extends IonicNativePlugin {
|
||||
* @return {Promise<any>} Returns a promise that resolves when numbers are removed
|
||||
*/
|
||||
@Cordova()
|
||||
removeIdentification(items: Array<CallDirectoryItem>): Promise<any> {
|
||||
removeIdentification(items: CallDirectoryItem[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -85,7 +94,7 @@ export class CallDirectory extends IonicNativePlugin {
|
||||
* @return {Array<CallDirectoryItem>} Returns a promise that resolves with an array of all items
|
||||
*/
|
||||
@Cordova()
|
||||
getAllItems(): Promise<Array<CallDirectoryItem>> {
|
||||
getAllItems(): Promise<CallDirectoryItem[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -97,4 +106,13 @@ export class CallDirectory extends IonicNativePlugin {
|
||||
reloadExtension(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get log from plugin and call directory extension
|
||||
* @return {Promise<CallDirectoryLog>} Returns a promise with an object of log messages
|
||||
*/
|
||||
@Cordova()
|
||||
getLog(): Promise<CallDirectoryLog> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface CallLogObject {
|
||||
name: string;
|
||||
value: string | Array<string>;
|
||||
value: string | string[];
|
||||
operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'like';
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface CameraOptions {
|
||||
/** Picture quality in range 0-100. Default is 50 */
|
||||
@@ -33,7 +33,7 @@ export interface CameraOptions {
|
||||
/**
|
||||
* Width in pixels to scale image. Must be used with targetHeight.
|
||||
* Aspect ratio remains constant.
|
||||
*/
|
||||
*/
|
||||
targetWidth?: number;
|
||||
/**
|
||||
* Height in pixels to scale image. Must be used with targetWidth.
|
||||
@@ -165,7 +165,6 @@ export enum Direction {
|
||||
})
|
||||
@Injectable()
|
||||
export class Camera extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Constant for possible destination types
|
||||
*/
|
||||
@@ -200,7 +199,6 @@ export class Camera extends IonicNativePlugin {
|
||||
ALLMEDIA: 2
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Convenience constant
|
||||
*/
|
||||
@@ -213,7 +211,6 @@ export class Camera extends IonicNativePlugin {
|
||||
SAVEDPHOTOALBUM: 2
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Convenience constant
|
||||
*/
|
||||
@@ -243,7 +240,9 @@ export class Camera extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
getPicture(options?: CameraOptions): Promise<any> { return; }
|
||||
getPicture(options?: CameraOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove intermediate image files that are kept in temporary storage after calling camera.getPicture.
|
||||
@@ -253,6 +252,7 @@ export class Camera extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
platforms: ['iOS']
|
||||
})
|
||||
cleanup(): Promise<any> { return; };
|
||||
|
||||
cleanup(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,16 +130,16 @@ export interface CardIOResponse {
|
||||
* @description
|
||||
* @usage
|
||||
* This plug-in exposes card.io credit card scanning.
|
||||
*
|
||||
*
|
||||
* **NOTE**: If you would like to actually process a credit card charge, you might be interested in the [PayPal Cordova Plug-in](https://github.com/paypal/PayPal-Cordova-Plugin).
|
||||
*
|
||||
*
|
||||
* Requires Cordova plugin: `card.io.cordova.mobilesdk`. For more info, please see the [Card IO plugin docs](https://github.com/card-io/card.io-Cordova-Plugin).
|
||||
*
|
||||
*
|
||||
* Note: For use with iOS 10 + When building your app with the iOS 10 SDK +, you have to add some info to the info.plist file. This is due to increased security in iOS 10. Go to your app directory and search for the <your app name>Info.plist file. Add the following lines in the main <dict> element.
|
||||
* ```xml
|
||||
*<key>NSCameraUsageDescription</key>
|
||||
*<string>To scan credit cards.</string>
|
||||
*```
|
||||
* <key>NSCameraUsageDescription</key>
|
||||
* <string>To scan credit cards.</string>
|
||||
* ```
|
||||
* ```typescript
|
||||
* import { CardIO } from '@ionic-native/card-io';
|
||||
*
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface ChooserResult {
|
||||
data: Uint8Array;
|
||||
dataURI: string;
|
||||
mediaType: string;
|
||||
name: string;
|
||||
uri: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Chooser
|
||||
* @description
|
||||
* File chooser plugin for Cordova.
|
||||
*
|
||||
* The following must be added to config.xml to prevent crashing when selecting large files on Android:
|
||||
* ```xml
|
||||
* <platform name="android">
|
||||
* <edit-config
|
||||
* file="app/src/main/AndroidManifest.xml"
|
||||
* mode="merge"
|
||||
* target="/manifest/application">
|
||||
* <application android:largeHeap="true" />
|
||||
* </edit-config>
|
||||
* </platform>
|
||||
* ```
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Chooser } from '@ionic-native/chooser';
|
||||
*
|
||||
*
|
||||
* constructor(private chooser: Chooser) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.chooser.getFile()
|
||||
* .then(file => console.log(file ? file.name : 'canceled'))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*
|
||||
* @interfaces
|
||||
* ChooserResult
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Chooser',
|
||||
plugin: 'cordova-plugin-chooser',
|
||||
pluginRef: 'chooser',
|
||||
repo: 'https://github.com/cyph/cordova-plugin-chooser',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Chooser extends IonicNativePlugin {
|
||||
/**
|
||||
* Displays native prompt for user to select a file.
|
||||
* @param {string} [accept] Optional MIME type filter (e.g. 'image/gif,video/*').
|
||||
* @return {Promise<any>} Promise containing selected file's raw binary data,
|
||||
* base64-encoded data: URI, MIME type, display name, and original URI.
|
||||
*/
|
||||
@Cordova()
|
||||
getFile(accept: string): Promise<ChooserResult | undefined> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ declare var clevertap: any;
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { CleverTap } from '@ionic-native/clevertap';
|
||||
|
||||
*
|
||||
* constructor(private clevertap: CleverTap) { }
|
||||
*
|
||||
* ```
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
/**
|
||||
* @name Clipboard
|
||||
* @description
|
||||
@@ -25,7 +25,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
* alert('Error: ' + reject);
|
||||
* }
|
||||
* );
|
||||
*
|
||||
*
|
||||
* this.clipboard.clear();
|
||||
* ```
|
||||
*/
|
||||
@@ -38,27 +38,31 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
})
|
||||
@Injectable()
|
||||
export class Clipboard extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Copies the given text
|
||||
* @param {string} text Text that gets copied on the system clipboard
|
||||
* @returns {Promise<any>} Returns a promise after the text has been copied
|
||||
*/
|
||||
@Cordova()
|
||||
copy(text: string): Promise<any> { return; }
|
||||
copy(text: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pastes the text stored in clipboard
|
||||
* @returns {Promise<any>} Returns a promise after the text has been pasted
|
||||
*/
|
||||
@Cordova()
|
||||
paste(): Promise<any> { return; }
|
||||
paste(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the text stored in clipboard
|
||||
* @returns {Promise<any>} Returns a promise after the text has been cleaned
|
||||
*/
|
||||
@Cordova()
|
||||
clear(): Promise<any> { return; }
|
||||
|
||||
clear(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,15 +152,9 @@ interface NativeUpdateNotification {
|
||||
appVersion: string;
|
||||
}
|
||||
|
||||
export interface Callback<T> {
|
||||
(error: Error, parameter: T): void;
|
||||
}
|
||||
export interface SuccessCallback<T> {
|
||||
(result?: T): void;
|
||||
}
|
||||
export interface ErrorCallback {
|
||||
(error?: Error): void;
|
||||
}
|
||||
export type Callback<T> = (error: Error, parameter: T) => void;
|
||||
export type SuccessCallback<T> = (result?: T) => void;
|
||||
export type ErrorCallback = (error?: Error) => void;
|
||||
|
||||
interface Configuration {
|
||||
appVersion: string;
|
||||
@@ -177,18 +171,18 @@ declare class AcquisitionStatus {
|
||||
|
||||
declare class AcquisitionManager {
|
||||
constructor(httpRequester: Http.Requester, configuration: Configuration);
|
||||
public queryUpdateWithCurrentPackage(
|
||||
queryUpdateWithCurrentPackage(
|
||||
currentPackage: IPackage,
|
||||
callback?: Callback<IRemotePackage | NativeUpdateNotification>
|
||||
): void;
|
||||
public reportStatusDeploy(
|
||||
reportStatusDeploy(
|
||||
pkg?: IPackage,
|
||||
status?: string,
|
||||
previousLabelOrAppVersion?: string,
|
||||
previousDeploymentKey?: string,
|
||||
callback?: Callback<void>
|
||||
): void;
|
||||
public reportStatusDownload(pkg: IPackage, callback?: Callback<void>): void;
|
||||
reportStatusDownload(pkg: IPackage, callback?: Callback<void>): void;
|
||||
}
|
||||
|
||||
interface CodePushCordovaPlugin {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import {
|
||||
checkAvailability,
|
||||
CordovaCheck,
|
||||
CordovaInstance,
|
||||
getPromise,
|
||||
InstanceCheck,
|
||||
InstanceProperty,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
Plugin,
|
||||
checkAvailability,
|
||||
getPromise
|
||||
} from '@ionic-native/core';
|
||||
|
||||
declare const window: any, navigator: any;
|
||||
@@ -117,8 +117,8 @@ export class Contact implements IContactProperties {
|
||||
|
||||
@InstanceCheck()
|
||||
clone(): Contact {
|
||||
let newContact: any = new Contact();
|
||||
for (let prop in this) {
|
||||
const newContact: any = new Contact();
|
||||
for (const prop in this) {
|
||||
if (prop === 'id') return;
|
||||
newContact[prop] = this[prop];
|
||||
}
|
||||
@@ -403,8 +403,8 @@ export class Contacts extends IonicNativePlugin {
|
||||
* @hidden
|
||||
*/
|
||||
function processContact(contact: any) {
|
||||
let newContact = new Contact();
|
||||
for (let prop in contact) {
|
||||
const newContact = new Contact();
|
||||
for (const prop in contact) {
|
||||
if (typeof contact[prop] === 'function') continue;
|
||||
newContact[prop] = contact[prop];
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
|
||||
/**
|
||||
* @name Couchbase Lite
|
||||
* @description
|
||||
@@ -66,8 +65,8 @@ import { Injectable } from '@angular/core';
|
||||
* .catch((error:any) => {
|
||||
* return Observable.throw(error.json() || 'Couchbase Lite error');
|
||||
* }) .
|
||||
* }
|
||||
* createDocument(database_name:string,document){
|
||||
* }
|
||||
* createDocument(database_name:string,document){
|
||||
* let url = this.getUrl();
|
||||
* url = url + database_name;
|
||||
* return this._http
|
||||
@@ -84,9 +83,9 @@ import { Injectable } from '@angular/core';
|
||||
* createDocument('justbe', document);
|
||||
* // successful response
|
||||
* { "id": "string","rev": "string","ok": true }
|
||||
* updateDocument(database_name:string,document){
|
||||
* updateDocument(database_name:string,document){
|
||||
* let url = this.getUrl();
|
||||
* url = url + database_name + '/' + document._id;
|
||||
* url = url + database_name + '/' + document._id;
|
||||
* return this._http
|
||||
* .put(url,document)
|
||||
* .map(data => { this.results = data['results'] })
|
||||
@@ -121,7 +120,6 @@ import { Injectable } from '@angular/core';
|
||||
})
|
||||
@Injectable()
|
||||
export class CouchbaseLite extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Get the database url
|
||||
* @return {Promise<any>} Returns a promise that resolves with the local database url
|
||||
@@ -129,6 +127,7 @@ export class CouchbaseLite extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
callbackStyle: 'node'
|
||||
})
|
||||
getURL(): Promise<any> { return; }
|
||||
|
||||
getURL(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface CropOptions {
|
||||
quality?: number;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export interface DeeplinkMatch {
|
||||
@@ -123,7 +123,7 @@ export class Deeplinks extends IonicNativePlugin {
|
||||
* promise result which you can then use to navigate in the app as you see fit.
|
||||
*
|
||||
* @param {Object} paths
|
||||
*
|
||||
*
|
||||
* @param {DeeplinkOptions} options
|
||||
*
|
||||
* @returns {Observable<DeeplinkMatch>} Returns an Observable that resolves each time a deeplink comes through, and
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export interface DeviceMotionAccelerationData {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
declare const window: any;
|
||||
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Cordova,
|
||||
CordovaProperty,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
} from '@ionic-native/core';
|
||||
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Diagnostic
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface DialogsPromptCallback {
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name iOS DocumentPicker
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
export interface DocumentViewerOptions {
|
||||
|
||||
@@ -15,17 +15,17 @@ export interface EmailComposerOptions {
|
||||
/**
|
||||
* Email address(es) for To field
|
||||
*/
|
||||
to?: string | Array<string>;
|
||||
to?: string | string[];
|
||||
|
||||
/**
|
||||
* Email address(es) for CC field
|
||||
*/
|
||||
cc?: string | Array<string>;
|
||||
cc?: string | string[];
|
||||
|
||||
/**
|
||||
* Email address(es) for BCC field
|
||||
*/
|
||||
bcc?: string | Array<string>;
|
||||
bcc?: string | string[];
|
||||
|
||||
/**
|
||||
* File paths or base64 data streams
|
||||
@@ -117,6 +117,30 @@ export interface EmailComposerOptions {
|
||||
})
|
||||
@Injectable()
|
||||
export class EmailComposer extends IonicNativePlugin {
|
||||
/**
|
||||
* Checks if the app has a permission to access email accounts information
|
||||
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 2
|
||||
})
|
||||
hasPermission(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request permission to access email accounts information
|
||||
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 2
|
||||
})
|
||||
requestPermission(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verifies if sending emails is supported on the device.
|
||||
*
|
||||
@@ -146,39 +170,6 @@ export class EmailComposer extends IonicNativePlugin {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Request permission to access email accounts information
|
||||
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 2
|
||||
})
|
||||
requestPermission(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the app has a permission to access email accounts information
|
||||
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 2
|
||||
})
|
||||
hasPermission(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a new mail app alias.
|
||||
*
|
||||
* @param {string} alias The alias name
|
||||
* @param {string} packageName The package name
|
||||
*/
|
||||
@Cordova()
|
||||
addAlias(alias: string, packageName: string): void {}
|
||||
|
||||
/**
|
||||
* Displays the email composer pre-filled with data.
|
||||
*
|
||||
@@ -193,4 +184,13 @@ export class EmailComposer extends IonicNativePlugin {
|
||||
open(options: EmailComposerOptions, scope?: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a new mail app alias.
|
||||
*
|
||||
* @param {string} alias The alias name
|
||||
* @param {string} packageName The package name
|
||||
*/
|
||||
@Cordova()
|
||||
addAlias(alias: string, packageName: string): void {}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Extended Device Information
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface FacebookLoginResponse {
|
||||
status: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name File Chooser
|
||||
|
||||
@@ -6,7 +6,7 @@ export interface IOSFilePickerPosition {
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @name iOS File Picker
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
checkAvailability,
|
||||
CordovaInstance,
|
||||
InstanceCheck,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
Plugin,
|
||||
checkAvailability
|
||||
} from '@ionic-native/core';
|
||||
|
||||
export interface FileUploadOptions {
|
||||
@@ -152,7 +152,7 @@ export interface FileTransferError {
|
||||
* // error
|
||||
* })
|
||||
* }
|
||||
**
|
||||
*
|
||||
* download() {
|
||||
* const url = 'http://www.example.com/file.pdf';
|
||||
* fileTransfer.download(url, this.file.dataDirectory + 'file.pdf').then((entry) => {
|
||||
|
||||
@@ -371,84 +371,52 @@ export interface FileEntry extends Entry {
|
||||
/**
|
||||
* When requestFileSystem() succeeds, the following callback is made.
|
||||
*/
|
||||
export interface FileSystemCallback {
|
||||
/**
|
||||
* @param filesystem The file systems to which the app is granted access.
|
||||
*/
|
||||
(filesystem: FileSystem): void;
|
||||
}
|
||||
export type FileSystemCallback = (filesystem: FileSystem) => void;
|
||||
|
||||
/**
|
||||
* This export interface is the callback used to look up Entry objects.
|
||||
*/
|
||||
export interface EntryCallback {
|
||||
/**
|
||||
* @param entry
|
||||
*/
|
||||
(entry: Entry): void;
|
||||
}
|
||||
export type EntryCallback = (entry: Entry) => void;
|
||||
|
||||
/**
|
||||
* This export interface is the callback used to look up FileEntry objects.
|
||||
*/
|
||||
export interface FileEntryCallback {
|
||||
/**
|
||||
* @param entry
|
||||
*/
|
||||
(entry: FileEntry): void;
|
||||
}
|
||||
export type FileEntryCallback = (entry: FileEntry) => void;
|
||||
|
||||
/**
|
||||
* This export interface is the callback used to look up DirectoryEntry objects.
|
||||
*/
|
||||
export interface DirectoryEntryCallback {
|
||||
/**
|
||||
* @param entry
|
||||
*/
|
||||
(entry: DirectoryEntry): void;
|
||||
}
|
||||
export type DirectoryEntryCallback = (entry: DirectoryEntry) => void;
|
||||
|
||||
/**
|
||||
* When readEntries() succeeds, the following callback is made.
|
||||
*/
|
||||
export interface EntriesCallback {
|
||||
(entries: Entry[]): void;
|
||||
}
|
||||
export type EntriesCallback = (entries: Entry[]) => void;
|
||||
|
||||
/**
|
||||
* This export interface is the callback used to look up file and directory metadata.
|
||||
*/
|
||||
export interface MetadataCallback {
|
||||
(metadata: Metadata): void;
|
||||
}
|
||||
export type MetadataCallback = (metadata: Metadata) => void;
|
||||
|
||||
/**
|
||||
* This export interface is the callback used to create a FileWriter.
|
||||
*/
|
||||
export interface FileWriterCallback {
|
||||
(fileWriter: FileWriter): void;
|
||||
}
|
||||
export type FileWriterCallback = (fileWriter: FileWriter) => void;
|
||||
|
||||
/**
|
||||
* This export interface is the callback used to obtain a File.
|
||||
*/
|
||||
export interface FileCallback {
|
||||
(file: IFile): void;
|
||||
}
|
||||
export type FileCallback = (file: IFile) => void;
|
||||
|
||||
/**
|
||||
* This export interface is the generic callback used to indicate success of an asynchronous method.
|
||||
*/
|
||||
export interface VoidCallback {
|
||||
(): void;
|
||||
}
|
||||
export type VoidCallback = () => void;
|
||||
|
||||
/**
|
||||
* When an error occurs, the following callback is made.
|
||||
*/
|
||||
export interface ErrorCallback {
|
||||
(err: FileError): void;
|
||||
}
|
||||
export type ErrorCallback = (err: FileError) => void;
|
||||
|
||||
export interface RemoveResult {
|
||||
success: boolean;
|
||||
@@ -681,63 +649,75 @@ export class File extends IonicNativePlugin {
|
||||
/**
|
||||
* Read-only directory where the application is installed.
|
||||
*/
|
||||
@CordovaProperty applicationDirectory: string;
|
||||
@CordovaProperty
|
||||
applicationDirectory: string;
|
||||
|
||||
/**
|
||||
* Read-only directory where the application is installed.
|
||||
*/
|
||||
@CordovaProperty applicationStorageDirectory: string;
|
||||
@CordovaProperty
|
||||
applicationStorageDirectory: string;
|
||||
|
||||
/**
|
||||
* Where to put app-specific data files.
|
||||
*/
|
||||
@CordovaProperty dataDirectory: string;
|
||||
@CordovaProperty
|
||||
dataDirectory: string;
|
||||
|
||||
/**
|
||||
* Cached files that should survive app restarts.
|
||||
* Apps should not rely on the OS to delete files in here.
|
||||
*/
|
||||
@CordovaProperty cacheDirectory: string;
|
||||
@CordovaProperty
|
||||
cacheDirectory: string;
|
||||
|
||||
/**
|
||||
* Android: the application space on external storage.
|
||||
*/
|
||||
@CordovaProperty externalApplicationStorageDirectory: string;
|
||||
@CordovaProperty
|
||||
externalApplicationStorageDirectory: string;
|
||||
|
||||
/**
|
||||
* Android: Where to put app-specific data files on external storage.
|
||||
*/
|
||||
@CordovaProperty externalDataDirectory: string;
|
||||
@CordovaProperty
|
||||
externalDataDirectory: string;
|
||||
|
||||
/**
|
||||
* Android: the application cache on external storage.
|
||||
*/
|
||||
@CordovaProperty externalCacheDirectory: string;
|
||||
@CordovaProperty
|
||||
externalCacheDirectory: string;
|
||||
|
||||
/**
|
||||
* Android: the external storage (SD card) root.
|
||||
*/
|
||||
@CordovaProperty externalRootDirectory: string;
|
||||
@CordovaProperty
|
||||
externalRootDirectory: string;
|
||||
|
||||
/**
|
||||
* iOS: Temp directory that the OS can clear at will.
|
||||
*/
|
||||
@CordovaProperty tempDirectory: string;
|
||||
@CordovaProperty
|
||||
tempDirectory: string;
|
||||
|
||||
/**
|
||||
* iOS: Holds app-specific files that should be synced (e.g. to iCloud).
|
||||
*/
|
||||
@CordovaProperty syncedDataDirectory: string;
|
||||
@CordovaProperty
|
||||
syncedDataDirectory: string;
|
||||
|
||||
/**
|
||||
* iOS: Files private to the app, but that are meaningful to other applications (e.g. Office files)
|
||||
*/
|
||||
@CordovaProperty documentsDirectory: string;
|
||||
@CordovaProperty
|
||||
documentsDirectory: string;
|
||||
|
||||
/**
|
||||
* BlackBerry10: Files globally available to all apps
|
||||
*/
|
||||
@CordovaProperty sharedDirectory: string;
|
||||
@CordovaProperty
|
||||
sharedDirectory: string;
|
||||
|
||||
cordovaFileError: any = {
|
||||
1: 'NOT_FOUND_ERR',
|
||||
@@ -777,7 +757,7 @@ export class File extends IonicNativePlugin {
|
||||
@CordovaCheck()
|
||||
checkDir(path: string, dir: string): Promise<boolean> {
|
||||
if (/^\//.test(dir)) {
|
||||
let err = new FileError(5);
|
||||
const err = new FileError(5);
|
||||
err.message = 'directory cannot start with /';
|
||||
return Promise.reject<any>(err);
|
||||
}
|
||||
@@ -805,12 +785,12 @@ export class File extends IonicNativePlugin {
|
||||
replace: boolean
|
||||
): Promise<DirectoryEntry> {
|
||||
if (/^\//.test(dirName)) {
|
||||
let err = new FileError(5);
|
||||
const err = new FileError(5);
|
||||
err.message = 'directory cannot start with /';
|
||||
return Promise.reject<any>(err);
|
||||
}
|
||||
|
||||
let options: Flags = {
|
||||
const options: Flags = {
|
||||
create: true
|
||||
};
|
||||
|
||||
@@ -833,7 +813,7 @@ export class File extends IonicNativePlugin {
|
||||
@CordovaCheck()
|
||||
removeDir(path: string, dirName: string): Promise<RemoveResult> {
|
||||
if (/^\//.test(dirName)) {
|
||||
let err = new FileError(5);
|
||||
const err = new FileError(5);
|
||||
err.message = 'directory cannot start with /';
|
||||
return Promise.reject<any>(err);
|
||||
}
|
||||
@@ -866,7 +846,7 @@ export class File extends IonicNativePlugin {
|
||||
newDirName = newDirName || dirName;
|
||||
|
||||
if (/^\//.test(newDirName)) {
|
||||
let err = new FileError(5);
|
||||
const err = new FileError(5);
|
||||
err.message = 'directory cannot start with /';
|
||||
return Promise.reject<any>(err);
|
||||
}
|
||||
@@ -899,7 +879,7 @@ export class File extends IonicNativePlugin {
|
||||
newDirName: string
|
||||
): Promise<Entry> {
|
||||
if (/^\//.test(newDirName)) {
|
||||
let err = new FileError(5);
|
||||
const err = new FileError(5);
|
||||
err.message = 'directory cannot start with /';
|
||||
return Promise.reject<any>(err);
|
||||
}
|
||||
@@ -925,7 +905,7 @@ export class File extends IonicNativePlugin {
|
||||
@CordovaCheck()
|
||||
listDir(path: string, dirName: string): Promise<Entry[]> {
|
||||
if (/^\//.test(dirName)) {
|
||||
let err = new FileError(5);
|
||||
const err = new FileError(5);
|
||||
err.message = 'directory cannot start with /';
|
||||
return Promise.reject<Entry[]>(err);
|
||||
}
|
||||
@@ -938,7 +918,7 @@ export class File extends IonicNativePlugin {
|
||||
});
|
||||
})
|
||||
.then(de => {
|
||||
let reader = de.createReader();
|
||||
const reader = de.createReader();
|
||||
return this.readEntries(reader);
|
||||
});
|
||||
}
|
||||
@@ -953,7 +933,7 @@ export class File extends IonicNativePlugin {
|
||||
@CordovaCheck()
|
||||
removeRecursively(path: string, dirName: string): Promise<RemoveResult> {
|
||||
if (/^\//.test(dirName)) {
|
||||
let err = new FileError(5);
|
||||
const err = new FileError(5);
|
||||
err.message = 'directory cannot start with /';
|
||||
return Promise.reject<RemoveResult>(err);
|
||||
}
|
||||
@@ -977,7 +957,7 @@ export class File extends IonicNativePlugin {
|
||||
@CordovaCheck()
|
||||
checkFile(path: string, file: string): Promise<boolean> {
|
||||
if (/^\//.test(file)) {
|
||||
let err = new FileError(5);
|
||||
const err = new FileError(5);
|
||||
err.message = 'file cannot start with /';
|
||||
return Promise.reject<any>(err);
|
||||
}
|
||||
@@ -986,7 +966,7 @@ export class File extends IonicNativePlugin {
|
||||
if (fse.isFile) {
|
||||
return true;
|
||||
} else {
|
||||
let err = new FileError(13);
|
||||
const err = new FileError(13);
|
||||
err.message = 'input is not a file';
|
||||
return Promise.reject<boolean>(err);
|
||||
}
|
||||
@@ -1010,12 +990,12 @@ export class File extends IonicNativePlugin {
|
||||
replace: boolean
|
||||
): Promise<FileEntry> {
|
||||
if (/^\//.test(fileName)) {
|
||||
let err = new FileError(5);
|
||||
const err = new FileError(5);
|
||||
err.message = 'file-name cannot start with /';
|
||||
return Promise.reject<any>(err);
|
||||
}
|
||||
|
||||
let options: Flags = {
|
||||
const options: Flags = {
|
||||
create: true
|
||||
};
|
||||
|
||||
@@ -1038,7 +1018,7 @@ export class File extends IonicNativePlugin {
|
||||
@CordovaCheck()
|
||||
removeFile(path: string, fileName: string): Promise<RemoveResult> {
|
||||
if (/^\//.test(fileName)) {
|
||||
let err = new FileError(5);
|
||||
const err = new FileError(5);
|
||||
err.message = 'file-name cannot start with /';
|
||||
return Promise.reject<any>(err);
|
||||
}
|
||||
@@ -1052,8 +1032,8 @@ export class File extends IonicNativePlugin {
|
||||
});
|
||||
}
|
||||
|
||||
/** Write a new file to the desired location.
|
||||
*
|
||||
/**
|
||||
* Write a new file to the desired location.
|
||||
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
|
||||
* @param {string} fileName path relative to base path
|
||||
* @param {string | Blob | ArrayBuffer} text content, blob or ArrayBuffer to write
|
||||
@@ -1087,8 +1067,8 @@ export class File extends IonicNativePlugin {
|
||||
});
|
||||
}
|
||||
|
||||
/** Write content to FileEntry.
|
||||
*
|
||||
/**
|
||||
* Write content to FileEntry.
|
||||
* @hidden
|
||||
* @param {FileEntry} fe file entry object
|
||||
* @param {string | Blob} text content or blob to write
|
||||
@@ -1115,8 +1095,8 @@ export class File extends IonicNativePlugin {
|
||||
.then(() => fe);
|
||||
}
|
||||
|
||||
/** Write to an existing file.
|
||||
*
|
||||
/**
|
||||
* Write to an existing file.
|
||||
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
|
||||
* @param {string} fileName path relative to base path
|
||||
* @param {string | Blob} text content or blob to write
|
||||
@@ -1147,7 +1127,7 @@ export class File extends IonicNativePlugin {
|
||||
* Read file and return data as a base64 encoded data url.
|
||||
* A data url is of the form:
|
||||
* data: [<mediatype>][;base64],<data>
|
||||
|
||||
*
|
||||
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
|
||||
* @param {string} file Name of file, relative to path.
|
||||
* @returns {Promise<string>} Returns a Promise that resolves with the contents of the file as data URL or rejects with an error.
|
||||
@@ -1185,7 +1165,7 @@ export class File extends IonicNativePlugin {
|
||||
readAs: 'ArrayBuffer' | 'BinaryString' | 'DataURL' | 'Text'
|
||||
): Promise<T> {
|
||||
if (/^\//.test(file)) {
|
||||
let err = new FileError(5);
|
||||
const err = new FileError(5);
|
||||
err.message = 'file-name cannot start with /';
|
||||
return Promise.reject<any>(err);
|
||||
}
|
||||
@@ -1199,7 +1179,7 @@ export class File extends IonicNativePlugin {
|
||||
return new Promise<T>((resolve, reject) => {
|
||||
reader.onloadend = () => {
|
||||
if (reader.result !== undefined || reader.result !== null) {
|
||||
resolve(<T>(<any>reader.result));
|
||||
resolve((reader.result as any) as T);
|
||||
} else if (reader.error !== undefined || reader.error !== null) {
|
||||
reject(reader.error);
|
||||
} else {
|
||||
@@ -1238,7 +1218,7 @@ export class File extends IonicNativePlugin {
|
||||
newFileName = newFileName || fileName;
|
||||
|
||||
if (/^\//.test(newFileName)) {
|
||||
let err = new FileError(5);
|
||||
const err = new FileError(5);
|
||||
err.message = 'file name cannot start with /';
|
||||
return Promise.reject<any>(err);
|
||||
}
|
||||
@@ -1273,7 +1253,7 @@ export class File extends IonicNativePlugin {
|
||||
newFileName = newFileName || fileName;
|
||||
|
||||
if (/^\//.test(newFileName)) {
|
||||
let err = new FileError(5);
|
||||
const err = new FileError(5);
|
||||
err.message = 'file name cannot start with /';
|
||||
return Promise.reject<any>(err);
|
||||
}
|
||||
@@ -1333,7 +1313,7 @@ export class File extends IonicNativePlugin {
|
||||
resolveDirectoryUrl(directoryUrl: string): Promise<DirectoryEntry> {
|
||||
return this.resolveLocalFilesystemUrl(directoryUrl).then(de => {
|
||||
if (de.isDirectory) {
|
||||
return <DirectoryEntry>de;
|
||||
return de as DirectoryEntry;
|
||||
} else {
|
||||
const err = new FileError(13);
|
||||
err.message = 'input is not a directory';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export interface IDynamicLink {
|
||||
@@ -21,7 +21,7 @@ export interface IDynamicLink {
|
||||
* Preferences GoogleIOSClientId and GoogleAndroidClientId are used to setup dynamic links when you have an app for several platforms.
|
||||
* You can find values at your GoogleService-Info.plist (key ANDROID_CLIENT_ID) and google-services.json (key client[0].oauth_client[0].client_id).
|
||||
*
|
||||
*config.xml:
|
||||
* config.xml:
|
||||
* ```xml
|
||||
* <platform name="ios">
|
||||
* <preference name="GoogleIOSClientId" value="..." />
|
||||
|
||||
@@ -133,4 +133,14 @@ export class FirebaseMessaging extends IonicNativePlugin {
|
||||
setBadge(value: number): Promise<null> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Revoke the current FCM token.
|
||||
*
|
||||
* @returns {Promise<null>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
revokeToken(): Promise<null> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ export class Firebase extends IonicNativePlugin {
|
||||
})
|
||||
verifyPhoneNumber(
|
||||
phoneNumber: string,
|
||||
timeoutDuration: number = 0
|
||||
timeoutDuration = 0
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Flashlight
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
checkAvailability,
|
||||
CordovaInstance,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
Plugin,
|
||||
checkAvailability
|
||||
} from '@ionic-native/core';
|
||||
|
||||
export interface FlurryAnalyticsOptions {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, CordovaFunctionOverride, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, CordovaFunctionOverride, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
declare const window: any;
|
||||
@@ -96,7 +96,7 @@ export class Geofence extends IonicNativePlugin {
|
||||
* @return {Observable<any>}
|
||||
*/
|
||||
@CordovaFunctionOverride()
|
||||
onTransitionReceived(): Observable<any> { return; };
|
||||
onTransitionReceived(): Observable<any> { return; }
|
||||
|
||||
/**
|
||||
* Initializes the plugin. User will be prompted to allow the app to use location and notifications.
|
||||
@@ -104,7 +104,7 @@ export class Geofence extends IonicNativePlugin {
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
initialize(): Promise<void> { return; };
|
||||
initialize(): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Adds a new geofence or array of geofences. For geofence object, see above.
|
||||
@@ -112,7 +112,7 @@ export class Geofence extends IonicNativePlugin {
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
addOrUpdate(geofences: Object | Array<Object>): Promise<void> { return; };
|
||||
addOrUpdate(geofences: Object | Object[]): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Removes a geofence or array of geofences. `geofenceID` corresponds to one or more IDs specified when the
|
||||
@@ -121,7 +121,7 @@ export class Geofence extends IonicNativePlugin {
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
remove(geofenceId: string | Array<string>): Promise<void> { return; };
|
||||
remove(geofenceId: string | string[]): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Removes all geofences.
|
||||
@@ -129,7 +129,7 @@ export class Geofence extends IonicNativePlugin {
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
removeAll(): Promise<void> { return; };
|
||||
removeAll(): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Returns an array of geofences currently being monitored.
|
||||
@@ -137,7 +137,7 @@ export class Geofence extends IonicNativePlugin {
|
||||
* @returns {Promise<Array<string>>}
|
||||
*/
|
||||
@Cordova()
|
||||
getWatched(): Promise<string> { return; };
|
||||
getWatched(): Promise<string> { return; }
|
||||
|
||||
/**
|
||||
* Called when the user clicks a geofence notification. iOS and Android only.
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
declare const navigator: any;
|
||||
|
||||
export interface Coordinates {
|
||||
|
||||
/**
|
||||
* a double representing the position's latitude in decimal degrees.
|
||||
*/
|
||||
@@ -49,7 +48,6 @@ export interface Coordinates {
|
||||
* This value can be null.
|
||||
*/
|
||||
speed: number;
|
||||
|
||||
}
|
||||
|
||||
export interface Geoposition {
|
||||
@@ -65,7 +63,6 @@ export interface Geoposition {
|
||||
}
|
||||
|
||||
export interface PositionError {
|
||||
|
||||
/**
|
||||
* A code that indicates the error that occurred
|
||||
*/
|
||||
@@ -75,11 +72,9 @@ export interface PositionError {
|
||||
* A message that can describe the error that occurred
|
||||
*/
|
||||
message: string;
|
||||
|
||||
}
|
||||
|
||||
export interface GeolocationOptions {
|
||||
|
||||
/**
|
||||
* Is a positive long value indicating the maximum age in milliseconds of a
|
||||
* possible cached position that is acceptable to return. If set to 0, it
|
||||
@@ -107,7 +102,6 @@ export interface GeolocationOptions {
|
||||
* @type {boolean}
|
||||
*/
|
||||
enableHighAccuracy?: boolean;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -120,7 +114,7 @@ export interface GeolocationOptions {
|
||||
* For iOS you have to add this configuration to your configuration.xml file
|
||||
* ```xml
|
||||
* <edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
|
||||
* <string>We want your location! Best regards NSA</string>
|
||||
* <string>We use your location for full functionality of certain app features.</string>
|
||||
* </edit-config>
|
||||
* ```
|
||||
*
|
||||
@@ -161,13 +155,13 @@ export interface GeolocationOptions {
|
||||
plugin: 'cordova-plugin-geolocation',
|
||||
pluginRef: 'navigator.geolocation',
|
||||
repo: 'https://github.com/apache/cordova-plugin-geolocation',
|
||||
install: 'ionic cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION="To locate you"',
|
||||
install:
|
||||
'ionic cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION="To locate you"',
|
||||
installVariables: ['GEOLOCATION_USAGE_DESCRIPTION'],
|
||||
platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class Geolocation extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Get the device's current position.
|
||||
*
|
||||
@@ -177,7 +171,9 @@ export class Geolocation extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
getCurrentPosition(options?: GeolocationOptions): Promise<Geoposition> { return; }
|
||||
getCurrentPosition(options?: GeolocationOptions): Promise<Geoposition> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Watch the current device's position. Clear the watch by unsubscribing from
|
||||
@@ -198,12 +194,13 @@ export class Geolocation extends IonicNativePlugin {
|
||||
* @returns {Observable<Geoposition>} Returns an Observable that notifies with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or errors.
|
||||
*/
|
||||
watchPosition(options?: GeolocationOptions): Observable<Geoposition> {
|
||||
return new Observable<Geoposition>(
|
||||
(observer: any) => {
|
||||
let watchId = navigator.geolocation.watchPosition(observer.next.bind(observer), observer.next.bind(observer), options);
|
||||
return () => navigator.geolocation.clearWatch(watchId);
|
||||
}
|
||||
);
|
||||
return new Observable<Geoposition>((observer: any) => {
|
||||
const watchId = navigator.geolocation.watchPosition(
|
||||
observer.next.bind(observer),
|
||||
observer.next.bind(observer),
|
||||
options
|
||||
);
|
||||
return () => navigator.geolocation.clearWatch(watchId);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface GlobalizationOptions {
|
||||
formatLength: string;
|
||||
@@ -134,7 +134,7 @@ export class Globalization extends IonicNativePlugin {
|
||||
getDateNames(options: {
|
||||
type: string;
|
||||
item: string;
|
||||
}): Promise<{ value: Array<string> }> {
|
||||
}): Promise<{ value: string[] }> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Google Analytics
|
||||
@@ -20,7 +20,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
* this.ga.startTrackerWithId('YOUR_TRACKER_ID')
|
||||
* .then(() => {
|
||||
* console.log('Google analytics is ready now');
|
||||
this.ga.trackView('test');
|
||||
* this.ga.trackView('test');
|
||||
* // Tracker is ready
|
||||
* // You can now track pages or set additional information such as AppVersion or UserId
|
||||
* })
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
/**
|
||||
@@ -17,7 +17,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
* this.googleNearby.publish('Hello')
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
*
|
||||
* this.googleNearby.subscribe()
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
@@ -28,13 +28,13 @@ import { Observable } from 'rxjs/Observable';
|
||||
plugin: 'cordova-plugin-google-nearby',
|
||||
pluginRef: 'window.nearby',
|
||||
repo: 'https://github.com/hahahannes/cordova-plugin-google-nearby',
|
||||
install: 'ionic cordova plugin add cordova-plugin-google-nearby --variable API_KEY="123456789"',
|
||||
install:
|
||||
'ionic cordova plugin add cordova-plugin-google-nearby --variable API_KEY="123456789"',
|
||||
installVariables: ['API_KEY'],
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class GoogleNearby extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Publish a message
|
||||
* @param message {string} Message to publish
|
||||
@@ -45,9 +45,9 @@ export class GoogleNearby extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Subscribe to recieve messages
|
||||
* @return {Observable<any>} Returns an observable that emits recieved messages
|
||||
/**
|
||||
* Subscribe to receive messages
|
||||
* @return {Observable<any>} Returns an observable that emits received messages
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface ScoreData {
|
||||
|
||||
@@ -67,10 +67,10 @@ export interface Player {
|
||||
* The title of the player based on their gameplay activity. Not
|
||||
* all players have this and it may change over time.
|
||||
*/
|
||||
title: string|null;
|
||||
title: string | null;
|
||||
|
||||
/**
|
||||
* Retrieves the URI for loading this player's icon-size profile image.
|
||||
* Retrieves the URI for loading this player's icon-size profile image.
|
||||
* Returns null if the player has no profile image.
|
||||
*/
|
||||
iconImageUrl: string;
|
||||
@@ -101,12 +101,12 @@ export interface Player {
|
||||
* this.googlePlayGamesServices.auth()
|
||||
* .then(() => console.log('Logged in to Play Games Services'))
|
||||
* .catch(e) => console.log('Error logging in Play Games Services', e);
|
||||
*
|
||||
*
|
||||
* // Sign out of Play Games Services.
|
||||
* this.googlePlayGamesServices.signOut()
|
||||
* .then(() => console.log('Logged out of Play Games Services'))
|
||||
* .catch(e => console.log('Error logging out of Play Games Services', e);
|
||||
*
|
||||
*
|
||||
* // Check auth status.
|
||||
* this.googlePlayGamesServices.isSignedIn()
|
||||
* .then((signedIn: SignedInResponse) => {
|
||||
@@ -114,38 +114,38 @@ export interface Player {
|
||||
* hideLoginButton();
|
||||
* }
|
||||
* });
|
||||
*
|
||||
*
|
||||
* // Fetch currently authenticated user's data.
|
||||
* this.googlePlayGamesServices.showPlayer().then((data: Player) => {
|
||||
* console.log('Player data', data);
|
||||
* });
|
||||
*
|
||||
*
|
||||
* // Submit a score.
|
||||
* this.googlePlayGamesServices.submitScore({
|
||||
* score: 100,
|
||||
* leaderboardId: 'SomeLeaderboardId'
|
||||
* });
|
||||
*
|
||||
*
|
||||
* // Show the native leaderboards window.
|
||||
* this.googlePlayGamesServices.showAllLeaderboards()
|
||||
* .then(() => console.log('The leaderboard window is visible.'));
|
||||
*
|
||||
*
|
||||
* // Show a signle native leaderboard window.
|
||||
* this.googlePlayGamesServices.showLeaderboard({
|
||||
* leaderboardId: 'SomeLeaderBoardId'
|
||||
* }).then(() => console.log('The leaderboard window is visible.'));
|
||||
*
|
||||
*
|
||||
* // Unlock an achievement.
|
||||
* this.googlePlayGamesServices.unlockAchievement({
|
||||
* achievementId: 'SomeAchievementId'
|
||||
* }).then(() => console.log('Achievement unlocked'));
|
||||
*
|
||||
*
|
||||
* // Incremement an achievement.
|
||||
* this.googlePlayGamesServices.incrementAchievement({
|
||||
* step: 1,
|
||||
* achievementId: 'SomeAchievementId'
|
||||
* }).then(() => console.log('Achievement incremented'));
|
||||
*
|
||||
*
|
||||
* // Show the native achievements window.
|
||||
* this.googlePlayGamesServices.showAchivements()
|
||||
* .then(() => console.log('The achievements window is visible.'));
|
||||
@@ -165,7 +165,7 @@ export class GooglePlayGamesServices extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Initialise native Play Games Service login procedure.
|
||||
*
|
||||
*
|
||||
* @return {Promise<any>} Returns a promise that resolves when the player
|
||||
* is authenticated with Play Games Services.
|
||||
*/
|
||||
@@ -174,7 +174,7 @@ export class GooglePlayGamesServices extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Sign out of Google Play Games Services.
|
||||
*
|
||||
*
|
||||
* @return {Promise<any>} Returns a promise that resolve when the player
|
||||
* successfully signs out.
|
||||
*/
|
||||
@@ -183,7 +183,7 @@ export class GooglePlayGamesServices extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Check if the user is signed in.
|
||||
*
|
||||
*
|
||||
* @return {Promise<SignedInResponse>} Returns a promise that resolves with
|
||||
* the signed in response.
|
||||
*/
|
||||
@@ -192,8 +192,8 @@ export class GooglePlayGamesServices extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Show the currently authenticated player.
|
||||
*
|
||||
* @return {Promise<Player>} Returns a promise that resolves when Play
|
||||
*
|
||||
* @return {Promise<Player>} Returns a promise that resolves when Play
|
||||
* Games Services returns the authenticated player.
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -202,7 +202,7 @@ export class GooglePlayGamesServices extends IonicNativePlugin {
|
||||
/**
|
||||
* Submit a score to a leaderboard. You should ensure that you have a
|
||||
* successful return from auth() before submitting a score.
|
||||
*
|
||||
*
|
||||
* @param data {ScoreData} The score data you want to submit.
|
||||
* @return {Promise<any>} Returns a promise that resolves when the
|
||||
* score is submitted.
|
||||
@@ -213,7 +213,7 @@ export class GooglePlayGamesServices extends IonicNativePlugin {
|
||||
/**
|
||||
* Launches the native Play Games leaderboard view controller to show all the
|
||||
* leaderboards.
|
||||
*
|
||||
*
|
||||
* @return {Promise<any>} Returns a promise that resolves when the native
|
||||
* leaderboards window opens.
|
||||
*/
|
||||
@@ -223,7 +223,7 @@ export class GooglePlayGamesServices extends IonicNativePlugin {
|
||||
/**
|
||||
* Launches the native Play Games leaderboard view controll to show the
|
||||
* specified leaderboard.
|
||||
*
|
||||
*
|
||||
* @param data {LeaderboardData} The leaderboard you want to show.
|
||||
* @return {Promise<any>} Returns a promise that resolves when the native
|
||||
* leaderboard window opens.
|
||||
@@ -233,7 +233,7 @@ export class GooglePlayGamesServices extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Unlock an achievement.
|
||||
*
|
||||
*
|
||||
* @param data {AchievementData}
|
||||
* @return {Promise<any>} Returns a promise that resolves when the
|
||||
* achievement is unlocked.
|
||||
@@ -243,7 +243,7 @@ export class GooglePlayGamesServices extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Increment an achievement.
|
||||
*
|
||||
*
|
||||
* @param data {IncrementableAchievementData}
|
||||
* @return {Promise<any>} Returns a promise that resolves when the
|
||||
* achievement is incremented.
|
||||
@@ -254,7 +254,7 @@ export class GooglePlayGamesServices extends IonicNativePlugin {
|
||||
/**
|
||||
* Lauches the native Play Games achievements view controller to show
|
||||
* achievements.
|
||||
*
|
||||
*
|
||||
* @return {Promise<any>} Returns a promise that resolves when the
|
||||
* achievement window opens.
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Google Plus
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@@ -91,7 +91,7 @@ export class Gyroscope extends IonicNativePlugin {
|
||||
watch(options?: GyroscopeOptions): Observable<GyroscopeOrientation> {
|
||||
return new Observable<GyroscopeOrientation>(
|
||||
(observer: any) => {
|
||||
let watchId = navigator.gyroscope.watch(observer.next.bind(observer), observer.next.bind(observer), options);
|
||||
const watchId = navigator.gyroscope.watch(observer.next.bind(observer), observer.next.bind(observer), options);
|
||||
return () => navigator.gyroscope.clearWatch(watchId);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name hce
|
||||
@@ -45,7 +45,7 @@ export class HCE extends IonicNativePlugin {
|
||||
* Registers command receiver.
|
||||
* @param onCommand {HCECommandEvent} The event handler.
|
||||
* @param fail {Function} Error event handler.
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Cordova()
|
||||
registerCommandCallback(onCommand: HCECommandEvent, fail?: Function): void {
|
||||
@@ -55,7 +55,7 @@ export class HCE extends IonicNativePlugin {
|
||||
* Registers Deactivated receiver.
|
||||
* @param ok {HCEDeactivatedEvent} Success event handler.
|
||||
* @param fail {Function} Error event handler.
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Cordova()
|
||||
registerDeactivatedCallback(ok: HCEDeactivatedEvent, fail?: Function): void {
|
||||
@@ -68,7 +68,7 @@ export class HCE extends IonicNativePlugin {
|
||||
* @param response {Uint8Array} Response
|
||||
* @param success {string} Success Callback.
|
||||
* @param success {string} Failure Callback.
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Cordova()
|
||||
sendResponse(response: Uint8Array, success?: Function, failure?: Function): void {
|
||||
@@ -76,5 +76,5 @@ export class HCE extends IonicNativePlugin {
|
||||
}
|
||||
}
|
||||
|
||||
export interface HCECommandEvent { (command: Uint8Array): void; }
|
||||
export interface HCEDeactivatedEvent { (command: number): void; }
|
||||
export type HCECommandEvent = (command: Uint8Array) => void;
|
||||
export type HCEDeactivatedEvent = (command: number) => void;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Header Color
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
/**
|
||||
@@ -6,13 +6,13 @@ import { Injectable } from '@angular/core';
|
||||
*/
|
||||
export interface HealthDataType {
|
||||
/**
|
||||
* Read only date types (see https://github.com/dariosalvi78/cordova-plugin-health#supported-data-types)
|
||||
*/
|
||||
* Read only date types (see https://github.com/dariosalvi78/cordova-plugin-health#supported-data-types)
|
||||
*/
|
||||
read?: string[];
|
||||
|
||||
/**
|
||||
* Write only date types (see https://github.com/dariosalvi78/cordova-plugin-health#supported-data-types)
|
||||
*/
|
||||
* Write only date types (see https://github.com/dariosalvi78/cordova-plugin-health#supported-data-types)
|
||||
*/
|
||||
write?: string[];
|
||||
}
|
||||
|
||||
@@ -207,7 +207,6 @@ export interface HealthData {
|
||||
})
|
||||
@Injectable()
|
||||
export class Health extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Tells if either Google Fit or HealthKit are available.
|
||||
*
|
||||
@@ -216,7 +215,9 @@ export class Health extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
isAvailable(): Promise<boolean> { return; }
|
||||
isAvailable(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if recent Google Play Services and Google Fit are installed. If the play services are not installed,
|
||||
@@ -232,7 +233,9 @@ export class Health extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
promptInstallFit(): Promise<any> { return; }
|
||||
promptInstallFit(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests read and/or write access to a set of data types. It is recommendable to always explain why the app
|
||||
@@ -254,7 +257,9 @@ export class Health extends IonicNativePlugin {
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
requestAuthorization(datatypes: Array<string | HealthDataType>): Promise<any> { return; }
|
||||
requestAuthorization(datatypes: (string | HealthDataType)[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the app has authorization to read/write a set of datatypes.
|
||||
@@ -268,7 +273,9 @@ export class Health extends IonicNativePlugin {
|
||||
* @return {Promise<boolean>} Returns a promise that resolves with a boolean that indicates the authorization status
|
||||
*/
|
||||
@Cordova()
|
||||
isAuthorized(datatypes: Array<string | HealthDataType>): Promise<boolean> { return; }
|
||||
isAuthorized(datatypes: (string | HealthDataType)[]): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all the data points of a certain data type within a certain time window.
|
||||
@@ -302,7 +309,9 @@ export class Health extends IonicNativePlugin {
|
||||
* @return {Promise<HealthData[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
query(queryOptions: HealthQueryOptions): Promise<HealthData[]> { return; }
|
||||
query(queryOptions: HealthQueryOptions): Promise<HealthData[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets aggregated data in a certain time window. Usually the sum is returned for the given quantity.
|
||||
@@ -326,7 +335,11 @@ export class Health extends IonicNativePlugin {
|
||||
* @return {Promise<HealthData[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
queryAggregated(queryOptionsAggregated: HealthQueryOptionsAggregated): Promise<HealthData[]> { return; }
|
||||
queryAggregated(
|
||||
queryOptionsAggregated: HealthQueryOptionsAggregated
|
||||
): Promise<HealthData[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores a data point.
|
||||
@@ -343,6 +356,7 @@ export class Health extends IonicNativePlugin {
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
store(storeOptions: HealthStoreOptions): Promise<any> { return; }
|
||||
|
||||
store(storeOptions: HealthStoreOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin, CordovaCheck } from '@ionic-native/core';
|
||||
import { Cordova, CordovaCheck, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
declare var chcp: any;
|
||||
@@ -85,7 +85,7 @@ export interface HotCodePushEventData {
|
||||
details?: {
|
||||
error?: HotCodePushError;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Hot Code Push
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface HotspotConnectionInfo {
|
||||
|
||||
@@ -203,7 +203,7 @@ export class Hotspot extends IonicNativePlugin {
|
||||
* @returns {Promise<Array<HotspotDevice>>}
|
||||
*/
|
||||
@Cordova()
|
||||
getAllHotspotDevices(): Promise<Array<HotspotDevice>> { return; }
|
||||
getAllHotspotDevices(): Promise<HotspotDevice[]> { return; }
|
||||
|
||||
/**
|
||||
* Connect to a WiFi network
|
||||
@@ -235,7 +235,7 @@ export class Hotspot extends IonicNativePlugin {
|
||||
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
|
||||
*/
|
||||
@Cordova()
|
||||
connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: Array<string>): Promise<void> { return; }
|
||||
connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: string[]): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Add a WiFi network
|
||||
@@ -299,13 +299,13 @@ export class Hotspot extends IonicNativePlugin {
|
||||
* @returns {Promise<Array<HotspotNetwork>>}
|
||||
*/
|
||||
@Cordova()
|
||||
scanWifi(): Promise<Array<HotspotNetwork>> { return; }
|
||||
scanWifi(): Promise<HotspotNetwork[]> { return; }
|
||||
|
||||
/**
|
||||
* @returns {Promise<Array<HotspotNetwork>>}
|
||||
*/
|
||||
@Cordova()
|
||||
scanWifiByLevel(): Promise<Array<HotspotNetwork>> { return; }
|
||||
scanWifiByLevel(): Promise<HotspotNetwork[]> { return; }
|
||||
|
||||
/**
|
||||
* @returns {Promise<any>}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export interface HttpdOptions {
|
||||
@@ -56,7 +56,6 @@ export interface HttpdOptions {
|
||||
})
|
||||
@Injectable()
|
||||
export class Httpd extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Starts a web server.
|
||||
* @param options {HttpdOptions}
|
||||
@@ -66,20 +65,25 @@ export class Httpd extends IonicNativePlugin {
|
||||
observable: true,
|
||||
clearFunction: 'stopServer'
|
||||
})
|
||||
startServer(options?: HttpdOptions): Observable<string> { return; }
|
||||
startServer(options?: HttpdOptions): Observable<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the URL of the running server
|
||||
* @returns {Promise<string>} Returns a promise that resolves with the URL of the web server.
|
||||
*/
|
||||
@Cordova()
|
||||
getUrl(): Promise<string> { return; }
|
||||
getUrl(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the local path of the running webserver
|
||||
* @returns {Promise<string>} Returns a promise that resolves with the local path of the web server.
|
||||
*/
|
||||
*/
|
||||
@Cordova()
|
||||
getLocalPath(): Promise<string> { return; }
|
||||
|
||||
getLocalPath(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
@@ -56,8 +56,8 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
* this.hyperTrack.stopTracking().then(success => {
|
||||
* // Handle success (String). Should be "OK".
|
||||
* }, error => {});
|
||||
*
|
||||
* }, error => {});*
|
||||
*
|
||||
* }, error => {});*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, CordovaCheck, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
declare const cordova: any;
|
||||
@@ -266,7 +266,7 @@ export interface IBeaconDelegate {
|
||||
*
|
||||
* this.ibeacon.startMonitoringForRegion(beaconRegion)
|
||||
* .then(
|
||||
* () => console.log('Native layer recieved the request to monitoring'),
|
||||
* () => console.log('Native layer received the request to monitoring'),
|
||||
* error => console.error('Native layer failed to begin monitoring: ', error)
|
||||
* );
|
||||
* ```
|
||||
@@ -296,12 +296,12 @@ export class IBeacon extends IonicNativePlugin {
|
||||
*/
|
||||
@CordovaCheck({ sync: true })
|
||||
Delegate(): IBeaconDelegate {
|
||||
let delegate = new cordova.plugins.locationManager.Delegate();
|
||||
const delegate = new cordova.plugins.locationManager.Delegate();
|
||||
|
||||
delegate.didChangeAuthorizationStatus = (pluginResult?: IBeaconPluginResult) => {
|
||||
return new Observable<IBeaconPluginResult>(
|
||||
(observer: any) => {
|
||||
let cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return delegate.didChangeAuthorizationStatus = cb;
|
||||
}
|
||||
);
|
||||
@@ -310,7 +310,7 @@ export class IBeacon extends IonicNativePlugin {
|
||||
delegate.didDetermineStateForRegion = (pluginResult?: IBeaconPluginResult) => {
|
||||
return new Observable<IBeaconPluginResult>(
|
||||
(observer: any) => {
|
||||
let cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return delegate.didDetermineStateForRegion = cb;
|
||||
}
|
||||
);
|
||||
@@ -319,7 +319,7 @@ export class IBeacon extends IonicNativePlugin {
|
||||
delegate.didEnterRegion = (pluginResult?: IBeaconPluginResult) => {
|
||||
return new Observable<IBeaconPluginResult>(
|
||||
(observer: any) => {
|
||||
let cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return delegate.didEnterRegion = cb;
|
||||
}
|
||||
);
|
||||
@@ -328,7 +328,7 @@ export class IBeacon extends IonicNativePlugin {
|
||||
delegate.didExitRegion = (pluginResult?: IBeaconPluginResult) => {
|
||||
return new Observable<IBeaconPluginResult>(
|
||||
(observer: any) => {
|
||||
let cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return delegate.didExitRegion = cb;
|
||||
}
|
||||
);
|
||||
@@ -337,7 +337,7 @@ export class IBeacon extends IonicNativePlugin {
|
||||
delegate.didRangeBeaconsInRegion = (pluginResult?: IBeaconPluginResult) => {
|
||||
return new Observable<IBeaconPluginResult>(
|
||||
(observer: any) => {
|
||||
let cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return delegate.didRangeBeaconsInRegion = cb;
|
||||
}
|
||||
);
|
||||
@@ -346,7 +346,7 @@ export class IBeacon extends IonicNativePlugin {
|
||||
delegate.didStartMonitoringForRegion = (pluginResult?: IBeaconPluginResult) => {
|
||||
return new Observable<IBeaconPluginResult>(
|
||||
(observer: any) => {
|
||||
let cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return delegate.didStartMonitoringForRegion = cb;
|
||||
}
|
||||
);
|
||||
@@ -355,7 +355,7 @@ export class IBeacon extends IonicNativePlugin {
|
||||
delegate.monitoringDidFailForRegionWithError = (pluginResult?: IBeaconPluginResult) => {
|
||||
return new Observable<IBeaconPluginResult>(
|
||||
(observer: any) => {
|
||||
let cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return delegate.monitoringDidFailForRegionWithError = cb;
|
||||
}
|
||||
);
|
||||
@@ -364,7 +364,7 @@ export class IBeacon extends IonicNativePlugin {
|
||||
delegate.peripheralManagerDidStartAdvertising = (pluginResult?: IBeaconPluginResult) => {
|
||||
return new Observable<IBeaconPluginResult>(
|
||||
(observer: any) => {
|
||||
let cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return delegate.peripheralManagerDidStartAdvertising = cb;
|
||||
}
|
||||
);
|
||||
@@ -373,7 +373,7 @@ export class IBeacon extends IonicNativePlugin {
|
||||
delegate.peripheralManagerDidUpdateState = (pluginResult?: IBeaconPluginResult) => {
|
||||
return new Observable<IBeaconPluginResult>(
|
||||
(observer: any) => {
|
||||
let cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
const cb = (data: IBeaconPluginResult) => observer.next(data);
|
||||
return delegate.peripheralManagerDidUpdateState = cb;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
export interface ImagePickerOptions {
|
||||
|
||||
@@ -1,42 +1,47 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, CordovaInstance, InstanceCheck, IonicNativePlugin } from '@ionic-native/core';
|
||||
import {
|
||||
CordovaInstance,
|
||||
InstanceCheck,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
} from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Observer } from 'rxjs/Observer';
|
||||
|
||||
declare const cordova: Cordova & { InAppBrowser: any; };
|
||||
declare const cordova: Cordova & { InAppBrowser: any };
|
||||
|
||||
export interface InAppBrowserOptions {
|
||||
/** Set to yes or no to turn the InAppBrowser's location bar on or off. */
|
||||
location?: 'yes' | 'no';
|
||||
/** Set to yes to create the browser and load the page, but not show it. The loadstop event fires when loading is complete.
|
||||
/* Set to yes to create the browser and load the page, but not show it. The loadstop event fires when loading is complete.
|
||||
* Omit or set to no (default) to have the browser open and load normally. */
|
||||
hidden?: 'yes' | 'no';
|
||||
/** Set to yes to have the browser's cookie cache cleared before the new window is opened. */
|
||||
clearcache?: 'yes';
|
||||
/** Set to yes to have the session cookie cache cleared before the new window is opened. */
|
||||
/* Set to yes to have the session cookie cache cleared before the new window is opened. */
|
||||
clearsessioncache?: 'yes';
|
||||
/** (Android) Set to a string to use as the close button's caption instead of a X. Note that you need to localize this value yourself.
|
||||
/* (Android) Set to a string to use as the close button's caption instead of a X. Note that you need to localize this value yourself.
|
||||
* (iOS) Set to a string to use as the Done button's caption. Note that you need to localize this value yourself. */
|
||||
closebuttoncaption?: string;
|
||||
/** (Android) Set to a valid hex color string, for example: #00ff00, and it will change the close button color from default, regardless of being a text or default X. Only has effect if user has location set to yes.
|
||||
/* (Android) Set to a valid hex color string, for example: #00ff00, and it will change the close button color from default, regardless of being a text or default X. Only has effect if user has location set to yes.
|
||||
* (iOS) Set as a valid hex color string, for example: #00ff00, to change from the default Done button's color. Only applicable if toolbar is not disabled. */
|
||||
closebuttoncolor?: string;
|
||||
/** (Android Only) Set to yes to show Android browser's zoom controls, set to no to hide them. Default value is yes. */
|
||||
zoom?: 'yes' | 'no';
|
||||
/** (Android & Windows Phone Only) Set to yes to use the hardware back button to navigate backwards through the InAppBrowser's history.
|
||||
/* (Android & Windows Phone Only) Set to yes to use the hardware back button to navigate backwards through the InAppBrowser's history.
|
||||
* If there is no previous page, the InAppBrowser will close. The default value is yes, so you must set it to no if you want the back button to simply close the InAppBrowser. */
|
||||
hardwareback?: 'yes' | 'no';
|
||||
/** Set to yes to prevent HTML5 audio or video from autoplaying (defaults to no). */
|
||||
mediaPlaybackRequiresUserAction?: 'yes' | 'no';
|
||||
/** (Android) Set to yes to hide the navigation buttons on the location toolbar, only has effect if user has location set to yes. The default value is no.
|
||||
/* (Android) Set to yes to hide the navigation buttons on the location toolbar, only has effect if user has location set to yes. The default value is no.
|
||||
* (iOS) Set to yes or no to turn the toolbar navigation buttons on or off (defaults to no). Only applicable if toolbar is not disabled.*/
|
||||
hidenavigationbuttons?: 'yes' | 'no';
|
||||
/** (Android) Set to yes to hide the url bar on the location toolbar, only has effect if user has location set to yes. The default value is no.*/
|
||||
/* (Android) Set to yes to hide the url bar on the location toolbar, only has effect if user has location set to yes. The default value is no.*/
|
||||
hideurlbar?: 'yes' | 'no';
|
||||
/** (Android) Set to a valid hex color string, for example: #00ff00, and it will change the color of both navigation buttons from default. Only has effect if user has location set to yes and not hidenavigationbuttons set to yes.
|
||||
/* (Android) Set to a valid hex color string, for example: #00ff00, and it will change the color of both navigation buttons from default. Only has effect if user has location set to yes and not hidenavigationbuttons set to yes.
|
||||
* (iOS) Set as a valid hex color string, for example: #00ff00, to change from the default color. Only applicable if navigation buttons are visible. */
|
||||
navigationbuttoncolor?: string;
|
||||
/** (Android) Set to a valid hex color string, for example: #00ff00, and it will change the color the toolbar from default. Only has effect if user has location set to yes.
|
||||
/* (Android) Set to a valid hex color string, for example: #00ff00, and it will change the color the toolbar from default. Only has effect if user has location set to yes.
|
||||
* (iOS) Set as a valid hex color string, for example: #00ff00, to change from the default color of the toolbar. Only applicable if toolbar is not disabled.*/
|
||||
toolbarcolor?: string;
|
||||
/** (Android Only) Set to yes to make InAppBrowser WebView to pause/resume with the app to stop background audio (this may be required to avoid Google Play issues) */
|
||||
@@ -53,7 +58,7 @@ export interface InAppBrowserOptions {
|
||||
toolbartranslucent?: 'yes' | 'no';
|
||||
/** (iOS Only) Set to yes or no to prevent viewport scaling through a meta tag (defaults to no). */
|
||||
enableViewportScale?: 'yes' | 'no';
|
||||
/** (iOS Only) Set to yes or no to allow in-line HTML5 media playback, displaying within the browser window rather than a device-specific playback interface.
|
||||
/* (iOS Only) Set to yes or no to allow in-line HTML5 media playback, displaying within the browser window rather than a device-specific playback interface.
|
||||
* The HTML's video element must also include the webkit-playsinline attribute (defaults to no) */
|
||||
allowInlineMediaPlayback?: 'yes' | 'no';
|
||||
/** (iOS Only) Set to yes or no to open the keyboard when form elements receive focus via JavaScript's focus() call (defaults to yes). */
|
||||
@@ -68,7 +73,7 @@ export interface InAppBrowserOptions {
|
||||
toolbarposition?: 'top' | 'bottom';
|
||||
/** (iOS Only) Set to yes or no to change the visibility of the loading indicator (defaults to no). */
|
||||
hidespinner?: 'yes' | 'no';
|
||||
/** (Windows only) Set to yes to create the browser control without a border around it.
|
||||
/* (Windows only) Set to yes to create the browser control without a border around it.
|
||||
* Please note that if location=no is also specified, there will be no control presented to user to close IAB window. */
|
||||
fullscreen?: 'yes';
|
||||
/** (Android Only) Sets whether the WebView should enable support for the "viewport" HTML meta tag or should use a wide viewport. When the value of the setting is no, the layout width is always set to the width of the WebView control in device-independent (CSS) pixels. When the value is yes and the page contains the viewport meta tag, the value of the width specified in the tag is used. If the page does not contain the tag or does not provide a width, then a wide viewport will be used. (defaults to yes). */
|
||||
@@ -93,7 +98,6 @@ export interface InAppBrowserEvent extends Event {
|
||||
* @hidden
|
||||
*/
|
||||
export class InAppBrowserObject {
|
||||
|
||||
private _objectInstance: any;
|
||||
|
||||
/**
|
||||
@@ -107,20 +111,26 @@ export class InAppBrowserObject {
|
||||
* The options string must not contain any blank space, and each feature's
|
||||
* name/value pairs must be separated by a comma. Feature names are case insensitive.
|
||||
*/
|
||||
constructor(url: string, target?: string, options?: string | InAppBrowserOptions) {
|
||||
constructor(
|
||||
url: string,
|
||||
target?: string,
|
||||
options?: string | InAppBrowserOptions
|
||||
) {
|
||||
try {
|
||||
|
||||
if (options && typeof options !== 'string') {
|
||||
options = Object.keys(options).map((key: string) => `${key}=${(<InAppBrowserOptions>options)[key]}`).join(',');
|
||||
options = Object.keys(options)
|
||||
.map(
|
||||
(key: string) => `${key}=${(options as InAppBrowserOptions)[key]}`
|
||||
)
|
||||
.join(',');
|
||||
}
|
||||
|
||||
this._objectInstance = cordova.InAppBrowser.open(url, target, options);
|
||||
|
||||
} catch (e) {
|
||||
|
||||
window.open(url, target);
|
||||
console.warn('Native: InAppBrowser is not installed or you are running on a browser. Falling back to window.open.');
|
||||
|
||||
console.warn(
|
||||
'Native: InAppBrowser is not installed or you are running on a browser. Falling back to window.open.'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,20 +139,20 @@ export class InAppBrowserObject {
|
||||
* if the InAppBrowser was already visible.
|
||||
*/
|
||||
@CordovaInstance({ sync: true })
|
||||
show(): void { }
|
||||
show(): void {}
|
||||
|
||||
/**
|
||||
* Closes the InAppBrowser window.
|
||||
*/
|
||||
@CordovaInstance({ sync: true })
|
||||
close(): void { }
|
||||
close(): void {}
|
||||
|
||||
/**
|
||||
* Hides an InAppBrowser window that is currently shown. Calling this has no effect
|
||||
* if the InAppBrowser was already hidden.
|
||||
*/
|
||||
@CordovaInstance({ sync: true })
|
||||
hide(): void { }
|
||||
hide(): void {}
|
||||
|
||||
/**
|
||||
* Injects JavaScript code into the InAppBrowser window.
|
||||
@@ -150,7 +160,9 @@ export class InAppBrowserObject {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@CordovaInstance()
|
||||
executeScript(script: { file?: string, code?: string }): Promise<any> { return; }
|
||||
executeScript(script: { file?: string; code?: string }): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Injects CSS into the InAppBrowser window.
|
||||
@@ -158,7 +170,9 @@ export class InAppBrowserObject {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@CordovaInstance()
|
||||
insertCSS(css: { file?: string, code?: string }): Promise<any> { return; }
|
||||
insertCSS(css: { file?: string; code?: string }): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* A method that allows you to listen to events happening in the browser.
|
||||
@@ -167,10 +181,19 @@ export class InAppBrowserObject {
|
||||
*/
|
||||
@InstanceCheck()
|
||||
on(event: string): Observable<InAppBrowserEvent> {
|
||||
return new Observable<InAppBrowserEvent>((observer: Observer<InAppBrowserEvent>) => {
|
||||
this._objectInstance.addEventListener(event, observer.next.bind(observer));
|
||||
return () => this._objectInstance.removeEventListener(event, observer.next.bind(observer));
|
||||
});
|
||||
return new Observable<InAppBrowserEvent>(
|
||||
(observer: Observer<InAppBrowserEvent>) => {
|
||||
this._objectInstance.addEventListener(
|
||||
event,
|
||||
observer.next.bind(observer)
|
||||
);
|
||||
return () =>
|
||||
this._objectInstance.removeEventListener(
|
||||
event,
|
||||
observer.next.bind(observer)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,7 +237,6 @@ export class InAppBrowserObject {
|
||||
})
|
||||
@Injectable()
|
||||
export class InAppBrowser extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Opens a URL in a new InAppBrowser instance, the current browser instance, or the system browser.
|
||||
* @param url {string} The URL to load.
|
||||
@@ -224,8 +246,11 @@ export class InAppBrowser extends IonicNativePlugin {
|
||||
* name/value pairs must be separated by a comma. Feature names are case insensitive.
|
||||
* @returns {InAppBrowserObject}
|
||||
*/
|
||||
create(url: string, target?: string, options?: string | InAppBrowserOptions): InAppBrowserObject {
|
||||
create(
|
||||
url: string,
|
||||
target?: string,
|
||||
options?: string | InAppBrowserOptions
|
||||
): InAppBrowserObject {
|
||||
return new InAppBrowserObject(url, target, options);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Plugin, IonicNativePlugin, Cordova, CordovaProperty } from '@ionic-native/core';
|
||||
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
/**
|
||||
@@ -77,7 +77,7 @@ export interface IAPProductOptions {
|
||||
type: string;
|
||||
}
|
||||
|
||||
export type IAPProducts = Array<IAPProduct> & {
|
||||
export type IAPProducts = IAPProduct[] & {
|
||||
/**
|
||||
* Get product by ID
|
||||
*/
|
||||
@@ -383,7 +383,7 @@ export class InAppPurchase2 extends IonicNativePlugin {
|
||||
* Add or register a product
|
||||
* @param product {IAPProductOptions}
|
||||
*/
|
||||
@Cordova({ sync: true})
|
||||
@Cordova({ sync: true })
|
||||
register(product: IAPProductOptions): void {}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
+3
-4
@@ -1,6 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
/* tslint:disable */
|
||||
/**
|
||||
* @name In App Review
|
||||
* @description
|
||||
@@ -25,6 +25,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
/* tslint:enable */
|
||||
@Plugin({
|
||||
pluginName: 'InAppReview',
|
||||
plugin: 'com.omarben.inappreview',
|
||||
@@ -34,7 +35,6 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
})
|
||||
@Injectable()
|
||||
export class InAppReview extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Open the inApp review popup
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
@@ -43,5 +43,4 @@ export class InAppReview extends IonicNativePlugin {
|
||||
requestReview(): Promise<any> {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,10 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, CordovaFunctionOverride, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import {
|
||||
Cordova,
|
||||
CordovaFunctionOverride,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
} from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export interface IndexItem {
|
||||
@@ -16,7 +21,7 @@ export interface IndexItem {
|
||||
/**
|
||||
* Item keywords
|
||||
*/
|
||||
keywords?: Array<string>;
|
||||
keywords?: string[];
|
||||
|
||||
/**
|
||||
* Lifetime in minutes
|
||||
@@ -88,7 +93,7 @@ export class IndexAppContent extends IonicNativePlugin {
|
||||
* @return {Promise<any>} Returns if index set was successful
|
||||
*/
|
||||
@Cordova()
|
||||
setItems(items: Array<IndexItem>): Promise<any> {
|
||||
setItems(items: IndexItem[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -98,7 +103,7 @@ export class IndexAppContent extends IonicNativePlugin {
|
||||
* @return {Promise<any>} Resolve if successful
|
||||
*/
|
||||
@Cordova()
|
||||
clearItemsForDomains(domains: Array<string>): Promise<any> {
|
||||
clearItemsForDomains(domains: string[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -108,11 +113,11 @@ export class IndexAppContent extends IonicNativePlugin {
|
||||
* @return {Promise<any>} Resolve if successful
|
||||
*/
|
||||
@Cordova()
|
||||
clearItemsForIdentifiers(identifiers: Array<string>): Promise<any> {
|
||||
clearItemsForIdentifiers(identifiers: string[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* If user taps on a search result in spotlight then the app will be launched.
|
||||
* You can register a Javascript handler to get informed when this happens.
|
||||
* @returns {Observable<any>} returns an observable that notifies you when he user presses on the home screen icon
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Instagram
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
declare const window: any;
|
||||
|
||||
export interface IntelSecurityDataOptions {
|
||||
/** Non-empty string. **/
|
||||
/* Non-empty string. **/
|
||||
data: String;
|
||||
/** Tag text. */
|
||||
tag?: String;
|
||||
@@ -76,7 +76,6 @@ export interface IntelSecurityDataOptions {
|
||||
})
|
||||
@Injectable()
|
||||
export class IntelSecurity extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* returns an IntelSecurityStorage object
|
||||
* @type {IntelSecurityStorage}
|
||||
@@ -88,7 +87,6 @@ export class IntelSecurity extends IonicNativePlugin {
|
||||
* @type {IntelSecurityData}
|
||||
*/
|
||||
data: IntelSecurityData = new IntelSecurityData();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -100,14 +98,15 @@ export class IntelSecurity extends IonicNativePlugin {
|
||||
pluginRef: 'intel.security.secureData'
|
||||
})
|
||||
export class IntelSecurityData {
|
||||
|
||||
/**
|
||||
* This creates a new instance of secure data using plain-text data.
|
||||
* @param options {IntelSecurityDataOptions}
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the instanceID of the created data instance, or rejects with an error.
|
||||
*/
|
||||
* This creates a new instance of secure data using plain-text data.
|
||||
* @param options {IntelSecurityDataOptions}
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the instanceID of the created data instance, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
createFromData(options: IntelSecurityDataOptions): Promise<Number> { return; }
|
||||
createFromData(options: IntelSecurityDataOptions): Promise<Number> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This creates a new instance of secure data (using sealed data)
|
||||
@@ -116,7 +115,9 @@ export class IntelSecurityData {
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the instanceID of the created data instance, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
createFromSealedData(options: { sealedData: string }): Promise<Number> { return; }
|
||||
createFromSealedData(options: { sealedData: string }): Promise<Number> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This returns the plain-text data of the secure data instance.
|
||||
@@ -124,7 +125,9 @@ export class IntelSecurityData {
|
||||
* @returns {Promise<string>} Returns a Promise that resolves to the data as plain-text, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getData(instanceID: Number): Promise<string> { return; }
|
||||
getData(instanceID: Number): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This returns the sealed chunk of a secure data instance.
|
||||
@@ -132,7 +135,9 @@ export class IntelSecurityData {
|
||||
* @returns {Promise<any>} Returns a Promise that resolves to the sealed data, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getSealedData(instanceID: any): Promise<any> { return; }
|
||||
getSealedData(instanceID: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This returns the tag of the secure data instance.
|
||||
@@ -140,7 +145,9 @@ export class IntelSecurityData {
|
||||
* @returns {Promise<string>} Returns a Promise that resolves to the tag, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getTag(instanceID: any): Promise<string> { return; }
|
||||
getTag(instanceID: any): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This returns the data policy of the secure data instance.
|
||||
@@ -148,7 +155,9 @@ export class IntelSecurityData {
|
||||
* @returns {Promise<any>} Returns a promise that resolves to the policy object, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getPolicy(instanceID: any): Promise<any> { return; }
|
||||
getPolicy(instanceID: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This returns an array of the data owners unique IDs.
|
||||
@@ -156,7 +165,9 @@ export class IntelSecurityData {
|
||||
* @returns {Promise<Array>} Returns a promise that resolves to an array of owners' unique IDs, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getOwners(instanceID: any): Promise<Array<any>> { return; }
|
||||
getOwners(instanceID: any): Promise<any[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This returns the data creator unique ID.
|
||||
@@ -164,7 +175,9 @@ export class IntelSecurityData {
|
||||
* @returns {Promise<Number>} Returns a promsie that resolves to the creator's unique ID, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getCreator(instanceID: any): Promise<Number> { return; }
|
||||
getCreator(instanceID: any): Promise<Number> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This returns an array of the trusted web domains of the secure data instance.
|
||||
@@ -172,7 +185,9 @@ export class IntelSecurityData {
|
||||
* @returns {Promise<Array>} Returns a promise that resolves to a list of web owners, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
getWebOwners(instanceID: any): Promise<Array<any>> { return; }
|
||||
getWebOwners(instanceID: any): Promise<any[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This changes the extra key of a secure data instance. To successfully replace the extra key, the calling application must have sufficient access to the plain-text data.
|
||||
@@ -182,7 +197,9 @@ export class IntelSecurityData {
|
||||
* @returns {Promise<any>} Returns a promise that resolves with no parameters, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
changeExtraKey(options: any): Promise<any> { return; }
|
||||
changeExtraKey(options: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This releases a secure data instance.
|
||||
@@ -190,8 +207,9 @@ export class IntelSecurityData {
|
||||
* @returns {Promise<any>} Returns a promise that resovles with no parameters, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
destroy(instanceID: any): Promise<any> { return; }
|
||||
|
||||
destroy(instanceID: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -203,7 +221,6 @@ export class IntelSecurityData {
|
||||
pluginRef: 'intel.security.secureStorage'
|
||||
})
|
||||
export class IntelSecurityStorage {
|
||||
|
||||
/**
|
||||
* This deletes a secure storage resource (indicated by id).
|
||||
* @param options {Object}
|
||||
@@ -212,10 +229,9 @@ export class IntelSecurityStorage {
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with no parameters, or rejects with an error.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
delete(options: {
|
||||
id: string,
|
||||
storageType?: Number
|
||||
}): Promise<any> { return; }
|
||||
delete(options: { id: string; storageType?: Number }): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This reads the data from secure storage (indicated by id) and creates a new secure data instance.
|
||||
@@ -227,10 +243,12 @@ export class IntelSecurityStorage {
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
read(options: {
|
||||
id: string,
|
||||
storageType?: Number,
|
||||
extraKey?: Number
|
||||
}): Promise<Number> { return; }
|
||||
id: string;
|
||||
storageType?: Number;
|
||||
extraKey?: Number;
|
||||
}): Promise<Number> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This writes the data contained in a secure data instance into secure storage.
|
||||
@@ -242,9 +260,10 @@ export class IntelSecurityStorage {
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
write(options: {
|
||||
id: String,
|
||||
instanceID: Number,
|
||||
storageType?: Number
|
||||
}): Promise<any> { return; }
|
||||
|
||||
id: String;
|
||||
instanceID: Number;
|
||||
storageType?: Number;
|
||||
}): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name jAnalytics
|
||||
* @description
|
||||
* This plugin does something
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { JAnalytics } from '@ionic-native/JAnalytics';
|
||||
*
|
||||
*
|
||||
* constructor(private jAnalytics: JAnalytics) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.jAnalytics.functionName('Hello', 123)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'JAnalytics',
|
||||
plugin: 'cordova-plugin-janalytics',
|
||||
pluginRef: 'JAnalytics',
|
||||
repo: 'https://github.com/jpush/cordova-plugin-janalytics',
|
||||
install:
|
||||
'ionic cordova plugin add cordova-plugin-janalytics --variable APP_KEY=YOUR_APP_KEY',
|
||||
installVariables: ['APP_KEY'],
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class JAnalytics extends IonicNativePlugin {
|
||||
/**
|
||||
* This function does something
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
init(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
initCrashHandler(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
stopCrashHandler(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
onPageStart(params: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
onPageEnd(params: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
addCountEvent(params: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
addCalculateEvent(params: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
addLoginEvent(params: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
addRegisterEvent(params: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
addBrowseEvent(params: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
addPurchaseEvent(params: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,10 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
|
||||
import {
|
||||
Cordova,
|
||||
CordovaCheck,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
} from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
declare const cordova: any;
|
||||
@@ -44,12 +49,14 @@ export class JinsMeme extends IonicNativePlugin {
|
||||
* Must call this method first.
|
||||
* Sign up for an app ID (and get an app/client secret) at developers.jins.com
|
||||
*
|
||||
*@param {string} setAppClientID
|
||||
*@param {string} clientSecret
|
||||
*@returns {Promise<any>}
|
||||
* @param {string} setAppClientID
|
||||
* @param {string} clientSecret
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setAppClientID(appClientId: string, clientSecret: string): Promise<any> { return; }
|
||||
setAppClientID(appClientId: string, clientSecret: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Starts scanning for JINS MEME.
|
||||
* @returns {Observable<any>}
|
||||
@@ -59,13 +66,17 @@ export class JinsMeme extends IonicNativePlugin {
|
||||
clearFunction: 'stopScan',
|
||||
clearWithArgs: true
|
||||
})
|
||||
startScan(): Observable<any> { return; }
|
||||
startScan(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Stops scanning JINS MEME.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
stopScan(): Promise<any> { return; }
|
||||
stopScan(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Establishes connection to JINS MEME.
|
||||
* @param {string} target
|
||||
@@ -76,29 +87,40 @@ export class JinsMeme extends IonicNativePlugin {
|
||||
})
|
||||
connect(target: string): Observable<any> {
|
||||
return new Observable<any>((observer: any) => {
|
||||
let data = cordova.plugins.JinsMemePlugin.connect(target, observer.next.bind(observer), observer.complete.bind(observer), observer.error.bind(observer));
|
||||
const data = cordova.plugins.JinsMemePlugin.connect(
|
||||
target,
|
||||
observer.next.bind(observer),
|
||||
observer.complete.bind(observer),
|
||||
observer.error.bind(observer)
|
||||
);
|
||||
return data;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Set auto connection mode.
|
||||
*@param {Boolean} flag
|
||||
*@returns {Promise<any>}
|
||||
* @param {Boolean} flag
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setAutoConnect(flag: boolean): Promise<any> { return; }
|
||||
setAutoConnect(flag: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Returns whether a connection to JINS MEME has been established.
|
||||
*@returns {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
isConnected(): Promise<any> { return; }
|
||||
isConnected(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Disconnects from JINS MEME.
|
||||
*@returns {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
disconnect(): Promise<any> { return; }
|
||||
disconnect(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Starts receiving realtime data.
|
||||
* @returns {Observable<any>}
|
||||
@@ -108,60 +130,80 @@ export class JinsMeme extends IonicNativePlugin {
|
||||
clearFunction: 'stopDataReport',
|
||||
clearWithArgs: true
|
||||
})
|
||||
startDataReport(): Observable<any> { return; }
|
||||
startDataReport(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Stops receiving data.
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
* Stops receiving data.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
stopDataReport(): Promise<any> { return; }
|
||||
stopDataReport(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Returns SDK version.
|
||||
*
|
||||
*@returns {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getSDKVersion(): Promise<any> { return; }
|
||||
getSDKVersion(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Returns JINS MEME connected with other apps.
|
||||
*@returns {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getConnectedByOthers(): Promise<any> { return; }
|
||||
getConnectedByOthers(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Returns calibration status
|
||||
*@returns {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
isCalibrated(): Promise<any> { return; }
|
||||
isCalibrated(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Returns device type.
|
||||
*@returns {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getConnectedDeviceType(): Promise<any> { return; }
|
||||
getConnectedDeviceType(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Returns hardware version.
|
||||
*@returns {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getConnectedDeviceSubType(): Promise<any> { return; }
|
||||
getConnectedDeviceSubType(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Returns FW Version.
|
||||
*@returns {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getFWVersion(): Promise<any> { return; }
|
||||
getFWVersion(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Returns HW Version.
|
||||
*@returns {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getHWVersion(): Promise<any> { return; }
|
||||
getHWVersion(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Returns response about whether data was received or not.
|
||||
*@returns {Promise<any>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
isDataReceiving(): Promise<any> { return; }
|
||||
isDataReceiving(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
|
||||
/**
|
||||
* @name Keyboard
|
||||
* @description
|
||||
* Keyboard plugin for Cordova.
|
||||
*
|
||||
* Requires Cordova plugin: `ionic-plugin-keyboard`. For more info, please see the [Keyboard plugin docs](https://github.com/ionic-team/ionic-plugin-keyboard).
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-ionic-keyboard`. For more info, please see the [Keyboard plugin docs](https://github.com/ionic-team/cordova-plugin-ionic-keyboard).
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
@@ -20,54 +19,61 @@ import { Observable } from 'rxjs/Observable';
|
||||
*
|
||||
* this.keyboard.show();
|
||||
*
|
||||
* this.keyboard.close();
|
||||
* this.keyboard.hide();
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Keyboard',
|
||||
plugin: 'ionic-plugin-keyboard',
|
||||
pluginRef: 'cordova.plugins.Keyboard',
|
||||
repo: 'https://github.com/ionic-team/ionic-plugin-keyboard',
|
||||
platforms: ['Android', 'BlackBerry 10', 'iOS', 'Windows']
|
||||
plugin: 'cordova-plugin-ionic-keyboard',
|
||||
pluginRef: 'window.Keyboard',
|
||||
repo: 'https://github.com/ionic-team/cordova-plugin-ionic-keyboard',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Keyboard extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Check keyboard status visible or not.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
@CordovaProperty
|
||||
isVisible: boolean;
|
||||
|
||||
/**
|
||||
* Hide the keyboard accessory bar with the next, previous and done buttons.
|
||||
* @param hide {boolean}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
hideKeyboardAccessoryBar(hide: boolean): void { }
|
||||
hideFormAccessoryBar(hide: boolean): void {}
|
||||
|
||||
/**
|
||||
* Hide the keyboard if shown.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
hide(): void {}
|
||||
|
||||
/**
|
||||
* Force keyboard to be shown.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
platforms: ['Android', 'BlackBerry 10', 'Windows']
|
||||
platforms: ['Android']
|
||||
})
|
||||
show(): void { }
|
||||
show(): void {}
|
||||
|
||||
/**
|
||||
* Close the keyboard if open.
|
||||
* Programmatically set the resize mode
|
||||
* @param mode {string}
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
||||
platforms: ['iOS']
|
||||
})
|
||||
close(): void { }
|
||||
|
||||
/**
|
||||
* Prevents the native UIScrollView from moving when an input is focused.
|
||||
* @param disable {boolean}
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
platforms: ['iOS', 'Windows']
|
||||
})
|
||||
disableScroll(disable: boolean): void { }
|
||||
setResizeMode(mode: string): void {}
|
||||
|
||||
/**
|
||||
* Creates an observable that notifies you when the keyboard is shown. Unsubscribe to observable to cancel event watch.
|
||||
@@ -76,9 +82,24 @@ export class Keyboard extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'native.keyboardshow',
|
||||
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
onKeyboardShow(): Observable<any> { return; }
|
||||
onKeyboardShow(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an observable that notifies you when the keyboard will show. Unsubscribe to observable to cancel event watch.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'keyboardWillShow',
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
onKeyboardWillShow(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an observable that notifies you when the keyboard is hidden. Unsubscribe to observable to cancel event watch.
|
||||
@@ -87,8 +108,22 @@ export class Keyboard extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'native.keyboardhide',
|
||||
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
onKeyboardHide(): Observable<any> { return; }
|
||||
onKeyboardHide(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an observable that notifies you when the keyboard will hide. Unsubscribe to observable to cancel event watch.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'keyboardWillHide',
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
onKeyboardWillHide(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Keychain Touch Id
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export interface LastCamStartupOptions {
|
||||
/** The left edge in pixels, default 0 */
|
||||
x?: number;
|
||||
|
||||
/** The top edge in pixels, default 0 */
|
||||
y?: number;
|
||||
|
||||
/** The width in pixels, default window.screen.width */
|
||||
width?: number;
|
||||
|
||||
/** The height in pixels, default window.screen.height */
|
||||
height?: number;
|
||||
|
||||
/** Choose the camera to use 'front' or 'back', default 'front' */
|
||||
camera?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name LastCam
|
||||
* @description
|
||||
* Last Cam is a Camera Preview plugin that allows you to take capture both Videos and images in a
|
||||
* custom html preview of your choice.
|
||||
*
|
||||
* @interfaces
|
||||
* LastCamStartupOptions
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'LastCam',
|
||||
plugin: 'cordova-plugin-last-cam',
|
||||
pluginRef: 'LastCam',
|
||||
repo: 'https://github.com/bengejd/cordova-plugin-last-cam',
|
||||
platforms: ['iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class LastCam extends IonicNativePlugin {
|
||||
/**
|
||||
* Starts the camera preview instance.
|
||||
* @param {LastCamStartupOptions} options
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
})
|
||||
startCamera(options: LastCamStartupOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops the camera preview instance. (iOS)
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
stopCamera(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Switch from the rear camera and front camera, if available.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
switchCamera(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Switch the flash mode.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
switchFlash(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Take the picture (base64)
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 1
|
||||
})
|
||||
takePicture(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Start the video capture
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
startVideoCapture(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops the video capture
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 1
|
||||
})
|
||||
stopVideoCapture(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Promise of the recordingTimer.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 1
|
||||
})
|
||||
recordingTimer(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Observable of the recordingTimer.
|
||||
* @return {Observable<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 1,
|
||||
observable: true
|
||||
})
|
||||
watchRecordingTimer(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface PromptsOptions {
|
||||
|
||||
@@ -223,13 +223,13 @@ export interface UserPrompted {
|
||||
* Sets flag indicating user has already been prompted whether to remember their choice a preferred navigator app.
|
||||
* @param callback - function to call once operation is complete.
|
||||
*/
|
||||
set: ( callback: () => void) => void;
|
||||
set: (callback: () => void) => void;
|
||||
|
||||
/**
|
||||
* Clears flag which indicates if user has already been prompted whether to remember their choice a preferred navigator app.
|
||||
* @param callback - function to call once operation is complete.
|
||||
*/
|
||||
clear: ( callback: () => void) => void;
|
||||
clear: (callback: () => void) => void;
|
||||
}
|
||||
|
||||
export interface AppSelection {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Launch Review
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user