mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-07-16 00:00:04 +08:00
Compare commits
155
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aad814fcf1 | ||
|
|
03d6b2373c | ||
|
|
d82e675442 | ||
|
|
1e84e23fd9 | ||
|
|
f3f12cb306 | ||
|
|
b3bd0a83c7 | ||
|
|
03e4f0e439 | ||
|
|
a73146648f | ||
|
|
d90724ef70 | ||
|
|
be0dc3dac4 | ||
|
|
a0a64da518 | ||
|
|
591ee87e05 | ||
|
|
8db1dbef71 | ||
|
|
73ae92d77c | ||
|
|
3c2753df64 | ||
|
|
9035476833 | ||
|
|
5f5e605e66 | ||
|
|
ea6746d134 | ||
|
|
753fa4a7a4 | ||
|
|
ff784a4377 | ||
|
|
0764e28408 | ||
|
|
0197c88a03 | ||
|
|
5825932e03 | ||
|
|
bccc8ac379 | ||
|
|
3eb382d438 | ||
|
|
ca9a702808 | ||
|
|
3f415f9bef | ||
|
|
0c6d1eabe2 | ||
|
|
61fecf511b | ||
|
|
2ac52822b8 | ||
|
|
229b62c10b | ||
|
|
9b4fd02fa5 | ||
|
|
d10777a33b | ||
|
|
4f26069ca6 | ||
|
|
40571e5c99 | ||
|
|
83194f616b | ||
|
|
b1f4df530a | ||
|
|
4297c3d43e | ||
|
|
95d495b468 | ||
|
|
f0989d1b96 | ||
|
|
c113417878 | ||
|
|
cedd6df423 | ||
|
|
4b14ce2eec | ||
|
|
27d380ef4b | ||
|
|
bd5bd7ea9d | ||
|
|
c6713862c5 | ||
|
|
3b32e19bf1 | ||
|
|
4092831754 | ||
|
|
c2fe5f8336 | ||
|
|
3f9067d090 | ||
|
|
36a4e81fe4 | ||
|
|
79cb478c26 | ||
|
|
b635ba99ea | ||
|
|
0f84249b13 | ||
|
|
80adfe0891 | ||
|
|
0550a4fcc1 | ||
|
|
e50ef18e10 | ||
|
|
b581a5b2b6 | ||
|
|
e640983340 | ||
|
|
a6c8045593 | ||
|
|
ecc698ee7a | ||
|
|
b66d27b794 | ||
|
|
c3a9296a36 | ||
|
|
565c766813 | ||
|
|
1684202629 | ||
|
|
d95a359719 | ||
|
|
12ddf96705 | ||
|
|
fead657fbd | ||
|
|
f1d8d3b255 | ||
|
|
6af01d2dc1 | ||
|
|
006ba4425f | ||
|
|
4f415892b1 | ||
|
|
713efd7206 | ||
|
|
3f9311090d | ||
|
|
28a1b83d1d | ||
|
|
956e644fa4 | ||
|
|
f62a123a34 | ||
|
|
8e1ca359ab | ||
|
|
61714ff7ca | ||
|
|
9f9a3461f7 | ||
|
|
22ffb4914f | ||
|
|
3ed896960e | ||
|
|
249d62d4ba | ||
|
|
1d71bdc284 | ||
|
|
189d66cc47 | ||
|
|
fe5b7ce0af | ||
|
|
98d44e6294 | ||
|
|
8d571989d4 | ||
|
|
e61d574849 | ||
|
|
fdd63153e0 | ||
|
|
9dd4ecde9c | ||
|
|
dd9ba0ad3f | ||
|
|
9f662b6a04 | ||
|
|
1dc48e943c | ||
|
|
15a334d87a | ||
|
|
4d742438b4 | ||
|
|
1013a7d38a | ||
|
|
c574428e0e | ||
|
|
ce3591200e | ||
|
|
fc088f8431 | ||
|
|
392bc5c80a | ||
|
|
31fc892b70 | ||
|
|
5794d249c4 | ||
|
|
3f8a6f2425 | ||
|
|
dd769b0226 | ||
|
|
8460e6838a | ||
|
|
03e6afbad4 | ||
|
|
be370a4f99 | ||
|
|
bb9c581f42 | ||
|
|
d988e12353 | ||
|
|
df254de88b | ||
|
|
5803c069a3 | ||
|
|
dfbbfc7bd5 | ||
|
|
16980f1b6a | ||
|
|
3311d73730 | ||
|
|
a4cc7f7ae1 | ||
|
|
e6b02b1875 | ||
|
|
c03b73f69c | ||
|
|
05423ce299 | ||
|
|
34aeb19628 | ||
|
|
d6a9ed134e | ||
|
|
a0183811f6 | ||
|
|
e6d4b41e7e | ||
|
|
400dbcb1fb | ||
|
|
ae6e28de88 | ||
|
|
58615f1cab | ||
|
|
7c355350fe | ||
|
|
defb276b22 | ||
|
|
e6db28123d | ||
|
|
714114d1e0 | ||
|
|
37ef2fc93f | ||
|
|
41a4a43c0c | ||
|
|
5f41ef1cbc | ||
|
|
cea1dc14d3 | ||
|
|
49ad2118a3 | ||
|
|
bfe5ae9cf2 | ||
|
|
47f739777e | ||
|
|
a1c54f36b4 | ||
|
|
22d5d92dd3 | ||
|
|
3fa2eff580 | ||
|
|
567f525837 | ||
|
|
24cd0a91c4 | ||
|
|
50c8c154e3 | ||
|
|
1bfe82959b | ||
|
|
35e5cfe102 | ||
|
|
a1e6befbc0 | ||
|
|
234b6ffd44 | ||
|
|
5387bc985a | ||
|
|
8b1bb3ba17 | ||
|
|
a6450c6d07 | ||
|
|
d68a0373e8 | ||
|
|
8cd2da1c5b | ||
|
|
633e9d8e9a | ||
|
|
30f5b71f4a | ||
|
|
5dede9b536 |
@@ -5,3 +5,4 @@ node_modules/
|
||||
aot/
|
||||
scripts/ionic-native-bower
|
||||
dist/
|
||||
|
||||
|
||||
+219
-52
@@ -1,15 +1,200 @@
|
||||
<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)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **in-app-browser:** fix mandatory options ([#2684](https://github.com/ionic-team/ionic-native/issues/2684)) ([d82e675](https://github.com/ionic-team/ionic-native/commit/d82e675))
|
||||
|
||||
|
||||
|
||||
<a name="4.12.1"></a>
|
||||
## [4.12.1](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.15...v4.12.1) (2018-08-31)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **open-native-settings:** allow supported input ([#2666](https://github.com/ionic-team/ionic-native/issues/2666)) ([be0dc3d](https://github.com/ionic-team/ionic-native/commit/be0dc3d))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **aes256:** Added new utility methods to generate secure key and secure IV ([#2675](https://github.com/ionic-team/ionic-native/issues/2675)) ([a731466](https://github.com/ionic-team/ionic-native/commit/a731466))
|
||||
* **in-app-browser:** Add missing InAppBrowserOptions-properties ([#2669](https://github.com/ionic-team/ionic-native/issues/2669)) ([d90724e](https://github.com/ionic-team/ionic-native/commit/d90724e))
|
||||
* **push:** Added voip property to IOSPushOptions ([#2681](https://github.com/ionic-team/ionic-native/issues/2681)) ([03e4f0e](https://github.com/ionic-team/ionic-native/commit/03e4f0e))
|
||||
|
||||
|
||||
|
||||
<a name="5.0.0-beta.15"></a>
|
||||
# [5.0.0-beta.15](https://github.com/ionic-team/ionic-native/compare/v4.12.0...v5.0.0-beta.15) (2018-08-25)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **bluetooth-le:** add bluetooth-le plugin ([#2651](https://github.com/ionic-team/ionic-native/issues/2651)) ([591ee87](https://github.com/ionic-team/ionic-native/commit/591ee87))
|
||||
* **http:** add setSSLCertMode function ([8db1dbe](https://github.com/ionic-team/ionic-native/commit/8db1dbe))
|
||||
|
||||
|
||||
|
||||
<a name="4.12.0"></a>
|
||||
# [4.12.0](https://github.com/ionic-team/ionic-native/compare/v4.11.0...v4.12.0) (2018-08-16)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **extended-device-information:** Fixed Memory Display Bug ([#2641](https://github.com/ionic-team/ionic-native/issues/2641)) ([2ac5282](https://github.com/ionic-team/ionic-native/commit/2ac5282))
|
||||
* **network:** bind listener to document instead of window ([#2622](https://github.com/ionic-team/ionic-native/issues/2622)) ([d10777a](https://github.com/ionic-team/ionic-native/commit/d10777a))
|
||||
* **photo-library:** interface missing includeVideos ([3f415f9](https://github.com/ionic-team/ionic-native/commit/3f415f9)), closes [#2624](https://github.com/ionic-team/ionic-native/issues/2624)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **fabric:** add fabric plugin ([#2618](https://github.com/ionic-team/ionic-native/issues/2618)) ([9b4fd02](https://github.com/ionic-team/ionic-native/commit/9b4fd02))
|
||||
* **local-notifications:** add new foreground property ([#2633](https://github.com/ionic-team/ionic-native/issues/2633)) ([229b62c](https://github.com/ionic-team/ionic-native/commit/229b62c))
|
||||
* **webengage:** add optional config with initialization ([#2637](https://github.com/ionic-team/ionic-native/issues/2637)) ([ca9a702](https://github.com/ionic-team/ionic-native/commit/ca9a702))
|
||||
|
||||
|
||||
|
||||
<a name="4.11.0"></a>
|
||||
# [4.11.0](https://github.com/ionic-team/ionic-native/compare/v4.10.1...v4.11.0) (2018-07-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **http:** add correct return types for downloadFile and uploadFile ([4092831](https://github.com/ionic-team/ionic-native/commit/4092831)), closes [#2615](https://github.com/ionic-team/ionic-native/issues/2615)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **clevertap:** add CleverTap plugin ([#2609](https://github.com/ionic-team/ionic-native/issues/2609)) ([27d380e](https://github.com/ionic-team/ionic-native/commit/27d380e))
|
||||
* **facebook:** add getDeferredApplink function ([3b32e19](https://github.com/ionic-team/ionic-native/commit/3b32e19)), closes [#2510](https://github.com/ionic-team/ionic-native/issues/2510)
|
||||
* **webengage:** add webengage plugin ([#2604](https://github.com/ionic-team/ionic-native/issues/2604)) ([bd5bd7e](https://github.com/ionic-team/ionic-native/commit/bd5bd7e))
|
||||
|
||||
|
||||
|
||||
<a name="4.10.1"></a>
|
||||
## [4.10.1](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.14...v4.10.1) (2018-07-25)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **nfs:** Optional arguments for records like textRecord ([#2605](https://github.com/ionic-team/ionic-native/issues/2605)) ([b635ba9](https://github.com/ionic-team/ionic-native/commit/b635ba9))
|
||||
* **user-agent:** Plugin not installed ([#2607](https://github.com/ionic-team/ionic-native/issues/2607)) ([79cb478](https://github.com/ionic-team/ionic-native/commit/79cb478))
|
||||
|
||||
|
||||
|
||||
<a name="5.0.0-beta.14"></a>
|
||||
# [5.0.0-beta.14](https://github.com/ionic-team/ionic-native/compare/v4.10.0...v5.0.0-beta.14) (2018-07-18)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **abbyy-rtr:** add ABBYY Real-Time Recognition plugin ([#2580](https://github.com/ionic-team/ionic-native/issues/2580)) ([ecc698e](https://github.com/ionic-team/ionic-native/commit/ecc698e))
|
||||
* **alipay:** replace plugin ([#2591](https://github.com/ionic-team/ionic-native/issues/2591)) ([e640983](https://github.com/ionic-team/ionic-native/commit/e640983))
|
||||
* **ccm:** replace plugin source ([#2601](https://github.com/ionic-team/ionic-native/issues/2601)) ([b581a5b](https://github.com/ionic-team/ionic-native/commit/b581a5b))
|
||||
* **classkit:** add ClassKit plugin ([#2590](https://github.com/ionic-team/ionic-native/issues/2590)) ([a6c8045](https://github.com/ionic-team/ionic-native/commit/a6c8045))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* **alipay:** Replaced plugin with maintained Cordova plugin
|
||||
|
||||
|
||||
|
||||
<a name="4.9.2"></a>
|
||||
## [4.9.2](https://github.com/ionic-team/ionic-native/compare/v4.9.1...v4.9.2) (2018-07-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ble:** change signature for autoConnect ([#2594](https://github.com/ionic-team/ionic-native/issues/2594)) ([d95a359](https://github.com/ionic-team/ionic-native/commit/d95a359)), closes [#2573](https://github.com/ionic-team/ionic-native/issues/2573) [#2573](https://github.com/ionic-team/ionic-native/issues/2573)
|
||||
* **sqlite:** mark optional arguments for executeSql ([#2592](https://github.com/ionic-team/ionic-native/issues/2592)) ([565c766](https://github.com/ionic-team/ionic-native/commit/565c766))
|
||||
|
||||
|
||||
|
||||
<a name="4.9.1"></a>
|
||||
## [4.9.1](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.13...v4.9.1) (2018-07-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **barcode-scanner:** wrong barcode format identifier PDF417 -> PDF_417 ([#2574](https://github.com/ionic-team/ionic-native/issues/2574)) ([61714ff](https://github.com/ionic-team/ionic-native/commit/61714ff))
|
||||
* **health-kit:** add missing checkAuthStatus param ([#2544](https://github.com/ionic-team/ionic-native/issues/2544)) ([956e644](https://github.com/ionic-team/ionic-native/commit/956e644))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **ble:** add missing functions ([#2572](https://github.com/ionic-team/ionic-native/issues/2572)) ([9f9a346](https://github.com/ionic-team/ionic-native/commit/9f9a346))
|
||||
* **network-interface:** match latest plugin release ([#2587](https://github.com/ionic-team/ionic-native/issues/2587)) ([4f41589](https://github.com/ionic-team/ionic-native/commit/4f41589))
|
||||
* **streaming-media:** add new parameters & docs ([#2576](https://github.com/ionic-team/ionic-native/issues/2576)) ([f62a123](https://github.com/ionic-team/ionic-native/commit/f62a123))
|
||||
|
||||
|
||||
|
||||
<a name="5.0.0-beta.13"></a>
|
||||
# [5.0.0-beta.13](https://github.com/ionic-team/ionic-native/compare/v4.9.0...v5.0.0-beta.13) (2018-06-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **android-fingerprint-auth:** ensure ERRORS array is defined ([#2508](https://github.com/ionic-team/ionic-native/issues/2508)) ([714114d](https://github.com/ionic-team/ionic-native/commit/714114d))
|
||||
* **background-geolocation:** watchLocationMode returns observable ([#2547](https://github.com/ionic-team/ionic-native/issues/2547)) ([3f8a6f2](https://github.com/ionic-team/ionic-native/commit/3f8a6f2))
|
||||
* **calendar:** Fixes createCalendar parameter typing ([84e0aa1](https://github.com/ionic-team/ionic-native/commit/84e0aa1))
|
||||
* **call-number:** fix isCallSupported function ([f49d2a9](https://github.com/ionic-team/ionic-native/commit/f49d2a9)), closes [#2428](https://github.com/ionic-team/ionic-native/issues/2428)
|
||||
* **healt:** add correct return type for query function ([#2565](https://github.com/ionic-team/ionic-native/issues/2565)) ([98d44e6](https://github.com/ionic-team/ionic-native/commit/98d44e6))
|
||||
* **healths:** add missing attribute on HealthQueryOptionsAggregated ([#2550](https://github.com/ionic-team/ionic-native/issues/2550)) ([be370a4](https://github.com/ionic-team/ionic-native/commit/be370a4))
|
||||
* **ibeacon:** correct Type {Region} in some params ([#2453](https://github.com/ionic-team/ionic-native/issues/2453)) ([300db62](https://github.com/ionic-team/ionic-native/commit/300db62))
|
||||
* **in-app-purchase-2:** fix ready method signature ([#2043](https://github.com/ionic-team/ionic-native/issues/2043)) ([a018381](https://github.com/ionic-team/ionic-native/commit/a018381))
|
||||
* **index-app-content:** add missing function ([8d57198](https://github.com/ionic-team/ionic-native/commit/8d57198))
|
||||
* **index-app-content:** fix imports ([189d66c](https://github.com/ionic-team/ionic-native/commit/189d66c))
|
||||
* **native-geocoder:** set response type to an array ([#2505](https://github.com/ionic-team/ionic-native/issues/2505)) ([defb276](https://github.com/ionic-team/ionic-native/commit/defb276))
|
||||
* **onesignal:** make params optional ([#2507](https://github.com/ionic-team/ionic-native/issues/2507)) ([e6db281](https://github.com/ionic-team/ionic-native/commit/e6db281))
|
||||
* **onesignal:** update OSPermissionState interface ([#2561](https://github.com/ionic-team/ionic-native/issues/2561)) ([fc088f8](https://github.com/ionic-team/ionic-native/commit/fc088f8))
|
||||
* **site:** no prepended slash ([cea1dc1](https://github.com/ionic-team/ionic-native/commit/cea1dc1))
|
||||
* **stripe:** fixed casing of postal code param ([#2520](https://github.com/ionic-team/ionic-native/issues/2520)) ([d6a9ed1](https://github.com/ionic-team/ionic-native/commit/d6a9ed1))
|
||||
* **themeable-browser:** allow hidden and clear cache ([a4cc7f7](https://github.com/ionic-team/ionic-native/commit/a4cc7f7))
|
||||
* **web-intent:** fix options param ([#2450](https://github.com/ionic-team/ionic-native/issues/2450)) ([23b760b](https://github.com/ionic-team/ionic-native/commit/23b760b))
|
||||
* **web-intent:** registerBroadcastReceiver as Observable ([#2491](https://github.com/ionic-team/ionic-native/issues/2491)) ([47f7397](https://github.com/ionic-team/ionic-native/commit/47f7397))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **aes-256:** AES256 encryption and decryption plugin added ([#2562](https://github.com/ionic-team/ionic-native/issues/2562)) ([fdd6315](https://github.com/ionic-team/ionic-native/commit/fdd6315))
|
||||
* **ble:** update wrapper to match latest plugin release ([#2548](https://github.com/ionic-team/ionic-native/issues/2548)) ([03e6afb](https://github.com/ionic-team/ionic-native/commit/03e6afb))
|
||||
* **calldirectory:** add call directory plugin ([#2473](https://github.com/ionic-team/ionic-native/issues/2473)) ([1bfe829](https://github.com/ionic-team/ionic-native/commit/1bfe829))
|
||||
* **cloud-settings:** add support for cordova-plugin-cloud-settings ([#2494](https://github.com/ionic-team/ionic-native/issues/2494)) ([400dbcb](https://github.com/ionic-team/ionic-native/commit/400dbcb))
|
||||
* **file-picker:** add missing options ([1d9c449](https://github.com/ionic-team/ionic-native/commit/1d9c449))
|
||||
* **firebase:** add new functions ([36450e1](https://github.com/ionic-team/ionic-native/commit/36450e1))
|
||||
* **firebase:** add verifyPhoneNumber support for iOS ([567f525](https://github.com/ionic-team/ionic-native/commit/567f525))
|
||||
* **firebase-config:** add firebase-config wrapper ([#2517](https://github.com/ionic-team/ionic-native/issues/2517)) ([05423ce](https://github.com/ionic-team/ionic-native/commit/05423ce))
|
||||
* **firebase-messaging:** add firebase-messaging ([#2518](https://github.com/ionic-team/ionic-native/issues/2518)) ([c03b73f](https://github.com/ionic-team/ionic-native/commit/c03b73f))
|
||||
* **hce:** add hce plugin wrapper ([#2534](https://github.com/ionic-team/ionic-native/issues/2534)) ([8460e68](https://github.com/ionic-team/ionic-native/commit/8460e68))
|
||||
* **image-picker:** add DATA_URL as an option to ImagePicker ([#2325](https://github.com/ionic-team/ionic-native/issues/2325)) ([dd9ba0a](https://github.com/ionic-team/ionic-native/commit/dd9ba0a))
|
||||
* **InAppReview:** add InAppReview plugin ([#2483](https://github.com/ionic-team/ionic-native/issues/2483)) ([bfe5ae9](https://github.com/ionic-team/ionic-native/commit/bfe5ae9))
|
||||
* **local-notifications:** added support for foreground option in version 0.9.0-beta.3 of cordova-plugin-local-notifications ([#2506](https://github.com/ionic-team/ionic-native/issues/2506)) ([ae6e28d](https://github.com/ionic-team/ionic-native/commit/ae6e28d))
|
||||
* **onesignal:** Added notification stacking ([#2512](https://github.com/ionic-team/ionic-native/issues/2512)) ([7c35535](https://github.com/ionic-team/ionic-native/commit/7c35535))
|
||||
* **photo-library:** add maxItems to limit items-iOS ([#2554](https://github.com/ionic-team/ionic-native/issues/2554)) ([31fc892](https://github.com/ionic-team/ionic-native/commit/31fc892))
|
||||
* **plugin:** add Sensors plugin ([#2268](https://github.com/ionic-team/ionic-native/issues/2268)) ([e61d574](https://github.com/ionic-team/ionic-native/commit/e61d574))
|
||||
* **send-result:** add sendResult method for WebIntent plugin ([#2495](https://github.com/ionic-team/ionic-native/issues/2495)) ([34aeb19](https://github.com/ionic-team/ionic-native/commit/34aeb19))
|
||||
* **SiriShortcuts:** implement Siri Shortcuts plugin in Ionic ([#2542](https://github.com/ionic-team/ionic-native/issues/2542)) ([df254de](https://github.com/ionic-team/ionic-native/commit/df254de))
|
||||
* **star-prnt:** add StarPRNT plugin ([a1e6bef](https://github.com/ionic-team/ionic-native/commit/a1e6bef))
|
||||
* **star-prnt:** Added support for connected to devices with barcode readers ([#2509](https://github.com/ionic-team/ionic-native/issues/2509)) ([58615f1](https://github.com/ionic-team/ionic-native/commit/58615f1))
|
||||
* **tealium:** add tealium ionic wrappers ([#2414](https://github.com/ionic-team/ionic-native/issues/2414)) ([5f41ef1](https://github.com/ionic-team/ionic-native/commit/5f41ef1))
|
||||
* **uptime:** add deep sleep parameter ([#2456](https://github.com/ionic-team/ionic-native/issues/2456)) ([91d22c5](https://github.com/ionic-team/ionic-native/commit/91d22c5))
|
||||
|
||||
|
||||
|
||||
<a name="4.7.0"></a>
|
||||
# [4.7.0](https://github.com/ionic-team/ionic-native/compare/v4.6.0...v4.7.0) (2018-04-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **badge:** add correct requestPermission function ([586c7e5](https://github.com/ionic-team/ionic-native/commit/586c7e5))
|
||||
* **badge:** add correct requestPermission function ([586c7e5](https://github.com/ionic-team/ionic-native/commit/586c7e5)), closes [#105](https://github.com/ionic-team/ionic-native/issues/105) [#1856](https://github.com/ionic-team/ionic-native/issues/1856)
|
||||
* **call-log:** comments erratum ([4b9cf17](https://github.com/ionic-team/ionic-native/commit/4b9cf17))
|
||||
* **call-log:** update getCallLog signature ([61c0ecf](https://github.com/ionic-team/ionic-native/commit/61c0ecf))
|
||||
* **contacts:** refactor wrong ContactFieldTypes ([f607a03](https://github.com/ionic-team/ionic-native/commit/f607a03))
|
||||
* **email-composer:** add missing options ([4399600](https://github.com/ionic-team/ionic-native/commit/4399600))
|
||||
* **facebook:** remove browserInit function ([f718432](https://github.com/ionic-team/ionic-native/commit/f718432))
|
||||
* **email-composer:** add missing options ([4399600](https://github.com/ionic-team/ionic-native/commit/4399600)), closes [#175](https://github.com/ionic-team/ionic-native/issues/175)
|
||||
* **facebook:** remove browserInit function ([f718432](https://github.com/ionic-team/ionic-native/commit/f718432)), closes [#1901](https://github.com/ionic-team/ionic-native/issues/1901)
|
||||
* **firebase-analytics:** add `sync` option for all methods ([42fd1f2](https://github.com/ionic-team/ionic-native/commit/42fd1f2))
|
||||
* **google-maps:** wrong decorators ([e5b9d53](https://github.com/ionic-team/ionic-native/commit/e5b9d53))
|
||||
* **health-kit:** add missing properties to HealthKitOptions ([f8e79ce](https://github.com/ionic-team/ionic-native/commit/f8e79ce))
|
||||
@@ -21,11 +206,11 @@
|
||||
* **pro:** Tweak to pro plugin. [#2136](https://github.com/ionic-team/ionic-native/issues/2136) [#2127](https://github.com/ionic-team/ionic-native/issues/2127) ([c8ecee0](https://github.com/ionic-team/ionic-native/commit/c8ecee0))
|
||||
* **Pro:** CordovaCheck should sync. [#2136](https://github.com/ionic-team/ionic-native/issues/2136) [#2127](https://github.com/ionic-team/ionic-native/issues/2127) ([f419db5](https://github.com/ionic-team/ionic-native/commit/f419db5))
|
||||
* **push:** Android senderID as optional ([1b237aa](https://github.com/ionic-team/ionic-native/commit/1b237aa))
|
||||
* **Radmob-pro:** add offsetTopBar option ([4948640](https://github.com/ionic-team/ionic-native/commit/4948640))
|
||||
* **speech-recognition:** add missing options ([9aff5ea](https://github.com/ionic-team/ionic-native/commit/9aff5ea))
|
||||
* **Radmob-pro:** add offsetTopBar option ([4948640](https://github.com/ionic-team/ionic-native/commit/4948640)), closes [#2100](https://github.com/ionic-team/ionic-native/issues/2100)
|
||||
* **speech-recognition:** add missing options ([9aff5ea](https://github.com/ionic-team/ionic-native/commit/9aff5ea)), closes [#2165](https://github.com/ionic-team/ionic-native/issues/2165)
|
||||
* **sqlite:** remove trailing whitespaces ([7547a94](https://github.com/ionic-team/ionic-native/commit/7547a94))
|
||||
* **uuid:** add correct plugin source ([a81a4d3](https://github.com/ionic-team/ionic-native/commit/a81a4d3))
|
||||
* **web-intent:** allow extras ([8dc5ad2](https://github.com/ionic-team/ionic-native/commit/8dc5ad2))
|
||||
* **uuid:** add correct plugin source ([a81a4d3](https://github.com/ionic-team/ionic-native/commit/a81a4d3)), closes [#2324](https://github.com/ionic-team/ionic-native/issues/2324)
|
||||
* **web-intent:** allow extras ([8dc5ad2](https://github.com/ionic-team/ionic-native/commit/8dc5ad2)), closes [#1959](https://github.com/ionic-team/ionic-native/issues/1959)
|
||||
* **web-intent:** rename `onNewIntent` to `onIntent` ([dbcb103](https://github.com/ionic-team/ionic-native/commit/dbcb103))
|
||||
|
||||
|
||||
@@ -33,18 +218,18 @@
|
||||
|
||||
* **app-rate:** add custom locale interface ([2a18dbc](https://github.com/ionic-team/ionic-native/commit/2a18dbc))
|
||||
* **app-update:** add app update options ([0f325ed](https://github.com/ionic-team/ionic-native/commit/0f325ed))
|
||||
* **appodeal:** add new functions ([247a1a1](https://github.com/ionic-team/ionic-native/commit/247a1a1))
|
||||
* **appodeal:** add new functions ([247a1a1](https://github.com/ionic-team/ionic-native/commit/247a1a1)), closes [#2065](https://github.com/ionic-team/ionic-native/issues/2065)
|
||||
* **base64-to-gallery:** add options interface ([11d516f](https://github.com/ionic-team/ionic-native/commit/11d516f))
|
||||
* **ble:** add scan options interface ([e345fed](https://github.com/ionic-team/ionic-native/commit/e345fed))
|
||||
* **calendar:** add getCreateCalendarOptions function ([13765d2](https://github.com/ionic-team/ionic-native/commit/13765d2))
|
||||
* **call-log:** add operator 'like' and array of values ([84cecf7](https://github.com/ionic-team/ionic-native/commit/84cecf7))
|
||||
* **call-log:** add plugin ([76a644d](https://github.com/ionic-team/ionic-native/commit/76a644d))
|
||||
* **camera-preview:** add onBackButton function ([a345e2c](https://github.com/ionic-team/ionic-native/commit/a345e2c))
|
||||
* **camera-preview:** add onBackButton function ([a345e2c](https://github.com/ionic-team/ionic-native/commit/a345e2c)), closes [#1967](https://github.com/ionic-team/ionic-native/issues/1967)
|
||||
* **camera-preview:** disable exif stripping conf ([e231bf8](https://github.com/ionic-team/ionic-native/commit/e231bf8))
|
||||
* **device-accounts:** add android account interface ([d2261b6](https://github.com/ionic-team/ionic-native/commit/d2261b6))
|
||||
* **device-feedback:** add feedback interface ([7cafebd](https://github.com/ionic-team/ionic-native/commit/7cafebd))
|
||||
* **google-analytics:** add missing functions ([ff0008e](https://github.com/ionic-team/ionic-native/commit/ff0008e))
|
||||
* **google-maps:** update to match latest plugin version ([#2320](https://github.com/ionic-team/ionic-native/issues/2320)) ([f11be24](https://github.com/ionic-team/ionic-native/commit/f11be24))
|
||||
* **google-maps:** update to match latest plugin version ([#2320](https://github.com/ionic-team/ionic-native/issues/2320)) ([f11be24](https://github.com/ionic-team/ionic-native/commit/f11be24)), closes [/github.com/ionic-team/ionic-native/pull/1815#issuecomment-318909795](https://github.com//github.com/ionic-team/ionic-native/pull/1815/issues/issuecomment-318909795) [#2087](https://github.com/ionic-team/ionic-native/issues/2087) [/stackoverflow.com/questions/47083289/ionic-native-google-maps-plugin-set-app-background-color/47165721#47165721](https://github.com//stackoverflow.com/questions/47083289/ionic-native-google-maps-plugin-set-app-background-color/47165721/issues/47165721) [#2254](https://github.com/ionic-team/ionic-native/issues/2254) [#2199](https://github.com/ionic-team/ionic-native/issues/2199)
|
||||
* **hot code push:** add cordova-hot-code-push ([e7968da](https://github.com/ionic-team/ionic-native/commit/e7968da))
|
||||
* **hot code push:** add update events ([04bdade](https://github.com/ionic-team/ionic-native/commit/04bdade))
|
||||
* **http:** add support for new methods ([#2249](https://github.com/ionic-team/ionic-native/issues/2249)) ([4497e00](https://github.com/ionic-team/ionic-native/commit/4497e00))
|
||||
@@ -62,9 +247,9 @@
|
||||
* **plugin:** add Microsoft App Center Push plugin ([cdabebd](https://github.com/ionic-team/ionic-native/commit/cdabebd))
|
||||
* **plugin:** add OpenALPR plugin ([e27fbf4](https://github.com/ionic-team/ionic-native/commit/e27fbf4))
|
||||
* **plugin:** add Uptime plugin ([6be3832](https://github.com/ionic-team/ionic-native/commit/6be3832))
|
||||
* **social-sharing:** add missing function ([4cb28c4](https://github.com/ionic-team/ionic-native/commit/4cb28c4))
|
||||
* **social-sharing:** add missing function ([4cb28c4](https://github.com/ionic-team/ionic-native/commit/4cb28c4)), closes [#2209](https://github.com/ionic-team/ionic-native/issues/2209)
|
||||
* **speechkit:** plugin implementation ([41e5a0f](https://github.com/ionic-team/ionic-native/commit/41e5a0f))
|
||||
* **sqlite:** add selfTest function ([241f073](https://github.com/ionic-team/ionic-native/commit/241f073))
|
||||
* **sqlite:** add selfTest function ([241f073](https://github.com/ionic-team/ionic-native/commit/241f073)), closes [#963](https://github.com/ionic-team/ionic-native/issues/963)
|
||||
* **uptime:** add iOS support ([e6f6158](https://github.com/ionic-team/ionic-native/commit/e6f6158))
|
||||
* **web-intent:** add startService function ([15bb350](https://github.com/ionic-team/ionic-native/commit/15bb350))
|
||||
|
||||
@@ -151,8 +336,8 @@
|
||||
|
||||
### Features
|
||||
|
||||
* **google-maps:** accept own properties for `addMarker()` and others ([#2093](https://github.com/ionic-team/ionic-native/issues/2093)) ([196be02](https://github.com/ionic-team/ionic-native/commit/196be02))
|
||||
* **http:** add support for new methods ([#2054](https://github.com/ionic-team/ionic-native/issues/2054)) ([d96d3ee](https://github.com/ionic-team/ionic-native/commit/d96d3ee))
|
||||
* **google-maps:** accept own properties for `addMarker()` and others ([#2093](https://github.com/ionic-team/ionic-native/issues/2093)) ([196be02](https://github.com/ionic-team/ionic-native/commit/196be02)), closes [/github.com/ionic-team/ionic-native/pull/1815#issuecomment-318909795](https://github.com//github.com/ionic-team/ionic-native/pull/1815/issues/issuecomment-318909795) [#2087](https://github.com/ionic-team/ionic-native/issues/2087) [/stackoverflow.com/questions/47083289/ionic-native-google-maps-plugin-set-app-background-color/47165721#47165721](https://github.com//stackoverflow.com/questions/47083289/ionic-native-google-maps-plugin-set-app-background-color/47165721/issues/47165721)
|
||||
* **http:** add support for new methods ([#2054](https://github.com/ionic-team/ionic-native/issues/2054)) ([d96d3ee](https://github.com/ionic-team/ionic-native/commit/d96d3ee)), closes [#2052](https://github.com/ionic-team/ionic-native/issues/2052) [#2022](https://github.com/ionic-team/ionic-native/issues/2022) [#2053](https://github.com/ionic-team/ionic-native/issues/2053)
|
||||
|
||||
|
||||
|
||||
@@ -162,7 +347,7 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **google-maps:** HtmlInfoWindow should extend BaseClass [#2034](https://github.com/ionic-team/ionic-native/issues/2034) ([#2035](https://github.com/ionic-team/ionic-native/issues/2035)) ([ce6e412](https://github.com/ionic-team/ionic-native/commit/ce6e412))
|
||||
* **google-maps:** HtmlInfoWindow should extend BaseClass [#2034](https://github.com/ionic-team/ionic-native/issues/2034) ([#2035](https://github.com/ionic-team/ionic-native/issues/2035)) ([ce6e412](https://github.com/ionic-team/ionic-native/commit/ce6e412)), closes [/github.com/ionic-team/ionic-native/pull/1815#issuecomment-318909795](https://github.com//github.com/ionic-team/ionic-native/pull/1815/issues/issuecomment-318909795)
|
||||
|
||||
|
||||
|
||||
@@ -188,7 +373,7 @@
|
||||
### Bug Fixes
|
||||
|
||||
* **BLE:** make readRSSI() not static ([#2011](https://github.com/ionic-team/ionic-native/issues/2011)) ([363b41e](https://github.com/ionic-team/ionic-native/commit/363b41e))
|
||||
* **google-maps:** various fixed introduced in previous release ([#2024](https://github.com/ionic-team/ionic-native/issues/2024)) ([6ca5bea](https://github.com/ionic-team/ionic-native/commit/6ca5bea))
|
||||
* **google-maps:** various fixed introduced in previous release ([#2024](https://github.com/ionic-team/ionic-native/issues/2024)) ([6ca5bea](https://github.com/ionic-team/ionic-native/commit/6ca5bea)), closes [/github.com/ionic-team/ionic-native/pull/1815#issuecomment-318909795](https://github.com//github.com/ionic-team/ionic-native/pull/1815/issues/issuecomment-318909795)
|
||||
* **onesignal:** fix property name ([#2019](https://github.com/ionic-team/ionic-native/issues/2019)) ([30ed33a](https://github.com/ionic-team/ionic-native/commit/30ed33a))
|
||||
|
||||
|
||||
@@ -205,10 +390,10 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **google-maps:** convert JS classes to Ionic Native ([#1956](https://github.com/ionic-team/ionic-native/issues/1956)) ([57af5c5](https://github.com/ionic-team/ionic-native/commit/57af5c5))
|
||||
* **google-maps:** fix icons property of MarkerClusterOptions ([#1937](https://github.com/ionic-team/ionic-native/issues/1937)) ([8004790](https://github.com/ionic-team/ionic-native/commit/8004790))
|
||||
* **google-maps:** fix issue when creating new instance of BaseArrayClass ([#1931](https://github.com/ionic-team/ionic-native/issues/1931)) ([957396b](https://github.com/ionic-team/ionic-native/commit/957396b))
|
||||
* **google-maps:** the zoom option is missing in the GoogleMapOptions class ([#1948](https://github.com/ionic-team/ionic-native/issues/1948)) ([ef898ef](https://github.com/ionic-team/ionic-native/commit/ef898ef))
|
||||
* **google-maps:** convert JS classes to Ionic Native ([#1956](https://github.com/ionic-team/ionic-native/issues/1956)) ([57af5c5](https://github.com/ionic-team/ionic-native/commit/57af5c5)), closes [/github.com/ionic-team/ionic-native/pull/1815#issuecomment-318909795](https://github.com//github.com/ionic-team/ionic-native/pull/1815/issues/issuecomment-318909795)
|
||||
* **google-maps:** fix icons property of MarkerClusterOptions ([#1937](https://github.com/ionic-team/ionic-native/issues/1937)) ([8004790](https://github.com/ionic-team/ionic-native/commit/8004790)), closes [/github.com/ionic-team/ionic-native/pull/1815#issuecomment-318909795](https://github.com//github.com/ionic-team/ionic-native/pull/1815/issues/issuecomment-318909795)
|
||||
* **google-maps:** fix issue when creating new instance of BaseArrayClass ([#1931](https://github.com/ionic-team/ionic-native/issues/1931)) ([957396b](https://github.com/ionic-team/ionic-native/commit/957396b)), closes [/github.com/ionic-team/ionic-native/pull/1815#issuecomment-318909795](https://github.com//github.com/ionic-team/ionic-native/pull/1815/issues/issuecomment-318909795)
|
||||
* **google-maps:** the zoom option is missing in the GoogleMapOptions class ([#1948](https://github.com/ionic-team/ionic-native/issues/1948)) ([ef898ef](https://github.com/ionic-team/ionic-native/commit/ef898ef)), closes [/github.com/ionic-team/ionic-native/pull/1815#issuecomment-318909795](https://github.com//github.com/ionic-team/ionic-native/pull/1815/issues/issuecomment-318909795)
|
||||
* **http:** fix plugin ref ([#1934](https://github.com/ionic-team/ionic-native/issues/1934)) ([3a1034e](https://github.com/ionic-team/ionic-native/commit/3a1034e))
|
||||
* **launch-navigator:** fix navigate method ([#1940](https://github.com/ionic-team/ionic-native/issues/1940)) ([a150d4d](https://github.com/ionic-team/ionic-native/commit/a150d4d))
|
||||
* **stripe:** fix stripe create card token ([#2002](https://github.com/ionic-team/ionic-native/issues/2002)) ([5b15bb9](https://github.com/ionic-team/ionic-native/commit/5b15bb9))
|
||||
@@ -250,7 +435,7 @@
|
||||
|
||||
### Features
|
||||
|
||||
* **google-maps:** update plugin and fix a few issues ([#1834](https://github.com/ionic-team/ionic-native/issues/1834)) ([c11aec3](https://github.com/ionic-team/ionic-native/commit/c11aec3))
|
||||
* **google-maps:** update plugin and fix a few issues ([#1834](https://github.com/ionic-team/ionic-native/issues/1834)) ([c11aec3](https://github.com/ionic-team/ionic-native/commit/c11aec3)), closes [/github.com/ionic-team/ionic-native/pull/1815#issuecomment-318909795](https://github.com//github.com/ionic-team/ionic-native/pull/1815/issues/issuecomment-318909795)
|
||||
* **http:** use a different plugin source with better features ([#1921](https://github.com/ionic-team/ionic-native/issues/1921)) ([a2d3396](https://github.com/ionic-team/ionic-native/commit/a2d3396))
|
||||
* **keychain-touch-id:** add KeychainTouchId plugin ([#1837](https://github.com/ionic-team/ionic-native/issues/1837)) ([a2cc187](https://github.com/ionic-team/ionic-native/commit/a2cc187))
|
||||
* **local-notifications:** add `un` method to unsubscribe from events ([#1871](https://github.com/ionic-team/ionic-native/issues/1871)) ([ce5966b](https://github.com/ionic-team/ionic-native/commit/ce5966b))
|
||||
@@ -344,7 +529,7 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
|
||||
|
||||
### Features
|
||||
|
||||
* **in-app-purchase2:** add a second InAppPurchase plugin ([#1775](https://github.com/ionic-team/ionic-native/issues/1775)) ([398d0ee](https://github.com/ionic-team/ionic-native/commit/398d0ee)), closes [#1705](https://github.com/ionic-team/ionic-native/issues/1705)
|
||||
* **in-app-purchase2:** add a second InAppPurchase plugin ([#1775](https://github.com/ionic-team/ionic-native/issues/1775)) ([398d0ee](https://github.com/ionic-team/ionic-native/commit/398d0ee)), closes [#1705](https://github.com/ionic-team/ionic-native/issues/1705) [#1709](https://github.com/ionic-team/ionic-native/issues/1709) [#1713](https://github.com/ionic-team/ionic-native/issues/1713)
|
||||
|
||||
|
||||
|
||||
@@ -575,7 +760,7 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
|
||||
* **app-minimize:** add AppMinimize plugin ([#1501](https://github.com/ionic-team/ionic-native/issues/1501)) ([d25b2f1](https://github.com/ionic-team/ionic-native/commit/d25b2f1))
|
||||
* **camera-preview:** add new focus methods & getFlashMode() ([#1442](https://github.com/ionic-team/ionic-native/issues/1442)) ([748c6bd](https://github.com/ionic-team/ionic-native/commit/748c6bd))
|
||||
* **camera-preview:** add tapToFocus method ([#1494](https://github.com/ionic-team/ionic-native/issues/1494)) ([8330c92](https://github.com/ionic-team/ionic-native/commit/8330c92))
|
||||
* **diagnostic:** update to support latest signatures ([#1458](https://github.com/ionic-team/ionic-native/issues/1458)) ([a4151ab](https://github.com/ionic-team/ionic-native/commit/a4151ab))
|
||||
* **diagnostic:** update to support latest signatures ([#1458](https://github.com/ionic-team/ionic-native/issues/1458)) ([a4151ab](https://github.com/ionic-team/ionic-native/commit/a4151ab)), closes [/github.com/driftyco/ionic-native/pull/1458#issuecomment-299030833](https://github.com//github.com/driftyco/ionic-native/pull/1458/issues/issuecomment-299030833)
|
||||
* **facebook:** add EVENTS constant ([#1510](https://github.com/ionic-team/ionic-native/issues/1510)) ([aa9826f](https://github.com/ionic-team/ionic-native/commit/aa9826f))
|
||||
* **fcm:** support Firebase Cloud Messaging plugin ([#1449](https://github.com/ionic-team/ionic-native/issues/1449)) ([6cc6393](https://github.com/ionic-team/ionic-native/commit/6cc6393))
|
||||
* **firebase:** add support for firebase ErrorLog ([#1440](https://github.com/ionic-team/ionic-native/issues/1440)) ([11dbe42](https://github.com/ionic-team/ionic-native/commit/11dbe42))
|
||||
@@ -584,7 +769,7 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
|
||||
* **mobile-accessibility:** add Mobile Accessibility plugin ([#1505](https://github.com/ionic-team/ionic-native/issues/1505)) ([4e9b2d9](https://github.com/ionic-team/ionic-native/commit/4e9b2d9)), closes [#1304](https://github.com/ionic-team/ionic-native/issues/1304)
|
||||
* **native-page-transitions:** add pendingTransition methods ([#1344](https://github.com/ionic-team/ionic-native/issues/1344)) ([f699c6d](https://github.com/ionic-team/ionic-native/commit/f699c6d))
|
||||
* **native-ringtones:** add Native Ringtones plugin ([#1488](https://github.com/ionic-team/ionic-native/issues/1488)) ([21c9cd2](https://github.com/ionic-team/ionic-native/commit/21c9cd2))
|
||||
* **phonegap-local-notifications:** add Phonegap local notifications plugin ([#1474](https://github.com/ionic-team/ionic-native/issues/1474)) ([3d747d3](https://github.com/ionic-team/ionic-native/commit/3d747d3))
|
||||
* **phonegap-local-notifications:** add Phonegap local notifications plugin ([#1474](https://github.com/ionic-team/ionic-native/issues/1474)) ([3d747d3](https://github.com/ionic-team/ionic-native/commit/3d747d3)), closes [#1](https://github.com/ionic-team/ionic-native/issues/1) [#3](https://github.com/ionic-team/ionic-native/issues/3) [#4](https://github.com/ionic-team/ionic-native/issues/4)
|
||||
* **plugin:** add Document Viewer plugin ([#1520](https://github.com/ionic-team/ionic-native/issues/1520)) ([6855fe8](https://github.com/ionic-team/ionic-native/commit/6855fe8))
|
||||
* **plugin:** add File encryption plugin ([#1509](https://github.com/ionic-team/ionic-native/issues/1509)) ([46b4e25](https://github.com/ionic-team/ionic-native/commit/46b4e25)), closes [#618](https://github.com/ionic-team/ionic-native/issues/618)
|
||||
* **safari-view-controller:** add missing options ([#1490](https://github.com/ionic-team/ionic-native/issues/1490)) ([a5b2e98](https://github.com/ionic-team/ionic-native/commit/a5b2e98)), closes [#1489](https://github.com/ionic-team/ionic-native/issues/1489)
|
||||
@@ -634,7 +819,7 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **push:** hasPermission is part of Push object ([145577f](https://github.com/ionic-team/ionic-native/commit/145577f))
|
||||
* **push:** hasPermission is part of Push object ([145577f](https://github.com/ionic-team/ionic-native/commit/145577f)), closes [#1297](https://github.com/ionic-team/ionic-native/issues/1297)
|
||||
|
||||
|
||||
|
||||
@@ -681,7 +866,7 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
|
||||
|
||||
* **admob-free:** add AdMobFree plugin ([#1272](https://github.com/ionic-team/ionic-native/issues/1272)) ([0ef4a73](https://github.com/ionic-team/ionic-native/commit/0ef4a73)), closes [#1170](https://github.com/ionic-team/ionic-native/issues/1170)
|
||||
* **sqlite-porter:** add SQLite porter plugin ([#1273](https://github.com/ionic-team/ionic-native/issues/1273)) ([f911366](https://github.com/ionic-team/ionic-native/commit/f911366)), closes [#485](https://github.com/ionic-team/ionic-native/issues/485)
|
||||
* **taptic-engine:** add taptic engine plugin support ([#1271](https://github.com/ionic-team/ionic-native/issues/1271)) ([ffa37e2](https://github.com/ionic-team/ionic-native/commit/ffa37e2))
|
||||
* **taptic-engine:** add taptic engine plugin support ([#1271](https://github.com/ionic-team/ionic-native/issues/1271)) ([ffa37e2](https://github.com/ionic-team/ionic-native/commit/ffa37e2)), closes [#571](https://github.com/ionic-team/ionic-native/issues/571)
|
||||
* **zeroconf:** add cordova-plugin-zeroconf support ([#1260](https://github.com/ionic-team/ionic-native/issues/1260)) ([68d9946](https://github.com/ionic-team/ionic-native/commit/68d9946))
|
||||
|
||||
|
||||
@@ -754,7 +939,7 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
|
||||
|
||||
### Features
|
||||
|
||||
* **jins-meme:** add support for jins meme smart glasses ([#1212](https://github.com/ionic-team/ionic-native/issues/1212)) ([9c88cfb](https://github.com/ionic-team/ionic-native/commit/9c88cfb))
|
||||
* **jins-meme:** add support for jins meme smart glasses ([#1212](https://github.com/ionic-team/ionic-native/issues/1212)) ([9c88cfb](https://github.com/ionic-team/ionic-native/commit/9c88cfb)), closes [#3](https://github.com/ionic-team/ionic-native/issues/3) [/github.com/driftyco/ionic-native/pull/1212#pullrequestreview-28298382](https://github.com//github.com/driftyco/ionic-native/pull/1212/issues/pullrequestreview-28298382)
|
||||
|
||||
|
||||
|
||||
@@ -780,7 +965,7 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
|
||||
|
||||
### Chores
|
||||
|
||||
* merge v3-injectable into master ([#1203](https://github.com/ionic-team/ionic-native/issues/1203)) ([2f2d55f](https://github.com/ionic-team/ionic-native/commit/2f2d55f)), closes [#250](https://github.com/ionic-team/ionic-native/issues/250) [#861](https://github.com/ionic-team/ionic-native/issues/861) [#1145](https://github.com/ionic-team/ionic-native/issues/1145) [#1096](https://github.com/ionic-team/ionic-native/issues/1096) [#1088](https://github.com/ionic-team/ionic-native/issues/1088) [#1110](https://github.com/ionic-team/ionic-native/issues/1110) [#1129](https://github.com/ionic-team/ionic-native/issues/1129) [#1125](https://github.com/ionic-team/ionic-native/issues/1125) [#1115](https://github.com/ionic-team/ionic-native/issues/1115) [#1118](https://github.com/ionic-team/ionic-native/issues/1118) [#1093](https://github.com/ionic-team/ionic-native/issues/1093) [#1001](https://github.com/ionic-team/ionic-native/issues/1001) [#1043](https://github.com/ionic-team/ionic-native/issues/1043) [#1044](https://github.com/ionic-team/ionic-native/issues/1044) [#1045](https://github.com/ionic-team/ionic-native/issues/1045) [#1078](https://github.com/ionic-team/ionic-native/issues/1078) [#1132](https://github.com/ionic-team/ionic-native/issues/1132) [#1138](https://github.com/ionic-team/ionic-native/issues/1138) [#1139](https://github.com/ionic-team/ionic-native/issues/1139) [#1142](https://github.com/ionic-team/ionic-native/issues/1142)
|
||||
* merge v3-injectable into master ([#1203](https://github.com/ionic-team/ionic-native/issues/1203)) ([2f2d55f](https://github.com/ionic-team/ionic-native/commit/2f2d55f)), closes [#250](https://github.com/ionic-team/ionic-native/issues/250) [#861](https://github.com/ionic-team/ionic-native/issues/861) [#1059](https://github.com/ionic-team/ionic-native/issues/1059) [#1145](https://github.com/ionic-team/ionic-native/issues/1145) [#1146](https://github.com/ionic-team/ionic-native/issues/1146) [#1049](https://github.com/ionic-team/ionic-native/issues/1049) [#1072](https://github.com/ionic-team/ionic-native/issues/1072) [#1071](https://github.com/ionic-team/ionic-native/issues/1071) [#1076](https://github.com/ionic-team/ionic-native/issues/1076) [#1065](https://github.com/ionic-team/ionic-native/issues/1065) [#1089](https://github.com/ionic-team/ionic-native/issues/1089) [#1087](https://github.com/ionic-team/ionic-native/issues/1087) [#1096](https://github.com/ionic-team/ionic-native/issues/1096) [#1098](https://github.com/ionic-team/ionic-native/issues/1098) [#1088](https://github.com/ionic-team/ionic-native/issues/1088) [#1099](https://github.com/ionic-team/ionic-native/issues/1099) [#1101](https://github.com/ionic-team/ionic-native/issues/1101) [#1103](https://github.com/ionic-team/ionic-native/issues/1103) [#1106](https://github.com/ionic-team/ionic-native/issues/1106) [#1107](https://github.com/ionic-team/ionic-native/issues/1107) [#1108](https://github.com/ionic-team/ionic-native/issues/1108) [#1109](https://github.com/ionic-team/ionic-native/issues/1109) [#1110](https://github.com/ionic-team/ionic-native/issues/1110) [#1122](https://github.com/ionic-team/ionic-native/issues/1122) [#1129](https://github.com/ionic-team/ionic-native/issues/1129) [#1125](https://github.com/ionic-team/ionic-native/issues/1125) [#1128](https://github.com/ionic-team/ionic-native/issues/1128) [#1126](https://github.com/ionic-team/ionic-native/issues/1126) [#1115](https://github.com/ionic-team/ionic-native/issues/1115) [#1077](https://github.com/ionic-team/ionic-native/issues/1077) [#1118](https://github.com/ionic-team/ionic-native/issues/1118) [#1093](https://github.com/ionic-team/ionic-native/issues/1093) [#1116](https://github.com/ionic-team/ionic-native/issues/1116) [#1001](https://github.com/ionic-team/ionic-native/issues/1001) [#1105](https://github.com/ionic-team/ionic-native/issues/1105) [#1097](https://github.com/ionic-team/ionic-native/issues/1097) [#1095](https://github.com/ionic-team/ionic-native/issues/1095) [#1086](https://github.com/ionic-team/ionic-native/issues/1086) [#1082](https://github.com/ionic-team/ionic-native/issues/1082) [#1079](https://github.com/ionic-team/ionic-native/issues/1079) [#1064](https://github.com/ionic-team/ionic-native/issues/1064) [#1063](https://github.com/ionic-team/ionic-native/issues/1063) [#1031](https://github.com/ionic-team/ionic-native/issues/1031) [#1025](https://github.com/ionic-team/ionic-native/issues/1025) [#990](https://github.com/ionic-team/ionic-native/issues/990) [#1013](https://github.com/ionic-team/ionic-native/issues/1013) [#990](https://github.com/ionic-team/ionic-native/issues/990) [#1004](https://github.com/ionic-team/ionic-native/issues/1004) [#1130](https://github.com/ionic-team/ionic-native/issues/1130) [#1043](https://github.com/ionic-team/ionic-native/issues/1043) [#1044](https://github.com/ionic-team/ionic-native/issues/1044) [#1045](https://github.com/ionic-team/ionic-native/issues/1045) [#1078](https://github.com/ionic-team/ionic-native/issues/1078) [#1084](https://github.com/ionic-team/ionic-native/issues/1084) [#1102](https://github.com/ionic-team/ionic-native/issues/1102) [#1132](https://github.com/ionic-team/ionic-native/issues/1132) [#1039](https://github.com/ionic-team/ionic-native/issues/1039) [#1138](https://github.com/ionic-team/ionic-native/issues/1138) [#1139](https://github.com/ionic-team/ionic-native/issues/1139) [#1142](https://github.com/ionic-team/ionic-native/issues/1142) [#1171](https://github.com/ionic-team/ionic-native/issues/1171) [#1193](https://github.com/ionic-team/ionic-native/issues/1193)
|
||||
|
||||
|
||||
### Features
|
||||
@@ -832,24 +1017,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
|
||||
|
||||
* feat(action-sheet): add ANDROID_THEMES constant
|
||||
|
||||
* refactor(): general cleanup (#1193)
|
||||
|
||||
* feat(screen-orientation): update wrapper to match v2 of the plugin
|
||||
|
||||
The whole implementation has changed now. You must update your code.
|
||||
|
||||
* feat(stripe): add new methods
|
||||
|
||||
* feat(linkedin): add LinkedIn plugin
|
||||
|
||||
* 3.1.0-rc.6
|
||||
|
||||
* style(screen-orientation): double quote to single
|
||||
|
||||
* tslint
|
||||
|
||||
* refactor(pedometer): rename file to index
|
||||
|
||||
|
||||
|
||||
<a name="2.9.0"></a>
|
||||
@@ -948,7 +1115,7 @@ The whole implementation has changed now. You must update your code.
|
||||
* **app-update:** add cordova-plugin-app-update support ([#1105](https://github.com/ionic-team/ionic-native/issues/1105)) ([21d4088](https://github.com/ionic-team/ionic-native/commit/21d4088))
|
||||
* **appodeal:** adds Appodeal SDK wrappers for iOS and Android ([#1031](https://github.com/ionic-team/ionic-native/issues/1031)) ([fd8107b](https://github.com/ionic-team/ionic-native/commit/fd8107b))
|
||||
* **background-fetch:** Adding Background Fetch requested in [#990](https://github.com/ionic-team/ionic-native/issues/990) ([#1013](https://github.com/ionic-team/ionic-native/issues/1013)) ([57e2691](https://github.com/ionic-team/ionic-native/commit/57e2691))
|
||||
* **browser-tab:** add browser tab plugin ([#1126](https://github.com/ionic-team/ionic-native/issues/1126)) ([8de3793](https://github.com/ionic-team/ionic-native/commit/8de3793)), closes [#1115](https://github.com/ionic-team/ionic-native/issues/1115)
|
||||
* **browser-tab:** add browser tab plugin ([#1126](https://github.com/ionic-team/ionic-native/issues/1126)) ([8de3793](https://github.com/ionic-team/ionic-native/commit/8de3793)), closes [#1115](https://github.com/ionic-team/ionic-native/issues/1115) [#1077](https://github.com/ionic-team/ionic-native/issues/1077)
|
||||
* **couchbase-lite:** add CouchbaseLite cordova plugin ([#1025](https://github.com/ionic-team/ionic-native/issues/1025)) ([09a7dcf](https://github.com/ionic-team/ionic-native/commit/09a7dcf))
|
||||
* **file:** add system paths ([f0e2195](https://github.com/ionic-team/ionic-native/commit/f0e2195))
|
||||
* **google-maps:** add constant for map type ([318ad3f](https://github.com/ionic-team/ionic-native/commit/318ad3f))
|
||||
@@ -1179,7 +1346,7 @@ The whole implementation has changed now. You must update your code.
|
||||
|
||||
* **actionsheet:** add ActionSheetOptions interface ([f211da7](https://github.com/ionic-team/ionic-native/commit/f211da7))
|
||||
* **googlemap:** add disableAutoPan to GoogleMapsMarkerOptions ([cf75a53](https://github.com/ionic-team/ionic-native/commit/cf75a53)), closes [#844](https://github.com/ionic-team/ionic-native/issues/844)
|
||||
* **googlemaps:** add markerClick and infoClick to MarkerOptions ([6f7171d](https://github.com/ionic-team/ionic-native/commit/6f7171d))
|
||||
* **googlemaps:** add markerClick and infoClick to MarkerOptions ([6f7171d](https://github.com/ionic-team/ionic-native/commit/6f7171d)), closes [#844](https://github.com/ionic-team/ionic-native/issues/844)
|
||||
|
||||
|
||||
|
||||
@@ -1302,7 +1469,7 @@ The whole implementation has changed now. You must update your code.
|
||||
### Bug Fixes
|
||||
|
||||
* **diagnostic:** misspelled getContactsAuthorizationStatus method ([#678](https://github.com/ionic-team/ionic-native/issues/678)) ([bff4862](https://github.com/ionic-team/ionic-native/commit/bff4862))
|
||||
* **file:** fix writeFile method ([842a80d](https://github.com/ionic-team/ionic-native/commit/842a80d))
|
||||
* **file:** fix writeFile method ([842a80d](https://github.com/ionic-team/ionic-native/commit/842a80d)), closes [#464](https://github.com/ionic-team/ionic-native/issues/464) [#552](https://github.com/ionic-team/ionic-native/issues/552) [#666](https://github.com/ionic-team/ionic-native/issues/666)
|
||||
* **file:** last parameter for writeFile now only accepts options ([5710eb7](https://github.com/ionic-team/ionic-native/commit/5710eb7))
|
||||
* **http:** export via window.IonicNative ([#675](https://github.com/ionic-team/ionic-native/issues/675)) ([cf7abe1](https://github.com/ionic-team/ionic-native/commit/cf7abe1))
|
||||
* **location-accuracy:** accuracy param is number ([c2d4f1c](https://github.com/ionic-team/ionic-native/commit/c2d4f1c)), closes [#676](https://github.com/ionic-team/ionic-native/issues/676)
|
||||
@@ -1518,7 +1685,7 @@ The whole implementation has changed now. You must update your code.
|
||||
* **market:** add Market plugin support ([#490](https://github.com/ionic-team/ionic-native/issues/490)) ([9bcc4ed](https://github.com/ionic-team/ionic-native/commit/9bcc4ed))
|
||||
* **mixpanel:** add mixpanel support ([#492](https://github.com/ionic-team/ionic-native/issues/492)) ([cf8e342](https://github.com/ionic-team/ionic-native/commit/cf8e342))
|
||||
* **native-page-transitions:** add support for Native Page Transitions plugin ([#488](https://github.com/ionic-team/ionic-native/issues/488)) ([00d87db](https://github.com/ionic-team/ionic-native/commit/00d87db))
|
||||
* **nfc:** add nfc support ([#493](https://github.com/ionic-team/ionic-native/issues/493)) ([76aa8a6](https://github.com/ionic-team/ionic-native/commit/76aa8a6))
|
||||
* **nfc:** add nfc support ([#493](https://github.com/ionic-team/ionic-native/issues/493)) ([76aa8a6](https://github.com/ionic-team/ionic-native/commit/76aa8a6)), closes [#412](https://github.com/ionic-team/ionic-native/issues/412)
|
||||
* **paypal:** add PayPal support ([#491](https://github.com/ionic-team/ionic-native/issues/491)) ([9fe5c19](https://github.com/ionic-team/ionic-native/commit/9fe5c19))
|
||||
* **power-management:** add power management support ([#489](https://github.com/ionic-team/ionic-native/issues/489)) ([cd82a53](https://github.com/ionic-team/ionic-native/commit/cd82a53))
|
||||
* **streaming-media:** add streaming media support ([#486](https://github.com/ionic-team/ionic-native/issues/486)) ([841b242](https://github.com/ionic-team/ionic-native/commit/841b242))
|
||||
@@ -1539,7 +1706,7 @@ The whole implementation has changed now. You must update your code.
|
||||
### Features
|
||||
|
||||
* **code-push:** add wrapper for cordova-plugin-code-push ([#420](https://github.com/ionic-team/ionic-native/issues/420)) ([905f988](https://github.com/ionic-team/ionic-native/commit/905f988))
|
||||
* **diagnostic:** add full plugin functionality ([#424](https://github.com/ionic-team/ionic-native/issues/424)) ([47a9b34](https://github.com/ionic-team/ionic-native/commit/47a9b34)), closes [#224](https://github.com/ionic-team/ionic-native/issues/224)
|
||||
* **diagnostic:** add full plugin functionality ([#424](https://github.com/ionic-team/ionic-native/issues/424)) ([47a9b34](https://github.com/ionic-team/ionic-native/commit/47a9b34)), closes [#224](https://github.com/ionic-team/ionic-native/issues/224) [#476](https://github.com/ionic-team/ionic-native/issues/476)
|
||||
* **geofence:** Adds geofence plugin ([#442](https://github.com/ionic-team/ionic-native/issues/442)) ([a438967](https://github.com/ionic-team/ionic-native/commit/a438967))
|
||||
* **inAppPurchase:** add inAppPurhcase plugin ([#423](https://github.com/ionic-team/ionic-native/issues/423)) ([8526e89](https://github.com/ionic-team/ionic-native/commit/8526e89))
|
||||
* **IsDebug:** add the IsDebug plugin ([#475](https://github.com/ionic-team/ionic-native/issues/475)) ([dd39ba8](https://github.com/ionic-team/ionic-native/commit/dd39ba8))
|
||||
@@ -1636,7 +1803,7 @@ The whole implementation has changed now. You must update your code.
|
||||
* **inappbrowser:** implement instance based wrapper ([#305](https://github.com/ionic-team/ionic-native/issues/305)) ([4b8ab4a](https://github.com/ionic-team/ionic-native/commit/4b8ab4a))
|
||||
* **keyboard:** enable hideKeyboardAccessoryBar function ([#398](https://github.com/ionic-team/ionic-native/issues/398)) ([7a84262](https://github.com/ionic-team/ionic-native/commit/7a84262)), closes [#394](https://github.com/ionic-team/ionic-native/issues/394)
|
||||
* **photo-viewer:** add wrapper for plugin ([#359](https://github.com/ionic-team/ionic-native/issues/359)) ([154c029](https://github.com/ionic-team/ionic-native/commit/154c029))
|
||||
* **video-player:** Added video player plugin ([#391](https://github.com/ionic-team/ionic-native/issues/391)) ([cabeeb8](https://github.com/ionic-team/ionic-native/commit/cabeeb8)), closes [#342](https://github.com/ionic-team/ionic-native/issues/342)
|
||||
* **video-player:** Added video player plugin ([#391](https://github.com/ionic-team/ionic-native/issues/391)) ([cabeeb8](https://github.com/ionic-team/ionic-native/commit/cabeeb8)), closes [#342](https://github.com/ionic-team/ionic-native/issues/342) [#318](https://github.com/ionic-team/ionic-native/issues/318)
|
||||
|
||||
|
||||
|
||||
|
||||
+3
-3
@@ -115,11 +115,11 @@ You need to run `npm run build` in the `ionic-native` project, this will create
|
||||
|
||||
### Cleaning the code
|
||||
|
||||
You need to run `npm run lint` to analyze the code and ensure it's consistency with the repository style. Fix any errors before submitting a PR.
|
||||
You need to run `npm run lint` to analyze the code and ensure its consistency with the repository style. Fix any errors before submitting a PR.
|
||||
|
||||
### 'Wrapping' Up
|
||||
|
||||
That's it! The only thing left to do is rigorously document the plugin and it's usage. Take a look at some of the other plugins for good documentation styles.
|
||||
That's it! The only thing left to do is rigorously document the plugin and its usage. Take a look at some of the other plugins for good documentation styles.
|
||||
|
||||
## Commit Message Format
|
||||
|
||||
@@ -218,4 +218,4 @@ Example:
|
||||
```ts
|
||||
@CordovaFunctionOverride()
|
||||
someMethod(): Observable<any> { return; }
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
[](https://circleci.com/gh/ionic-team/ionic-native) [](http://commitizen.github.io/cz-cli/) 
|
||||
|
||||
|
||||
# Ionic Native
|
||||
|
||||
Ionic Native is a curated set of wrappers for Cordova plugins that make adding any native functionality you need to your [Ionic](https://ionicframework.com/) mobile app easy.
|
||||
@@ -10,8 +9,9 @@ Ionic Native wraps plugin callbacks in a Promise or Observable, providing a comm
|
||||
## Installation
|
||||
|
||||
Run following command to install Ionic Native in your project.
|
||||
|
||||
```bash
|
||||
npm install @ionic-native/core --save
|
||||
npm install @ionic-native/core
|
||||
```
|
||||
|
||||
You also need to install the Ionic Native package for each plugin you want to add. Please see the [Ionic Native documentation](https://ionicframework.com/docs/native/) for complete instructions on how to add and use the plugins.
|
||||
@@ -47,17 +47,15 @@ export class AppModule { }
|
||||
import { Geolocation } from '@ionic-native/geolocation';
|
||||
import { Platform } from 'ionic-angular';
|
||||
|
||||
import { NgZone } from '@angular/core';
|
||||
|
||||
@Component({ ... })
|
||||
export class MyComponent {
|
||||
|
||||
constructor(private geolocation: Geolocation, private platform: Platform) {
|
||||
|
||||
platform.ready().then(() => {
|
||||
this.platform.ready().then(() => {
|
||||
|
||||
// get position
|
||||
geolocation.getCurrentPosition().then(pos => {
|
||||
this.geolocation.getCurrentPosition().then(pos => {
|
||||
console.log(`lat: ${pos.coords.latitude}, lon: ${pos.coords.longitude}`)
|
||||
});
|
||||
|
||||
@@ -65,15 +63,14 @@ export class MyComponent {
|
||||
// watch position
|
||||
const watch = geolocation.watchPosition().subscribe(pos => {
|
||||
console.log(`lat: ${pos.coords.latitude}, lon: ${pos.coords.longitude}`)
|
||||
this.position = pos;
|
||||
});
|
||||
|
||||
// to stop watching
|
||||
watch.unsubscribe();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
@@ -95,8 +92,8 @@ Then create a new class that extends the `Camera` class with a mock implementati
|
||||
class CameraMock extends Camera {
|
||||
getPicture(options) {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve("BASE_64_ENCODED_DATA_GOES_HERE");
|
||||
})
|
||||
resolve('BASE_64_ENCODED_DATA_GOES_HERE');
|
||||
});
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -104,61 +101,49 @@ class CameraMock extends Camera {
|
||||
Finally, override the previous `Camera` class in your `providers` for this module:
|
||||
|
||||
```typescript
|
||||
providers: [
|
||||
{ provide: Camera, useClass: CameraMock }
|
||||
]
|
||||
providers: [{ provide: Camera, useClass: CameraMock }];
|
||||
```
|
||||
|
||||
Here's the full example:
|
||||
|
||||
```typescript
|
||||
import { NgModule, ErrorHandler } from '@angular/core';
|
||||
import { ErrorHandler, NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
|
||||
import { MyApp } from './app.component';
|
||||
import { HomePage } from '../pages/home/home';
|
||||
|
||||
import { Camera } from '@ionic-native/camera';
|
||||
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
|
||||
|
||||
import { HomePage } from '../pages/home/home';
|
||||
import { MyApp } from './app.component';
|
||||
|
||||
class CameraMock extends Camera {
|
||||
getPicture(options) {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve("BASE_64_ENCODED_DATA_GOES_HERE");
|
||||
})
|
||||
resolve('BASE_64_ENCODED_DATA_GOES_HERE');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
MyApp,
|
||||
HomePage
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
IonicModule.forRoot(MyApp)
|
||||
],
|
||||
declarations: [MyApp, HomePage],
|
||||
imports: [BrowserModule, IonicModule.forRoot(MyApp)],
|
||||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
MyApp,
|
||||
HomePage
|
||||
],
|
||||
entryComponents: [MyApp, HomePage],
|
||||
providers: [
|
||||
{provide: ErrorHandler, useClass: IonicErrorHandler},
|
||||
{ provide: ErrorHandler, useClass: IonicErrorHandler },
|
||||
{ provide: Camera, useClass: CameraMock }
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
||||
```
|
||||
|
||||
|
||||
### Runtime Diagnostics
|
||||
|
||||
Spent way too long diagnosing an issue only to realize a plugin wasn't firing or installed? Ionic Native lets you know what the issue is and how you can resolve it.
|
||||
|
||||

|
||||
|
||||
|
||||
## Plugin Missing?
|
||||
|
||||
Let us know or submit a PR! Take a look at [the Developer Guide](https://github.com/ionic-team/ionic-native/blob/master/DEVELOPER.md) for more on how to contribute. :heart:
|
||||
|
||||
## Ionic v1 (AngularJS, Angular 1.x) support
|
||||
@@ -169,6 +154,8 @@ For Ionic v1 (AngularJS, Angular 1.x) support, please use version 2 of Ionic Nat
|
||||
|
||||
Ibby Hadeed - [@ihadeed](https://github.com/ihadeed)
|
||||
|
||||
Daniel Sogl - [@sogldaniel](https://twitter.com/sogldaniel)
|
||||
|
||||
Tim Lancina - [@timlancina](https://twitter.com/timlancina)
|
||||
|
||||
Mike Hartington - [@mhartington](https://twitter.com/mhartington)
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ jobs:
|
||||
build:
|
||||
working_directory: ~/ionic-native/
|
||||
docker:
|
||||
- image: node:7
|
||||
- image: node:8
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
|
||||
+18
-16
@@ -1,51 +1,53 @@
|
||||
"use strict";
|
||||
'use strict';
|
||||
|
||||
const gulp = require('gulp'),
|
||||
minimist = require('minimist'),
|
||||
rename = require("gulp-rename"),
|
||||
rename = require('gulp-rename'),
|
||||
tslint = require('gulp-tslint'),
|
||||
decamelize = require('decamelize'),
|
||||
replace = require('gulp-replace'),
|
||||
_ = require('lodash');
|
||||
|
||||
const flagConfig = {
|
||||
string: ['port', 'version', 'ngVersion', 'animations'],
|
||||
boolean: ['dry-run'],
|
||||
alias: {'p': 'port', 'v': 'version', 'a': 'ngVersion'},
|
||||
alias: { p: 'port', v: 'version', a: 'ngVersion' },
|
||||
default: { port: 8000 }
|
||||
},
|
||||
|
||||
flags = minimist(process.argv.slice(2), flagConfig);
|
||||
|
||||
/* Docs tasks */
|
||||
require('./scripts/docs/gulp-tasks')(gulp, flags);
|
||||
|
||||
gulp.task('lint', () => {
|
||||
return gulp.src('src/**/*.ts')
|
||||
.pipe(tslint({
|
||||
formatter: "verbose",
|
||||
configuration: 'tslint.json'
|
||||
}))
|
||||
return gulp
|
||||
.src('src/**/*.ts')
|
||||
.pipe(
|
||||
tslint({
|
||||
formatter: 'verbose',
|
||||
configuration: 'tslint.json'
|
||||
})
|
||||
)
|
||||
.pipe(tslint.report());
|
||||
});
|
||||
|
||||
gulp.task('plugin:create', () => {
|
||||
if (flags.n && flags.n !== ''){
|
||||
|
||||
const src = flags.m ? './scripts/templates/wrap-min.tmpl':'./scripts/templates/wrap.tmpl',
|
||||
if (flags.n && flags.n !== '') {
|
||||
const src = flags.m
|
||||
? './scripts/templates/wrap-min.tmpl'
|
||||
: './scripts/templates/wrap.tmpl',
|
||||
pluginName = flags.n,
|
||||
spaced = pluginName.replace(/(?!^)([A-Z])/g, ' $1'),
|
||||
kebabCase = _.kebabCase(pluginName);
|
||||
|
||||
return gulp.src(src)
|
||||
return gulp
|
||||
.src(src)
|
||||
.pipe(replace('{{ PluginName }}', pluginName))
|
||||
.pipe(replace('{{ Plugin_Name }}', spaced))
|
||||
.pipe(replace('{{ pluginName }}', _.lowerFirst(pluginName)))
|
||||
.pipe(replace('{{ plugin-name }}', kebabCase))
|
||||
.pipe(rename('index.ts'))
|
||||
.pipe(gulp.dest('./src/@ionic-native/plugins/' + kebabCase));
|
||||
|
||||
} else {
|
||||
console.log("Usage is: gulp plugin:create -n PluginName");
|
||||
console.log('Usage is: gulp plugin:create -n PluginName');
|
||||
}
|
||||
});
|
||||
|
||||
+7
-22
@@ -1,18 +1,10 @@
|
||||
"use strict";
|
||||
'use strict';
|
||||
|
||||
module.exports = config => {
|
||||
|
||||
const conf = {
|
||||
frameworks: [
|
||||
'jasmine',
|
||||
'karma-typescript'
|
||||
],
|
||||
frameworks: ['jasmine', 'karma-typescript'],
|
||||
|
||||
plugins: [
|
||||
'karma-typescript',
|
||||
'karma-jasmine',
|
||||
'karma-phantomjs-launcher'
|
||||
],
|
||||
plugins: ['karma-typescript', 'karma-jasmine', 'karma-phantomjs-launcher'],
|
||||
|
||||
preprocessors: {
|
||||
'src/**/*.ts': ['karma-typescript']
|
||||
@@ -21,22 +13,18 @@ module.exports = config => {
|
||||
karmaTypescriptConfig: {
|
||||
bundlerOptions: {
|
||||
entrypoints: /\.spec\.ts$/,
|
||||
transforms: [
|
||||
require("karma-typescript-es6-transform")()
|
||||
]
|
||||
transforms: [require('karma-typescript-es6-transform')()]
|
||||
},
|
||||
compilerOptions: {
|
||||
lib: ['es2015', 'dom'],
|
||||
paths: {
|
||||
"@ionic-native/core": ["./src/@ionic-native/core"]
|
||||
'@ionic-native/core': ['./src/@ionic-native/core']
|
||||
},
|
||||
baseUrl: '.'
|
||||
}
|
||||
},
|
||||
|
||||
files: [
|
||||
{ pattern: 'src/**/*.ts', included: true, watched: true }
|
||||
],
|
||||
files: [{ pattern: 'src/**/*.ts', included: true, watched: true }],
|
||||
|
||||
reporters: ['progress'],
|
||||
|
||||
@@ -44,12 +32,9 @@ module.exports = config => {
|
||||
colors: true,
|
||||
logLevel: config.INFO,
|
||||
autoWatch: true,
|
||||
browsers: [
|
||||
'PhantomJS'
|
||||
],
|
||||
browsers: ['PhantomJS'],
|
||||
singleRun: false
|
||||
};
|
||||
|
||||
config.set(conf);
|
||||
|
||||
};
|
||||
|
||||
Generated
+5750
-1996
File diff suppressed because it is too large
Load Diff
+22
-24
@@ -1,50 +1,48 @@
|
||||
{
|
||||
"name": "ionic-native",
|
||||
"version": "4.7.0",
|
||||
"version": "4.12.2",
|
||||
"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)",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@angular/compiler": "4.4.4",
|
||||
"@angular/compiler-cli": "4.4.4",
|
||||
"@angular/core": "4.4.4",
|
||||
"@angular/compiler": "^5.2.11",
|
||||
"@angular/compiler-cli": "^5.2.11",
|
||||
"@angular/core": "^5.2.11",
|
||||
"@types/cordova": "0.0.34",
|
||||
"@types/jasmine": "^2.6.3",
|
||||
"@types/node": "^8.0.50",
|
||||
"@types/jasmine": "^2.8.8",
|
||||
"@types/node": "8.10.20",
|
||||
"canonical-path": "0.0.2",
|
||||
"child-process-promise": "2.2.1",
|
||||
"conventional-changelog-cli": "1.3.4",
|
||||
"cpr": "2.0.0",
|
||||
"cz-conventional-changelog": "2.0.0",
|
||||
"decamelize": "1.2.0",
|
||||
"conventional-changelog-cli": "^2.0.5",
|
||||
"cz-conventional-changelog": "^2.1.0",
|
||||
"dgeni": "0.4.7",
|
||||
"dgeni-packages": "0.16.10",
|
||||
"fs-extra": "2.0.0",
|
||||
"fs-extra-promise": "0.4.1",
|
||||
"gulp": "3.9.1",
|
||||
"gulp-rename": "1.2.2",
|
||||
"gulp-replace": "0.5.4",
|
||||
"gulp-rename": "^1.4.0",
|
||||
"gulp-replace": "^1.0.0",
|
||||
"gulp-tslint": "6.1.2",
|
||||
"jasmine-core": "^2.6.1",
|
||||
"karma": "^1.7.0",
|
||||
"jasmine-core": "^3.2.1",
|
||||
"karma": "^2.0.5",
|
||||
"karma-cli": "^1.0.1",
|
||||
"karma-jasmine": "^1.1.0",
|
||||
"karma-jasmine": "^1.1.2",
|
||||
"karma-phantomjs-launcher": "^1.0.4",
|
||||
"karma-typescript": "^3.0.1",
|
||||
"karma-typescript-es6-transform": "^1.0.0",
|
||||
"lodash": "4.17.4",
|
||||
"karma-typescript": "^3.0.13",
|
||||
"karma-typescript-es6-transform": "^1.0.4",
|
||||
"lodash": "^4.17.10",
|
||||
"minimist": "1.2.0",
|
||||
"node-html-encoder": "0.0.2",
|
||||
"q": "1.5.0",
|
||||
"queue": "4.2.1",
|
||||
"rimraf": "2.6.1",
|
||||
"rxjs": "5.5.2",
|
||||
"semver": "5.3.0",
|
||||
"q": "^1.5.1",
|
||||
"queue": "^4.5.0",
|
||||
"rimraf": "^2.6.2",
|
||||
"rxjs": "^5.5.12",
|
||||
"semver": "^5.5.1",
|
||||
"tslint": "3.15.1",
|
||||
"tslint-ionic-rules": "0.0.8",
|
||||
"typescript": "~2.4.2",
|
||||
"zone.js": "0.8.18"
|
||||
"zone.js": "^0.8.26"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "npm run test:watch",
|
||||
|
||||
+33
-38
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
'use strict';
|
||||
// Node module dependencies
|
||||
const fs = require('fs-extra-promise').useFs(require('fs-extra')),
|
||||
queue = require('queue'),
|
||||
@@ -15,22 +15,21 @@ const ROOT = path.resolve(path.join(__dirname, '../../')), // root ionic-native
|
||||
BUILD_DIST_ROOT = path.resolve(ROOT, 'dist/@ionic-native'), // dist directory root path
|
||||
BUILD_CORE_DIST = path.resolve(BUILD_DIST_ROOT, 'core'); // core dist directory path
|
||||
|
||||
|
||||
// dependency versions
|
||||
const ANGULAR_VERSION = '*',
|
||||
RXJS_VERSION = '^5.0.1',
|
||||
MIN_CORE_VERSION = '^4.2.0',
|
||||
RXJS_VERSION = '^5.5.11',
|
||||
MIN_CORE_VERSION = '^4.11.0',
|
||||
IONIC_NATIVE_VERSION = require(path.resolve(ROOT, 'package.json')).version;
|
||||
|
||||
// package dependencies
|
||||
const CORE_PEER_DEPS = {
|
||||
'rxjs': RXJS_VERSION
|
||||
rxjs: RXJS_VERSION
|
||||
};
|
||||
|
||||
const PLUGIN_PEER_DEPS = {
|
||||
'@ionic-native/core': MIN_CORE_VERSION,
|
||||
'@angular/core': ANGULAR_VERSION,
|
||||
'rxjs': RXJS_VERSION
|
||||
rxjs: RXJS_VERSION
|
||||
};
|
||||
|
||||
// set peer dependencies for all plugins
|
||||
@@ -44,8 +43,10 @@ fs.mkdirpSync(BUILD_TMP);
|
||||
console.log('Preparing core module package.json');
|
||||
CORE_PACKAGE_JSON.version = IONIC_NATIVE_VERSION;
|
||||
CORE_PACKAGE_JSON.peerDependencies = CORE_PEER_DEPS;
|
||||
fs.writeJsonSync(path.resolve(BUILD_CORE_DIST, 'package.json'), CORE_PACKAGE_JSON);
|
||||
|
||||
fs.writeJsonSync(
|
||||
path.resolve(BUILD_CORE_DIST, 'package.json'),
|
||||
CORE_PACKAGE_JSON
|
||||
);
|
||||
|
||||
// Fetch a list of the plugins
|
||||
const PLUGINS = fs.readdirSync(PLUGINS_PATH);
|
||||
@@ -59,7 +60,9 @@ const index = pluginsToBuild.indexOf('ignore-errors');
|
||||
if (index > -1) {
|
||||
ignoreErrors = true;
|
||||
pluginsToBuild.splice(index, 1);
|
||||
console.log('Build will continue even if errors were thrown. Errors will be printed when build finishes.');
|
||||
console.log(
|
||||
'Build will continue even if errors were thrown. Errors will be printed when build finishes.'
|
||||
);
|
||||
}
|
||||
|
||||
if (!pluginsToBuild.length) {
|
||||
@@ -71,12 +74,9 @@ const QUEUE = queue({
|
||||
concurrency: require('os').cpus().length
|
||||
});
|
||||
|
||||
|
||||
// Function to process a single plugin
|
||||
const addPluginToQueue = pluginName => {
|
||||
|
||||
QUEUE.push((callback) => {
|
||||
|
||||
QUEUE.push(callback => {
|
||||
console.log(`Building plugin: ${pluginName}`);
|
||||
|
||||
const PLUGIN_BUILD_DIR = path.resolve(BUILD_TMP, 'plugins', pluginName),
|
||||
@@ -87,7 +87,6 @@ const addPluginToQueue = pluginName => {
|
||||
fs.mkdirpAsync(PLUGIN_BUILD_DIR) // create tmp build dir
|
||||
.then(() => fs.mkdirpAsync(path.resolve(BUILD_DIST_ROOT, pluginName))) // create dist dir
|
||||
.then(() => {
|
||||
|
||||
// Write tsconfig.json
|
||||
const tsConfig = JSON.parse(JSON.stringify(PLUGIN_TS_CONFIG));
|
||||
tsConfig.files = [PLUGIN_SRC_PATH];
|
||||
@@ -104,42 +103,39 @@ const addPluginToQueue = pluginName => {
|
||||
packageJson.name = `@ionic-native/${pluginName}`;
|
||||
packageJson.version = IONIC_NATIVE_VERSION;
|
||||
|
||||
return fs.writeJsonAsync(path.resolve(BUILD_DIST_ROOT, pluginName, 'package.json'), packageJson);
|
||||
return fs.writeJsonAsync(
|
||||
path.resolve(BUILD_DIST_ROOT, pluginName, 'package.json'),
|
||||
packageJson
|
||||
);
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
// compile the plugin
|
||||
exec(`${ROOT}/node_modules/.bin/ngc -p ${tsConfigPath}`, (err, stdout, stderr) => {
|
||||
|
||||
if (err) {
|
||||
|
||||
if (!ignoreErrors) {
|
||||
// oops! something went wrong.
|
||||
console.log(err);
|
||||
callback(`\n\nBuilding ${pluginName} failed.`);
|
||||
return;
|
||||
} else {
|
||||
errors.push(err);
|
||||
exec(
|
||||
`${ROOT}/node_modules/.bin/ngc -p ${tsConfigPath}`,
|
||||
(err, stdout, stderr) => {
|
||||
if (err) {
|
||||
if (!ignoreErrors) {
|
||||
// oops! something went wrong.
|
||||
console.log(err);
|
||||
callback(`\n\nBuilding ${pluginName} failed.`);
|
||||
return;
|
||||
} else {
|
||||
errors.push(err);
|
||||
}
|
||||
}
|
||||
|
||||
// we're done with this plugin!
|
||||
callback();
|
||||
}
|
||||
|
||||
// we're done with this plugin!
|
||||
callback();
|
||||
|
||||
});
|
||||
|
||||
);
|
||||
})
|
||||
.catch(callback);
|
||||
|
||||
}); // QUEUE.push end
|
||||
|
||||
};
|
||||
|
||||
pluginsToBuild.forEach(addPluginToQueue);
|
||||
|
||||
QUEUE.start((err) => {
|
||||
|
||||
QUEUE.start(err => {
|
||||
if (err) {
|
||||
console.log('Error building plugins.');
|
||||
console.log(err);
|
||||
@@ -155,5 +151,4 @@ QUEUE.start((err) => {
|
||||
} else {
|
||||
console.log('Done processing plugins!');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
"use strict";
|
||||
'use strict';
|
||||
// Node module dependencies
|
||||
const fs = require('fs-extra-promise').useFs(require('fs-extra')),
|
||||
queue = require('queue'),
|
||||
path = require('path'),
|
||||
exec = require('child-process-promise').exec;
|
||||
|
||||
|
||||
const ROOT = path.resolve(path.join(__dirname, '../../')),
|
||||
DIST = path.resolve(ROOT, 'dist', '@ionic-native');
|
||||
|
||||
@@ -20,15 +19,16 @@ const QUEUE = queue({
|
||||
});
|
||||
|
||||
PACKAGES.forEach(packageName => {
|
||||
|
||||
QUEUE.push(done => {
|
||||
|
||||
console.log(`Publishing @ionic-native/${packageName}`);
|
||||
const packagePath = path.resolve(DIST, packageName);
|
||||
exec(`npm publish ${packagePath} ${FLAGS}`)
|
||||
.then(() => done())
|
||||
.catch((e) => {
|
||||
if (e.stderr && e.stderr.indexOf('previously published version') === -1) {
|
||||
.catch(e => {
|
||||
if (
|
||||
e.stderr &&
|
||||
e.stderr.indexOf('previously published version') === -1
|
||||
) {
|
||||
failedPackages.push({
|
||||
cmd: e.cmd,
|
||||
stderr: e.stderr
|
||||
@@ -36,13 +36,10 @@ PACKAGES.forEach(packageName => {
|
||||
}
|
||||
done();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
QUEUE.start((err) => {
|
||||
|
||||
QUEUE.start(err => {
|
||||
if (err) {
|
||||
console.log('Error publishing ionic-native. ', err);
|
||||
} else if (failedPackages.length > 0) {
|
||||
@@ -51,8 +48,4 @@ QUEUE.start((err) => {
|
||||
} else {
|
||||
console.log('Done publishing ionic-native!');
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
+16
-10
@@ -9,37 +9,41 @@ exec(`git branch | grep \\* | cut -d ' ' -f2`)
|
||||
const branch = output.stdout.trim();
|
||||
|
||||
if (branch !== 'master') {
|
||||
|
||||
console.log('Merging master branch in ...');
|
||||
// not on master branch
|
||||
// let's test the changes that were made
|
||||
return exec(`git merge origin master`);
|
||||
}
|
||||
})
|
||||
.then((output) => {
|
||||
.then(output => {
|
||||
if (output && output.stderr) {
|
||||
return Promise.reject(output.stderr);
|
||||
}
|
||||
console.log('Checking for differences ...');
|
||||
return exec(`git diff --name-status origin master`)
|
||||
return exec(`git diff --name-status origin master`);
|
||||
})
|
||||
.then((output) => {
|
||||
.then(output => {
|
||||
if (output && output.stderr) {
|
||||
return Promise.reject(output.stderr);
|
||||
}
|
||||
|
||||
diff = output.stdout;
|
||||
diff = diff.replace(/A\s+/g, '');
|
||||
diff = diff.match(/src\/@ionic-native\/plugins\/([a-zA-Z0-9\-]+)\/index\.ts/g);
|
||||
diff = diff.match(
|
||||
/src\/@ionic-native\/plugins\/([a-zA-Z0-9\-]+)\/index\.ts/g
|
||||
);
|
||||
|
||||
if (!diff) process.exit();
|
||||
|
||||
console.log(`${ diff.length } plugins were modified. We will now build them to verify they still work.`);
|
||||
console.log(
|
||||
`${
|
||||
diff.length
|
||||
} plugins were modified. We will now build them to verify they still work.`
|
||||
);
|
||||
|
||||
return exec('npm run build:core --silent');
|
||||
})
|
||||
.then((output) => {
|
||||
|
||||
.then(output => {
|
||||
if (output && output.stderr) {
|
||||
return Promise.reject(output.stderr);
|
||||
}
|
||||
@@ -47,11 +51,13 @@ exec(`git branch | grep \\* | cut -d ' ' -f2`)
|
||||
console.log('Built core library successfully ...');
|
||||
console.log('Building plugins ...');
|
||||
|
||||
diff = diff.map(text => text.replace('src/@ionic-native/plugins/', '').replace('/index.ts', ''));
|
||||
diff = diff.map(text =>
|
||||
text.replace('src/@ionic-native/plugins/', '').replace('/index.ts', '')
|
||||
);
|
||||
|
||||
return exec(`npm run build:modules ${diff.join(' ')} --silent`);
|
||||
})
|
||||
.then((output) => {
|
||||
.then(output => {
|
||||
if (output && output.stderr) {
|
||||
console.log(output.stderr);
|
||||
process.exit(1);
|
||||
|
||||
@@ -10,6 +10,12 @@ module.exports = function jekyll(renderDocsProcessor) {
|
||||
// pretty up and sort the docs object for menu generation
|
||||
docs = docs.filter(doc => (!!doc.name && !!doc.outputPath) || doc.docType === 'index-page');
|
||||
|
||||
docs.push({
|
||||
docType: 'class',
|
||||
URL: 'https://github.com/ionic-team/ionic-native-google-maps/blob/master/documents/README.md',
|
||||
name: 'Google Maps',
|
||||
});
|
||||
|
||||
docs.sort((a, b) => {
|
||||
const textA = a.name ? a.name.toUpperCase() : '',
|
||||
textB = b.name ? b.name.toUpperCase() : '';
|
||||
@@ -18,14 +24,20 @@ module.exports = function jekyll(renderDocsProcessor) {
|
||||
});
|
||||
|
||||
docs.forEach(doc => {
|
||||
if (!doc.outputPath) {
|
||||
return;
|
||||
}
|
||||
|
||||
doc.outputPath = doc.outputPath.toLowerCase().replace(/\s/g, '-');
|
||||
doc.URL = doc.outputPath.replace('docs//', 'docs/')
|
||||
.replace('/index.md', '')
|
||||
.replace('content/', '');
|
||||
// add trailing slash to plugin pages
|
||||
if(!doc.URL.endsWith("/") && !doc.URL.endsWith(".html")) {
|
||||
doc.URL = doc.URL+'/';
|
||||
doc.URL = doc.URL + '/';
|
||||
}
|
||||
|
||||
doc.URL = '/' + doc.URL;
|
||||
});
|
||||
|
||||
const betaDocs = [];
|
||||
|
||||
+1
-1
@@ -6,5 +6,5 @@
|
||||
</li>
|
||||
<@- for doc in docs @><@ if doc.URL and doc.private != true @>
|
||||
<li class="capitalize {% if page.id == '<$ doc.name|lower|dashify $>' %}active{% endif %}">
|
||||
<a href="/<$ doc.URL $>"><$ doc.name $><@ if doc.paid == true @> <span class="paid">Paid</span><@ endif @><@ if doc.beta == true @> <span class="beta">β</span><@ endif @></a>
|
||||
<a href="<$ doc.URL $>"><$ doc.name $><@ if doc.paid == true @> <span class="paid">Paid</span><@ endif @><@ if doc.beta == true @> <span class="beta">β</span><@ endif @></a>
|
||||
</li><@ endif @><@ endfor @>
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
* - Add/Change information below
|
||||
* - Document usage (importing, executing main functionality)
|
||||
* - Remove any imports that you are not using
|
||||
* - Add this file to /src/index.ts (follow style of other plugins)
|
||||
* - Remove all the comments included in this template, EXCEPT the @Plugin wrapper docs and any other docs you added
|
||||
* - Remove this note
|
||||
*
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
* - Add/Change information below
|
||||
* - Document usage (importing, executing main functionality)
|
||||
* - Remove any imports that you are not using
|
||||
* - Add this file to /src/index.ts (follow style of other plugins)
|
||||
* - Remove all the comments included in this template, EXCEPT the @Plugin wrapper docs and any other docs you added
|
||||
* - Remove this note
|
||||
*
|
||||
|
||||
@@ -2,14 +2,7 @@ import 'core-js';
|
||||
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import {
|
||||
Cordova,
|
||||
CordovaCheck,
|
||||
CordovaInstance,
|
||||
CordovaProperty,
|
||||
InstanceProperty,
|
||||
Plugin
|
||||
} from './decorators';
|
||||
import { Cordova, CordovaCheck, CordovaInstance, CordovaProperty, InstanceProperty, Plugin } from './decorators';
|
||||
import { IonicNativePlugin } from './ionic-native-plugin';
|
||||
import { ERR_CORDOVA_NOT_AVAILABLE, ERR_PLUGIN_NOT_INSTALLED } from './plugin';
|
||||
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
import 'rxjs/observable/throw';
|
||||
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { _throw } from 'rxjs/observable/throw';
|
||||
|
||||
import {
|
||||
checkAvailability,
|
||||
instanceAvailability,
|
||||
overrideFunction,
|
||||
wrap,
|
||||
wrapInstance
|
||||
} from './plugin';
|
||||
import { checkAvailability, instanceAvailability, overrideFunction, wrap, wrapInstance } from './plugin';
|
||||
import { getPlugin, getPromise } from './util';
|
||||
|
||||
export interface PluginConfig {
|
||||
@@ -160,7 +153,7 @@ export function CordovaCheck(opts: CordovaCheckOptions = {}) {
|
||||
if (opts.sync) {
|
||||
return null;
|
||||
} else if (opts.observable) {
|
||||
return Observable.throw(new Error(check && check.error));
|
||||
return _throw(new Error(check && check.error));
|
||||
}
|
||||
return Promise.reject(check && check.error);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'rxjs/add/observable/fromEvent';
|
||||
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { fromEvent } from 'rxjs/observable/fromEvent';
|
||||
|
||||
import { checkReady } from './bootstrap';
|
||||
import { CordovaOptions } from './decorators';
|
||||
@@ -318,7 +317,7 @@ export function wrapEventObservable(
|
||||
event: string,
|
||||
element: any = window
|
||||
): Observable<any> {
|
||||
return Observable.fromEvent(element, event);
|
||||
return fromEvent(element, event);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -53,7 +53,7 @@ export const pluginWarn = (
|
||||
): void => {
|
||||
if (method) {
|
||||
console.warn(
|
||||
'Native: tried calling ' +
|
||||
'Ionic Native: tried calling ' +
|
||||
pluginName +
|
||||
'.' +
|
||||
method +
|
||||
@@ -63,12 +63,12 @@ export const pluginWarn = (
|
||||
);
|
||||
} else {
|
||||
console.warn(
|
||||
`'Native: tried accessing the ${pluginName} plugin but it's not installed.`
|
||||
`'Ionic Native: tried accessing the ${pluginName} plugin but it's not installed.`
|
||||
);
|
||||
}
|
||||
if (plugin) {
|
||||
console.warn(
|
||||
`Install the ${pluginName} plugin: 'ionic cordova plugin add ${plugin}'`
|
||||
`Install the ${pluginName} plugin: 'ionic cordova plugin add ${plugin}'`
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -81,17 +81,17 @@ export const pluginWarn = (
|
||||
export const cordovaWarn = (pluginName: string, method?: string): void => {
|
||||
if (method) {
|
||||
console.warn(
|
||||
'Native: tried calling ' +
|
||||
'Ionic Native: tried calling ' +
|
||||
pluginName +
|
||||
'.' +
|
||||
method +
|
||||
', but Cordova is not available. Make sure to include cordova.js or run in a device/simulator'
|
||||
', but Cordova is not available. Make sure to a) run in a real device or simulator and b) include cordova.js in your index.html'
|
||||
);
|
||||
} else {
|
||||
console.warn(
|
||||
'Native: tried accessing the ' +
|
||||
pluginName +
|
||||
' plugin but Cordova is not available. Make sure to include cordova.js or run in a device/simulator'
|
||||
' plugin but Cordova is not available. Make sure to a) run in a real device or simulator and b) include cordova.js in your index.html'
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,336 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CordovaCheck, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
declare const AbbyyRtrSdk: any;
|
||||
|
||||
/**
|
||||
* JSON object that you can pass as the options argument to change text
|
||||
* capture settings. All keys are optional. Omitting a key means that a
|
||||
* default setting will be used.
|
||||
*/
|
||||
export interface TextCaptureOptions {
|
||||
|
||||
/**
|
||||
* The name of the license file. This file must be located in the
|
||||
* www/rtr_assets/ directory in your project.
|
||||
*/
|
||||
licenseFileName?: string;
|
||||
|
||||
/**
|
||||
* Recognition languages which can be selected by the user,
|
||||
* for example: ["English", "French", "German"]. Empty array
|
||||
* disables language selection.
|
||||
*/
|
||||
selectableRecognitionLanguages?: Array<string>;
|
||||
|
||||
/**
|
||||
* Recognition language selected by default.
|
||||
*/
|
||||
recognitionLanguages?: Array<string>;
|
||||
|
||||
/**
|
||||
* Width and height of the recognition area, separated by a
|
||||
* whitespace — for example: "0.8 0.3". The area of interest is
|
||||
* centered in the preview frame, its width and height are
|
||||
* relative to the preview frame size and should be in the [0.0, 1.0] range.
|
||||
*/
|
||||
areaOfInterest?: string;
|
||||
|
||||
/**
|
||||
* Whether to stop the plugin as soon as the result status is
|
||||
* "Stable" (see Result status). When enabled (true), the
|
||||
* recognition process can be stopped automatically. When
|
||||
* disabled (false), recognition can be stopped only manually
|
||||
* by user.
|
||||
*/
|
||||
stopWhenStable?: boolean;
|
||||
|
||||
/**
|
||||
* Show (true) or hide (false) the flashlight button in the text
|
||||
* capture dialog.
|
||||
*/
|
||||
isFlashlightVisible?: boolean;
|
||||
|
||||
/**
|
||||
* Show (true) or hide (false) the stop button in the text
|
||||
* capture dialog. When the user taps stop, RTR SDK returns
|
||||
* the latest recognition result.
|
||||
*/
|
||||
isStopButtonVisible?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* JSON object that represents text recognition results.
|
||||
* The callback you implement should parse this object and show results to user.
|
||||
*/
|
||||
export interface TextCaptureResult {
|
||||
|
||||
/**
|
||||
* An array of objects representing recognized lines of text.
|
||||
* These objects have the following keys:
|
||||
* · text (string): the recognized text.
|
||||
* · quadrangle (string): vertex coordinates of the bounding quadrangle,
|
||||
* a string of 8 integers separated with whitespaces ("x1 y1 ... x4 y4"),
|
||||
* goes clockwise starting from the bottom left.
|
||||
* · 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 }>;
|
||||
|
||||
/**
|
||||
* Additional information. This object has the following keys:
|
||||
* · stabilityStatus (string): result stability status.
|
||||
* See Result status for details.
|
||||
* · userAction (string): the user's action which stopped the plugin,
|
||||
* if any. Can be "Manually Stopped" if the stop button has been used,
|
||||
* and "Canceled" if the user canceled processing. If the plugin has
|
||||
* stopped automatically, the userAction key is not present in resultInfo.
|
||||
* · frameSize (string): full size of the preview frame, a string
|
||||
* with 2 integers separated with a whitespace ("720 1280").
|
||||
* · recognitionLanguages (string array): languages used for recognition,
|
||||
* the array contains language identifiers (["English", "French", "German"]).
|
||||
*/
|
||||
resultInfo: {
|
||||
stabilityStatus: string,
|
||||
userAction: string,
|
||||
frameSize: string,
|
||||
recognitionLanguages: Array<string>
|
||||
};
|
||||
|
||||
/**
|
||||
* Error details. This key is present only if an error occurs.
|
||||
* The value is an object which has a single key:
|
||||
* · description (string): human-readable error description.
|
||||
*/
|
||||
error?: {
|
||||
description: string;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* JSON object that you can pass as the options argument to change data
|
||||
* capture settings. All keys are optional. Omitting a key means that a default
|
||||
* setting will be used, except the profile and customDataCaptureScenario
|
||||
* keys: you must specify either one of them, but not both at the same time.
|
||||
*/
|
||||
export interface DataCaptureOptions {
|
||||
|
||||
/**
|
||||
* The predefined data capture profile to use, for example: "MRZ".
|
||||
* Note: For the list of supported documents, see Specifications — Data
|
||||
* Capture Profiles in the ABBYY Real-Time Recognition SDK 1 Developer's Guide.
|
||||
*/
|
||||
profile?: string;
|
||||
|
||||
/**
|
||||
* Custom data capture settings. This object has the following keys:
|
||||
* · name (string): the name of your custom data capture scenario, required.
|
||||
* · description (string): a more detailed description. This key is optional;
|
||||
* if not given, it will be assigned the same value as name.
|
||||
* · recognitionLanguages (string array): recognition languages to use.
|
||||
* Default is ["English"].
|
||||
* · fields (object array): describes data fields to capture. Each object
|
||||
* in this array has a single regEx key; its value is a string containing
|
||||
* the regular expression that should be matched when capturing a field.
|
||||
*/
|
||||
customDataCaptureScenario?: {
|
||||
name: string,
|
||||
description: string,
|
||||
recognitionLanguages: Array<string>,
|
||||
fields: Array<{ regEx: string }>
|
||||
};
|
||||
|
||||
/**
|
||||
* The name of the license file. This file must be located in the
|
||||
* www/rtr_assets/ directory in your project.
|
||||
*/
|
||||
licenseFileName?: string;
|
||||
|
||||
/**
|
||||
* Width and height of the recognition area, separated by a
|
||||
* whitespace — for example: "0.8 0.3". The area of interest is
|
||||
* centered in the preview frame, its width and height are
|
||||
* relative to the preview frame size and should be in the [0.0, 1.0] range.
|
||||
*/
|
||||
areaOfInterest?: string;
|
||||
|
||||
/**
|
||||
* Whether to stop the plugin as soon as the result status is
|
||||
* "Stable" (see Result status). When enabled (true), the
|
||||
* recognition process can be stopped automatically. When
|
||||
* disabled (false), recognition can be stopped only manually
|
||||
* by user.
|
||||
*/
|
||||
stopWhenStable?: boolean;
|
||||
|
||||
/**
|
||||
* Show (true) or hide (false) the flashlight button in the text
|
||||
* capture dialog.
|
||||
*/
|
||||
isFlashlightVisible?: boolean;
|
||||
|
||||
/**
|
||||
* Show (true) or hide (false) the stop button in the text
|
||||
* capture dialog. When the user taps stop, RTR SDK returns
|
||||
* the latest recognition result.
|
||||
*/
|
||||
isStopButtonVisible?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* JSON object that represents data recognition results. The callback you
|
||||
* implement should parse this object and show results to user.
|
||||
*/
|
||||
export interface DataCaptureResult {
|
||||
|
||||
/**
|
||||
* The data scheme which was applied during data capture.
|
||||
* The value is an object which has two keys:
|
||||
* · id (string): the internal scheme identifier.
|
||||
* · name (string): the scheme name.
|
||||
* If you had defined a custom data capture scenario in options, both the
|
||||
* id and name will be the same as the scenario name you specified. If
|
||||
* you selected a predefined profile, the id and name are specified by the
|
||||
* profile. If an error occurs during processing, the dataScheme key is not
|
||||
* present in the result.
|
||||
*/
|
||||
dataScheme?: {
|
||||
id: string,
|
||||
name: string
|
||||
};
|
||||
|
||||
/**
|
||||
* Recognized data fields. Each object in the array represents a separate
|
||||
* data field. The data field objects have the following keys:
|
||||
* · id (string): the internal identifier of the field.
|
||||
* · name (string): the field name.
|
||||
* Similarly to dataScheme, in custom scenarios both id and name are the same
|
||||
* as the scenario name you specified (currently custom scenarios allow
|
||||
* only 1 recognized field).
|
||||
* · text (string): full text of the field.
|
||||
* · quadrangle (string): vertex coordinates of the bounding quadrangle, a
|
||||
* string of 8 integers separated with whitespaces ("x1 y1 ... x4 y4"),
|
||||
* goes clockwise starting from the bottom left.
|
||||
* · components (object array): an array of objects representing field
|
||||
* components, that is, the text fragments found on the image, which
|
||||
* constitute the field.
|
||||
* In the components array each element is an object with the following keys:
|
||||
* · text (string): text of this fragment.
|
||||
* · quadrangle (string): vertex coordinates of the bounding quadrangle of
|
||||
* this fragment, similar to the field's quadrangle.
|
||||
* · rect (string): position and size of the bounding rectangle, a string
|
||||
* of 4 integers separated with whitespaces ("x y width height").
|
||||
*/
|
||||
dataFields: {
|
||||
id: string,
|
||||
name: string,
|
||||
text: string,
|
||||
quadrangle: string,
|
||||
components: {
|
||||
text: string,
|
||||
quadrangle: string,
|
||||
rect: string
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Additional information. This object has the following keys:
|
||||
* · stabilityStatus (string): result stability status.
|
||||
* See Result status for details.
|
||||
* · userAction (string): the user's action which stopped the plugin,
|
||||
* if any. Can be "Manually Stopped" if the stop button has been used,
|
||||
* and "Canceled" if the user canceled processing. If the plugin has
|
||||
* stopped automatically, the userAction key is not present in resultInfo.
|
||||
* · frameSize (string): full size of the preview frame, a string
|
||||
* with 2 integers separated with a whitespace ("720 1280").
|
||||
*/
|
||||
resultInfo: {
|
||||
stabilityStatus: string,
|
||||
userAction: string,
|
||||
frameSize: string
|
||||
};
|
||||
|
||||
/**
|
||||
* Error details. This key is present only if an error occurs.
|
||||
* The value is an object which has a single key:
|
||||
* · description (string): human-readable error description.
|
||||
*/
|
||||
error?: {
|
||||
description: string;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @name ABBYY Real-Time Recognition
|
||||
* @description
|
||||
* This plugin allows to use the Text Capture and Data Capture features of
|
||||
* ABBYY Real-Time Recognition SDK (RTR SDK) in apps.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { AbbyyRTR } from '@ionic-native/abbyy-rtr';
|
||||
*
|
||||
*
|
||||
* constructor(private abbyyRTR: AbbyyRTR) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.abbyyRTR.startTextCapture(options)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
*
|
||||
* this.abbyyRTR.startDataCapture(options)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'AbbyyRTR',
|
||||
plugin: 'cordova-plugin-abbyy-rtr-sdk',
|
||||
pluginRef: 'AbbyyRtrSdk',
|
||||
repo: 'https://github.com/abbyysdk/RTR-SDK.Cordova',
|
||||
install: 'ionic cordova plugin add cordova-plugin-abbyy-rtr-sdk',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class AbbyyRTR extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Opens a modal dialog with controls for the Text Capture scenario.
|
||||
* @param {TextCaptureOptions} options
|
||||
* @return {Promise<TextCaptureResult>}
|
||||
*/
|
||||
@CordovaCheck()
|
||||
startTextCapture(options: TextCaptureOptions): Promise<TextCaptureResult> {
|
||||
return new Promise<any>((resolve, reject) => {
|
||||
AbbyyRtrSdk.startTextCapture((result: DataCaptureResult) => {
|
||||
if (result.error) {
|
||||
reject(result);
|
||||
} else {
|
||||
resolve(result);
|
||||
}
|
||||
}, options);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a modal dialog with controls for the Data Capture scenario.
|
||||
* @param {DataCaptureOptions} options
|
||||
* @return {Promise<DataCaptureResult>}
|
||||
*/
|
||||
@CordovaCheck()
|
||||
startDataCapture(options: DataCaptureOptions): Promise<DataCaptureResult> {
|
||||
return new Promise<any>((resolve, reject) => {
|
||||
AbbyyRtrSdk.startDataCapture((result: DataCaptureResult) => {
|
||||
if (result.error) {
|
||||
reject(result);
|
||||
} else {
|
||||
resolve(result);
|
||||
}
|
||||
}, options);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
import 'rxjs/add/observable/fromEvent';
|
||||
|
||||
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 interface AdMobFreeBannerConfig {
|
||||
/**
|
||||
@@ -68,6 +67,9 @@ 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
|
||||
* ```typescript
|
||||
@@ -147,7 +149,7 @@ export class AdMobFree extends IonicNativePlugin {
|
||||
* @return {Observable<any>}
|
||||
*/
|
||||
on(event: string): Observable<any> {
|
||||
return Observable.fromEvent(document, event);
|
||||
return fromEvent(document, event);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name AES256
|
||||
* @description
|
||||
* This cordova ionic plugin allows you to perform AES 256 encryption and decryption on the plain text.
|
||||
* It's a cross-platform plugin which supports both Android and iOS.
|
||||
* The encryption and decryption are performed on the device native layer so that the performance is much faster.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { AES256 } from '@ionic-native/aes-256';
|
||||
*
|
||||
* private secureKey: string;
|
||||
* private secureIV: string;
|
||||
*
|
||||
* constructor(private aes256: AES256) {
|
||||
* this.generateSecureKeyAndIV(); // To generate the random secureKey and secureIV
|
||||
* }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* async generateSecureKeyAndIV() {
|
||||
* this.secureKey = await this.aes256.generateSecureKey('random password 12345'); // Returns a 32 bytes string
|
||||
* this.secureIV = await this.aes256.generateSecureIV('random password 12345'); // Returns a 16 bytes string
|
||||
* }
|
||||
*
|
||||
* this.aes256.encrypt(this.secureKey, this.secureIV, 'testdata')
|
||||
* .then(res => console.log('Encrypted Data: ',res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* this.aes256.decrypt(this.secureKey, this.secureIV, 'encryptedData')
|
||||
* .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({
|
||||
pluginName: 'AES256',
|
||||
plugin: 'cordova-plugin-aes256-encryption',
|
||||
pluginRef: 'cordova.plugins.AES256',
|
||||
repo: 'https://github.com/Ideas2IT/cordova-aes256',
|
||||
platforms: ['Android', 'iOS'],
|
||||
install: 'ionic cordova plugin add cordova-plugin-aes256-encryption'
|
||||
})
|
||||
@Injectable()
|
||||
export class AES256 extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* This function used to perform the aes256 encryption
|
||||
* @param {string} secureKey A 32 bytes string, which will used as input key for AES256 encryption.
|
||||
* @param {string} secureIV A 16 bytes string, which will used as initial vector for AES256 encryption.
|
||||
* @param {string} data A string which will be encrypted
|
||||
* @return {Promise<string>} Returns a promise that resolves when encryption happens. The success response will returns encrypted data.
|
||||
*/
|
||||
@Cordova()
|
||||
encrypt(secureKey: string, secureIV: string, data: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function used to perform the aes256 decryption
|
||||
* @param {string} secureKey A 32 bytes string, which will used as input key for AES256 decryption.
|
||||
* @param {string} secureIV A 16 bytes string, which will used as initial vector for AES256 decryption.
|
||||
* @param {string} data An AES256 encrypted data which will be decrypted.
|
||||
* @return {Promise<string>} Returns a promise that resolves when decryption happens. The success response will returns decrypted data.
|
||||
*/
|
||||
@Cordova()
|
||||
decrypt(secureKey: string, secureIV: string, data: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function used to generate a secure key based on an password. Perfect if you want to delegate the key generation for encryption to the plugin.
|
||||
* Make sure to save the return value of this function somewhere so your encrypted data can be decrypted in the future.
|
||||
* @param {string} password A random string, which will be used as input for a PBKDF2 function
|
||||
* @return {Promise<string>} Returns a promise that resolves when key is generated.
|
||||
*/
|
||||
@Cordova()
|
||||
generateSecureKey(password: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function used to generate a secure IV based on an password. Perfect if you want to delegate the IV generation for encryption to the plugin.
|
||||
* Make sure to save the return value of this function somewhere so your encrypted data can be decrypted in the future.
|
||||
* @param {string} password A random string, which will be used as input for a PBKDF2 function
|
||||
* @return {Promise<string>} Returns a promise that resolves when IV is generated.
|
||||
*/
|
||||
@Cordova()
|
||||
generateSecureIV(password: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,83 +1,20 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface AlipayOrder {
|
||||
/**
|
||||
* appId assigned by Alipay
|
||||
*/
|
||||
app_id: string;
|
||||
|
||||
/**
|
||||
* Api name.
|
||||
* Should be: alipay.trade.app.pay
|
||||
*/
|
||||
method: string;
|
||||
|
||||
/**
|
||||
* Data format
|
||||
* Default: "JSON"
|
||||
*/
|
||||
format?: string;
|
||||
|
||||
/**
|
||||
* Charset
|
||||
* Possible values: "UTF-8", "GBK"
|
||||
* Default: "UTF-8"
|
||||
*/
|
||||
charset: string;
|
||||
|
||||
/**
|
||||
* Sign method
|
||||
* Default: 'RSA'
|
||||
*/
|
||||
sign_type: string;
|
||||
|
||||
/**
|
||||
* Sign value. Should be got from server side.
|
||||
* Default: 'RSA'
|
||||
*/
|
||||
sign: string;
|
||||
|
||||
/**
|
||||
* Timestamp, formated like "yyyy-MM-dd HH:mm:ss", e.g. 2014-07-24 03:07:50
|
||||
*/
|
||||
timestamp: string;
|
||||
|
||||
/**
|
||||
* Api version. Fixed value '1.0'
|
||||
*/
|
||||
version: string;
|
||||
|
||||
/**
|
||||
* Notify url.
|
||||
*/
|
||||
notify_url: string;
|
||||
|
||||
/**
|
||||
* biz content. formated in json. see alipay doc for detail.
|
||||
*/
|
||||
biz_content: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Alipay
|
||||
* @description
|
||||
* This plugin is used for Alipay APP support. Integrated with the latest SDK.
|
||||
* This plugin facilitates the usage of Alipay 支付宝 in an Ionic apps with the integrated AlipaySDK dated on 20180601.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-alipay-base`. For more info, please see the [Alipay plugin docs](https://github.com/xueron/cordova-alipay-base).
|
||||
* Requires Cordova plugin: `cordova-plugin-gubnoi-alipay`. For more info, please see https://github.com/jing-zhou/cordova-plugin-alipay .
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Alipay, AlipayOrder } from '@ionic-native/alipay';
|
||||
* import { Alipay } from '@ionic-native/alipay';
|
||||
*
|
||||
* constructor(private alipay: Alipay) {
|
||||
*
|
||||
* // Should get from server side with sign.
|
||||
* const alipayOrder: AlipayOrder = {
|
||||
* ...
|
||||
* };
|
||||
*
|
||||
*
|
||||
* //alipayOrder is a string that has been generated and signed by the server side.
|
||||
* this.alipay.pay(alipayOrder)
|
||||
* .then(result => {
|
||||
* console.log(result); // Success
|
||||
@@ -88,31 +25,26 @@ export interface AlipayOrder {
|
||||
*
|
||||
* }
|
||||
*
|
||||
*
|
||||
* ```
|
||||
*
|
||||
* @interfaces
|
||||
* AlipayOrder
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Alipay',
|
||||
plugin: 'cordova-alipay-base',
|
||||
pluginRef: 'Alipay.Base',
|
||||
repo: 'https://github.com/xueron/cordova-alipay-base',
|
||||
install:
|
||||
'ionic cordova plugin add cordova-alipay-base --variable ALI_PID=your_app_id',
|
||||
installVariables: ['ALI_PID'],
|
||||
plugin: 'cordova-plugin-gubnoi-alipay',
|
||||
pluginRef: 'Alipay',
|
||||
repo: 'https://github.com/jing-zhou/cordova-plugin-alipay',
|
||||
install: 'ionic cordova plugin add cordova-plugin-gubnoi-alipay --variable APP_ID=your_app_id',
|
||||
installVariables: ['APP_ID'],
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Alipay extends IonicNativePlugin {
|
||||
/**
|
||||
* Open Alipay to perform App pay
|
||||
* @param { AlipayOrder | string } order alipay options
|
||||
* @param {string} order alipay order string
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the success return, or rejects with an error.
|
||||
*/
|
||||
@Cordova()
|
||||
pay(order: AlipayOrder | string): Promise<any> {
|
||||
pay(order: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,25 +159,47 @@ export interface AFADeleteOptions {
|
||||
})
|
||||
@Injectable()
|
||||
export class AndroidFingerprintAuth extends IonicNativePlugin {
|
||||
/**
|
||||
* Convenience property containing all possible errors
|
||||
*/
|
||||
ERRORS: {
|
||||
BAD_PADDING_EXCEPTION: 'BAD_PADDING_EXCEPTION';
|
||||
CERTIFICATE_EXCEPTION: 'CERTIFICATE_EXCEPTION';
|
||||
FINGERPRINT_CANCELLED: 'FINGERPRINT_CANCELLED';
|
||||
FINGERPRINT_DATA_NOT_DELETED: 'FINGERPRINT_DATA_NOT_DELETED';
|
||||
FINGERPRINT_ERROR: 'FINGERPRINT_ERROR';
|
||||
FINGERPRINT_NOT_AVAILABLE: 'FINGERPRINT_NOT_AVAILABLE';
|
||||
FINGERPRINT_PERMISSION_DENIED: 'FINGERPRINT_PERMISSION_DENIED';
|
||||
FINGERPRINT_PERMISSION_DENIED_SHOW_REQUEST: 'FINGERPRINT_PERMISSION_DENIED_SHOW_REQUEST';
|
||||
ILLEGAL_BLOCK_SIZE_EXCEPTION: 'ILLEGAL_BLOCK_SIZE_EXCEPTION';
|
||||
INIT_CIPHER_FAILED: 'INIT_CIPHER_FAILED';
|
||||
INVALID_ALGORITHM_PARAMETER_EXCEPTION: 'INVALID_ALGORITHM_PARAMETER_EXCEPTION';
|
||||
IO_EXCEPTION: 'IO_EXCEPTION';
|
||||
JSON_EXCEPTION: 'JSON_EXCEPTION';
|
||||
MINIMUM_SDK: 'MINIMUM_SDK';
|
||||
MISSING_ACTION_PARAMETERS: 'MISSING_ACTION_PARAMETERS';
|
||||
MISSING_PARAMETERS: 'MISSING_PARAMETERS';
|
||||
NO_SUCH_ALGORITHM_EXCEPTION: 'NO_SUCH_ALGORITHM_EXCEPTION';
|
||||
SECURITY_EXCEPTION: 'SECURITY_EXCEPTION';
|
||||
BAD_PADDING_EXCEPTION: string;
|
||||
CERTIFICATE_EXCEPTION: string;
|
||||
FINGERPRINT_CANCELLED: string;
|
||||
FINGERPRINT_DATA_NOT_DELETED: string;
|
||||
FINGERPRINT_ERROR: string;
|
||||
FINGERPRINT_NOT_AVAILABLE: string;
|
||||
FINGERPRINT_PERMISSION_DENIED: string;
|
||||
FINGERPRINT_PERMISSION_DENIED_SHOW_REQUEST: string;
|
||||
ILLEGAL_BLOCK_SIZE_EXCEPTION: string;
|
||||
INIT_CIPHER_FAILED: string;
|
||||
INVALID_ALGORITHM_PARAMETER_EXCEPTION: string;
|
||||
IO_EXCEPTION: string;
|
||||
JSON_EXCEPTION: string;
|
||||
MINIMUM_SDK: string;
|
||||
MISSING_ACTION_PARAMETERS: string;
|
||||
MISSING_PARAMETERS: string;
|
||||
NO_SUCH_ALGORITHM_EXCEPTION: string;
|
||||
SECURITY_EXCEPTION: string;
|
||||
} = {
|
||||
BAD_PADDING_EXCEPTION: 'BAD_PADDING_EXCEPTION',
|
||||
CERTIFICATE_EXCEPTION: 'CERTIFICATE_EXCEPTION',
|
||||
FINGERPRINT_CANCELLED: 'FINGERPRINT_CANCELLED',
|
||||
FINGERPRINT_DATA_NOT_DELETED: 'FINGERPRINT_DATA_NOT_DELETED',
|
||||
FINGERPRINT_ERROR: 'FINGERPRINT_ERROR',
|
||||
FINGERPRINT_NOT_AVAILABLE: 'FINGERPRINT_NOT_AVAILABLE',
|
||||
FINGERPRINT_PERMISSION_DENIED: 'FINGERPRINT_PERMISSION_DENIED',
|
||||
FINGERPRINT_PERMISSION_DENIED_SHOW_REQUEST: 'FINGERPRINT_PERMISSION_DENIED_SHOW_REQUEST',
|
||||
ILLEGAL_BLOCK_SIZE_EXCEPTION: 'ILLEGAL_BLOCK_SIZE_EXCEPTION',
|
||||
INIT_CIPHER_FAILED: 'INIT_CIPHER_FAILED',
|
||||
INVALID_ALGORITHM_PARAMETER_EXCEPTION: 'INVALID_ALGORITHM_PARAMETER_EXCEPTION',
|
||||
IO_EXCEPTION: 'IO_EXCEPTION',
|
||||
JSON_EXCEPTION: 'JSON_EXCEPTION',
|
||||
MINIMUM_SDK: 'MINIMUM_SDK',
|
||||
MISSING_ACTION_PARAMETERS: 'MISSING_ACTION_PARAMETERS',
|
||||
MISSING_PARAMETERS: 'MISSING_PARAMETERS',
|
||||
NO_SUCH_ALGORITHM_EXCEPTION: 'NO_SUCH_ALGORITHM_EXCEPTION',
|
||||
SECURITY_EXCEPTION: 'SECURITY_EXCEPTION'
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -44,7 +44,7 @@ export enum AndroidSystemUiFlags {
|
||||
*
|
||||
* this.androidFullScreen.isImmersiveModeSupported()
|
||||
* .then(() => console.log('Immersive mode supported'))
|
||||
* .catch(err => console.log(error));
|
||||
* .catch(err => console.log(err));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
|
||||
@@ -37,28 +37,30 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
export class AppVersion extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Returns the name of the app
|
||||
* Returns the name of the app, e.g.: "My Awesome App"
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
@Cordova()
|
||||
getAppName(): Promise<string> { return; }
|
||||
|
||||
/**
|
||||
* Returns the package name of the app
|
||||
* Returns the package name of the app, e.g.: "com.example.myawesomeapp"
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
@Cordova()
|
||||
getPackageName(): Promise<string> { return; }
|
||||
|
||||
/**
|
||||
* Returns the build identifier of the app
|
||||
* @returns {Promise<string>}
|
||||
* Returns the build identifier of the app.
|
||||
* In iOS a string with the build version like "1.6095"
|
||||
* In Android a number generated from the version string, like 10203 for version "1.2.3"
|
||||
* @returns {Promise<string | number>}
|
||||
*/
|
||||
@Cordova()
|
||||
getVersionCode(): Promise<string> { return; }
|
||||
getVersionCode(): Promise<string | number> { return; }
|
||||
|
||||
/**
|
||||
* Returns the version of the app
|
||||
* Returns the version of the app, e.g.: "1.2.3"
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
@Cordova()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
/**
|
||||
* @name Appodeal
|
||||
|
||||
@@ -459,12 +459,13 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
* Method can be used to detect user changes in location services settings.
|
||||
* If user enable or disable location services then success callback will be executed.
|
||||
* In case or error (SettingNotFoundException) fail callback will be executed.
|
||||
* @returns {Promise<boolean>}
|
||||
* @returns {Observable<number>}
|
||||
*/
|
||||
@Cordova({
|
||||
platforms: ['Android']
|
||||
platforms: ['Android'],
|
||||
observable: true
|
||||
})
|
||||
watchLocationMode(): Promise<boolean> { return; }
|
||||
watchLocationMode(): Observable<number> { return; }
|
||||
|
||||
/**
|
||||
* Stop watching for location mode changes.
|
||||
|
||||
@@ -68,7 +68,7 @@ export interface BarcodeScanResult {
|
||||
| 'ITF'
|
||||
| 'RSS14'
|
||||
| 'RSS_EXPANDED'
|
||||
| 'PDF417'
|
||||
| 'PDF_417'
|
||||
| 'AZTEC'
|
||||
| 'MSI';
|
||||
cancelled: boolean;
|
||||
|
||||
@@ -289,6 +289,80 @@ export class BLE extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Establish an automatic connection to a peripheral. The phone will automatically connect to the Bluetooth peripheral
|
||||
* whenever it is in range. The autoConnect function uses callbacks instead of observables because connect and
|
||||
* disconnect can each be called many times as a devices connects and disconnects.
|
||||
*
|
||||
* On Android you can pass a MAC address directly to autoConnect. With iOS, you need to get a device id by scanning,
|
||||
* calling ble.peripheralsWithIdentifiers, or calling ble.connectedPeripheralsWithServices.
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* someFunction() {
|
||||
* this.ble.autoConnect(deviceId, onConnected.bind(this), onDisconnected.bind(this));
|
||||
* }
|
||||
*
|
||||
* onConnected(peripheral) {
|
||||
* console.log(`Connected to ${peripheral.id}`)l
|
||||
* }
|
||||
*
|
||||
* onDisconnected(peripheral) {
|
||||
* console.log(`Disconnected from ${peripheral.id}`)l
|
||||
* }
|
||||
*
|
||||
* ```
|
||||
* @param {string} deviceId UUID or MAC address of the peripheral
|
||||
* @param {function} connectCallback function that is called with peripheral data when the devices connects
|
||||
* @param {function} disconnectCallback function that is called with peripheral data when the devices disconnects
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
autoConnect(deviceId: string, connectCallback: any, disconnectCallback: any) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request MTU size.
|
||||
* May be used to fix the Error 14 "Unlikely" on write requests with more than 20 bytes.
|
||||
* @usage
|
||||
* ```
|
||||
* BLE.requestMtu('12:34:56:78:9A:BC', 512).then(() => {
|
||||
* console.log('MTU Size Accepted');
|
||||
* }, error => {
|
||||
* console.log('MTU Size Failed');
|
||||
* });
|
||||
* ```
|
||||
* @param {string} deviceId UUID or MAC address of the peripheral
|
||||
* @param {number} mtuSize The new MTU size. (23 - 517, default is usually 23. Max recommended: 512)
|
||||
* @return {Promise<any>} Returns a Promise.
|
||||
*/
|
||||
@Cordova()
|
||||
requestMtu(deviceId: string, mtuSize: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresh Device Cache
|
||||
* This method may fix a issue of old cached services and characteristics.
|
||||
* NOTE Since this uses an undocumented API it's not guaranteed to work.
|
||||
* If you choose a too low delay time (timeoutMillis) the method could fail.
|
||||
* @usage
|
||||
* ```
|
||||
* BLE.refreshDeviceCache('12:34:56:78:9A:BC', 10000).then(discoveredServices => {
|
||||
* console.log('The new discovered services after the clean: ', discoveredServices);
|
||||
* }, error => {
|
||||
* console.log('Refresh device cache failed.');
|
||||
* });
|
||||
* ```
|
||||
* @param {string} deviceId UUID or MAC address of the peripheral
|
||||
* @param {number} timeoutMillis Delay in milliseconds after refresh before discovering services.
|
||||
* @return {Promise<any>} Returns a Promise.
|
||||
*/
|
||||
@Cordova()
|
||||
refreshDeviceCache(deviceId: string, timeoutMillis: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disconnect from a peripheral.
|
||||
* @usage
|
||||
@@ -514,4 +588,41 @@ export class BLE extends IonicNativePlugin {
|
||||
readRSSI(deviceId: string): Promise<any> {
|
||||
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.
|
||||
* iOS only
|
||||
*
|
||||
* @param {string[]} services List of services to discover
|
||||
* @returns {Promise<any>} Returns a promise with a list of peripheral objects
|
||||
*/
|
||||
@Cordova()
|
||||
connectedPeripheralsWithServices (services: string[]): Promise<any[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the connected peripherals offering the listed service UUIDs.
|
||||
* iOS only
|
||||
*
|
||||
* @param {string[]} uuids List of peripheral UUIDs
|
||||
* @returns {Promise<any>} Returns a promise with a list of peripheral objects
|
||||
*/
|
||||
@Cordova()
|
||||
peripheralsWithIdentifiers (uuids: string[]): Promise<any[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the bonded devices
|
||||
* Android only
|
||||
*
|
||||
* @returns {Promise<any>} Returns a promise with a list of peripheral objects
|
||||
*/
|
||||
@Cordova()
|
||||
bondedDevices (): Promise<any[]> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,100 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface CallDirectoryItem {
|
||||
label: string;
|
||||
number: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Call Directory
|
||||
* @description
|
||||
* This plugin can add phone numbers to an Callkit call directory extension. Call `reloadExtension` after using `addIdentification` and `removeIdentification`
|
||||
* to process the changes in the call directory extension.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { CallDirectory } from '@ionic-native/call-directory';
|
||||
*
|
||||
*
|
||||
* constructor(private callDirectory: CallDirectory) { }
|
||||
*
|
||||
*
|
||||
* let items = [{label: "Hello", number: "123"}];
|
||||
* this.callDirectory.addIdentification(items)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* this.callDirectory.reloadExtension()
|
||||
* .then(res: string) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'CallDirectory',
|
||||
plugin: 'cordova-plugin-call-directory',
|
||||
pluginRef: 'CallDirectory',
|
||||
repo: 'https://github.com/GEDYSIntraWare/cordova-plugin-call-directory',
|
||||
install: 'cordova plugin add cordova-plugin-call-directory --variable EXT_NAME="Cordova-Directory" --variable ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES="NO"',
|
||||
installVariables: ['EXT_NAME', 'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'],
|
||||
platforms: ['iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class CallDirectory extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Check if the call directory extension is available and enabled
|
||||
* @return {Promise<boolean>} Returns a promise with result
|
||||
*/
|
||||
@Cordova()
|
||||
isAvailable(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add identification numbers
|
||||
* @param {Array<CallDirectoryItem>} items Set of numbers with labels
|
||||
* @return {Promise<any>} Returns a promise that resolves when numbers are added
|
||||
*/
|
||||
@Cordova()
|
||||
addIdentification(items: Array<CallDirectoryItem>): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove identification numbers
|
||||
* @param {Array<CallDirectoryItem>} items Set of numbers with arbitrary label
|
||||
* @return {Promise<any>} Returns a promise that resolves when numbers are removed
|
||||
*/
|
||||
@Cordova()
|
||||
removeIdentification(items: Array<CallDirectoryItem>): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all items from call directory. Refreshes immediately.
|
||||
* @return {Promise<any>} Returns a promise after refresh with message
|
||||
*/
|
||||
@Cordova()
|
||||
removeAllIdentification(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all numbers and labels in call directory
|
||||
* @return {Array<CallDirectoryItem>} Returns a promise that resolves with an array of all items
|
||||
*/
|
||||
@Cordova()
|
||||
getAllItems(): Promise<Array<CallDirectoryItem>> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reload extension to process queued changes
|
||||
* @return {Promise<string>} Returns a promise after refresh with message
|
||||
*/
|
||||
@Cordova()
|
||||
reloadExtension(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ export interface CameraOptions {
|
||||
/**
|
||||
* Choose the format of the return value.
|
||||
* Defined in Camera.DestinationType. Default is FILE_URI.
|
||||
* DATA_URL : 0, Return image as base64-encoded string,
|
||||
* DATA_URL : 0, Return image as base64-encoded string (DATA_URL can be very memory intensive and cause app crashes or out of memory errors. Use FILE_URI or NATIVE_URI if possible),
|
||||
* FILE_URI : 1, Return image file URI,
|
||||
* NATIVE_URI : 2 Return image native URI
|
||||
* (e.g., assets-library:// on iOS or content:// on Android)
|
||||
@@ -139,14 +139,14 @@ export enum Direction {
|
||||
*
|
||||
* const options: CameraOptions = {
|
||||
* quality: 100,
|
||||
* destinationType: this.camera.DestinationType.DATA_URL,
|
||||
* destinationType: this.camera.DestinationType.FILE_URI,
|
||||
* encodingType: this.camera.EncodingType.JPEG,
|
||||
* mediaType: this.camera.MediaType.PICTURE
|
||||
* }
|
||||
*
|
||||
* this.camera.getPicture(options).then((imageData) => {
|
||||
* // imageData is either a base64 encoded string or a file URI
|
||||
* // If it's base64:
|
||||
* // If it's base64 (DATA_URL):
|
||||
* let base64Image = 'data:image/jpeg;base64,' + imageData;
|
||||
* }, (err) => {
|
||||
* // Handle error
|
||||
|
||||
@@ -129,6 +129,12 @@ export interface CardIOResponse {
|
||||
* @name Card IO
|
||||
* @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>
|
||||
@@ -151,7 +157,7 @@ export interface CardIOResponse {
|
||||
* requireCVV: false,
|
||||
* requirePostalCode: false
|
||||
* };
|
||||
* CardIO.scan(options);
|
||||
* this.cardIO.scan(options);
|
||||
* }
|
||||
* }
|
||||
* );
|
||||
|
||||
@@ -0,0 +1,366 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface CCKContext {
|
||||
/**
|
||||
* Full identifier path from root, including the context identifier itself..
|
||||
*/
|
||||
identifierPath: string[];
|
||||
/**
|
||||
* Title of the context.
|
||||
*/
|
||||
title: string;
|
||||
/**
|
||||
* Optional. Type value for the context.
|
||||
*/
|
||||
type?: CCKContextType;
|
||||
/**
|
||||
* Optional. Topic value of the context.
|
||||
*/
|
||||
topic?: string;
|
||||
/**
|
||||
* Optional. Display order of the context.
|
||||
*/
|
||||
displayOrder?: number;
|
||||
}
|
||||
|
||||
export enum CCKContextType {
|
||||
none = 0,
|
||||
app,
|
||||
chapter,
|
||||
section,
|
||||
level,
|
||||
page,
|
||||
task,
|
||||
challenge,
|
||||
quiz,
|
||||
exercise,
|
||||
lesson,
|
||||
book,
|
||||
game,
|
||||
document,
|
||||
audio,
|
||||
video
|
||||
}
|
||||
|
||||
export enum CCKContextTopic {
|
||||
math = 'math',
|
||||
science = 'science',
|
||||
literacyAndWriting = 'literacyAndWriting',
|
||||
worldLanguage = 'worldLanguage',
|
||||
socialScience = 'socialScience',
|
||||
computerScienceAndEngineering = 'computerScienceAndEngineering',
|
||||
artsAndMusic = 'artsAndMusic',
|
||||
healthAndFitness = 'healthAndFitness'
|
||||
}
|
||||
|
||||
export interface CCKBinaryItem {
|
||||
/**
|
||||
* A unique string identifier for the activity item.
|
||||
*/
|
||||
identifier: string;
|
||||
/**
|
||||
* A human readable name for the activity item.
|
||||
*/
|
||||
title: string;
|
||||
/**
|
||||
* A type value for the activity item.
|
||||
*/
|
||||
type: CCKBinaryType;
|
||||
/**
|
||||
* The value that the binary activity item takes.
|
||||
*/
|
||||
isCorrect: boolean;
|
||||
/**
|
||||
* Optional. Should the activity item be added as the primary activity item.
|
||||
*/
|
||||
isPrimaryActivityItem?: boolean;
|
||||
}
|
||||
|
||||
export enum CCKBinaryType {
|
||||
trueFalse = 0,
|
||||
passFail,
|
||||
yesNo
|
||||
}
|
||||
|
||||
export interface CCKScoreItem {
|
||||
/**
|
||||
* A unique string identifier for the activity item.
|
||||
*/
|
||||
identifier: string;
|
||||
/**
|
||||
* A human readable name for the activity item.
|
||||
*/
|
||||
title: string;
|
||||
/**
|
||||
* The score earned during completion of a task.
|
||||
*/
|
||||
score: number;
|
||||
/**
|
||||
* The maximum possible score, against which the reported score should be judged.
|
||||
*/
|
||||
maxScore: number;
|
||||
/**
|
||||
* Optional. Should the activity item be added as the primary activity item.
|
||||
*/
|
||||
isPrimaryActivityItem?: boolean;
|
||||
}
|
||||
|
||||
export interface CCKQuantityItem {
|
||||
/**
|
||||
* A unique string identifier for the activity item.
|
||||
*/
|
||||
identifier: string;
|
||||
/**
|
||||
* A human readable name for the activity item.
|
||||
*/
|
||||
title: string;
|
||||
/**
|
||||
* A quantity associated with the task.
|
||||
*/
|
||||
quantity: number;
|
||||
/**
|
||||
* Optional. Should the activity item be added as the primary activity item.
|
||||
*/
|
||||
isPrimaryActivityItem?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Class Kit
|
||||
* @description Plugin for using Apple's ClassKit framework.
|
||||
*
|
||||
*
|
||||
* Prerequisites:
|
||||
* Only works with Xcode 9.4 and iOS 11.4. Your Provisioning Profile must include the ClassKit capability. Read more about how to Request ClassKit Resources (https://developer.apple.com/contact/classkit/) in here: https://developer.apple.com/documentation/classkit/enabling_classkit_in_your_app.
|
||||
* Also note that you can’t test ClassKit behavior in Simulator because Schoolwork isn’t available in that environment.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { ClassKit, CCKContext, CCKBinaryItem, CCKQuantityItem, CCKScoreItem, CCKContextTopic, CCKContextType, CCKBinaryType } from '@ionic-native/class-kit';
|
||||
*
|
||||
* // Init contexts defined in XML file 'CCK-contexts.xml'
|
||||
* constructor( ..., private classKit: ClassKit) {
|
||||
* platform.ready().then(() => {
|
||||
* classKit.initContextsFromXml("classkitplugin://")
|
||||
* .then(() => console.log("success"))
|
||||
* .catch(e => console.log("error: ", e));
|
||||
* });
|
||||
* }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* // Init context with identifier path
|
||||
* const context: CCKContext = {
|
||||
* identifierPath: ["parent_title_one", "child_one", "child_one_correct_quiz"],
|
||||
* title: "child one correct quiz",
|
||||
* type: CCKContextType.exercise,
|
||||
* topic: CCKContextTopic.science,
|
||||
* displayOrder: 0
|
||||
* };
|
||||
*
|
||||
* this.classKit.addContext("classkitplugin://", context)
|
||||
* .then(() => console.log("success"))
|
||||
* .catch(e => console.log("error: ", e));
|
||||
*
|
||||
*
|
||||
* // Remove all contexts
|
||||
* this.classKit.removeContexts()
|
||||
* .then(() => console.log("success"))
|
||||
* .catch(e => console.log("error: ", e));
|
||||
*
|
||||
*
|
||||
* // Remove context with identifier path
|
||||
* this.classKit.removeContext(["parent_title_one", "child_one", "child_one_correct_quiz"])
|
||||
* .then(() => console.log("success"))
|
||||
* .catch(e => console.log("error: ", e));
|
||||
*
|
||||
*
|
||||
* // Begin a new activity or restart an activity for a given context
|
||||
* this.classKit.beginActivity(["parent_title_one", "child_two", "child_two_quiz"], false)
|
||||
* .then(() => console.log("success"))
|
||||
* .catch(e => console.log("error: ", e));
|
||||
*
|
||||
*
|
||||
* // Adds a progress range to the active given activity
|
||||
* this.classKit.setProgressRange(0, 0.66)
|
||||
* .then(() => console.log("success"))
|
||||
* .catch(e => console.log("error: ", e));
|
||||
*
|
||||
*
|
||||
* // Adds a progress to the active given activity
|
||||
* this.classKit.setProgress(0.66)
|
||||
* .then(() => console.log("success"))
|
||||
* .catch(e => console.log("error: ", e));
|
||||
*
|
||||
*
|
||||
* // Adds activity information that is true or false, pass or fail, yes or no
|
||||
* const binaryItem: CCKBinaryItem = {
|
||||
* identifier: "child_two_quiz_IDENTIFIER_1",
|
||||
* title: "CHILD TWO QUIZ 1",
|
||||
* type: CCKBinaryType.trueFalse,
|
||||
* isCorrect: isCorrect,
|
||||
* isPrimaryActivityItem: false
|
||||
* };
|
||||
*
|
||||
* this.classKit.setBinaryItem(binaryItem)
|
||||
* .then(() => console.log("success"))
|
||||
* .catch(e => console.log("error: ", e));
|
||||
*
|
||||
*
|
||||
* // Adds activity information that signifies a score out of a possible maximum
|
||||
* const scoreItem: CCKScoreItem = {
|
||||
* identifier: "total_score",
|
||||
* title: "Total Score :-)",
|
||||
* score: 0.66,
|
||||
* maxScore: 1.0,
|
||||
* isPrimaryActivityItem: true
|
||||
* };
|
||||
*
|
||||
* this.classKit.setScoreItem(scoreItem)
|
||||
* .then(() => console.log("success"))
|
||||
* .catch(e => console.log("error: ", e));
|
||||
*
|
||||
*
|
||||
* // Activity information that signifies a quantity
|
||||
* const quantityItem: CCKQuantityItem = {
|
||||
* identifier: "quantity_item_hints",
|
||||
* title: "Hints",
|
||||
* quantity: 12,
|
||||
* isPrimaryActivityItem: false
|
||||
* };
|
||||
*
|
||||
* this.classKit.setQuantityItem(quantityItem)
|
||||
* .then(() => console.log("success"))
|
||||
* .catch(e => console.log("error: ", e));
|
||||
*
|
||||
* ```
|
||||
*
|
||||
* @interfaces
|
||||
* CCKContext
|
||||
* CCKContextType
|
||||
* CCKContextTopic
|
||||
* CCKBinaryItem
|
||||
* CCKBinaryType
|
||||
* CCKScoreItem
|
||||
* CCKQuantityItem
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'ClassKit',
|
||||
plugin: 'cordova-plugin-classkit',
|
||||
pluginRef: 'CordovaClassKit',
|
||||
repo: 'https://github.com/sebastianbaar/cordova-plugin-classkit.git',
|
||||
platforms: ['iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class ClassKit extends IonicNativePlugin {
|
||||
/**
|
||||
* Init contexts defined in XML file 'CCK-contexts.xml'
|
||||
* @param {string} urlPrefix URL prefix to use for custom URLs to locate activities (deeplink).
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
initContextsFromXml(urlPrefix: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Init context with identifier path
|
||||
* @param {string} urlPrefix URL prefix to use for custom URLs to locate activities (deeplink).
|
||||
* @param {CCKContext} context Context to initialize.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
addContext(urlPrefix: string, context: CCKContext): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all contexts
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
removeContexts(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove context with identifier path
|
||||
* @param {string[]} identifierPath Full identifier path from root, including the context identifier itself.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
removeContext(identifierPath: string[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Begin a new activity or restart an activity for a given context
|
||||
* @param {string[]} identifierPath Full identifier path from root, including the context identifier itself.
|
||||
* @param {boolean} asNew Should a new activity be created (or an old activity be restarted).
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
beginActivity(identifierPath: string[], asNew: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* End the active activity
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
endActivity(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a progress range to the active given activity
|
||||
* @param {number} fromStart The beginning of the new range to add. This should be fractional value between 0 and 1, inclusive.
|
||||
* @param {number} toEnd The end of the new range to add. This should be larger than the start value and less than or equal to one.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setProgressRange(fromStart: number, toEnd: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a progress to the active given activity
|
||||
* @param {number} progress A measure of progress through the task, given as a fraction in the range [0, 1].
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setProgress(progress: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds activity information that is true or false, pass or fail, yes or no
|
||||
* @param {CCKBinaryItem} binaryItem The binary item to add to the activity.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setBinaryItem(binaryItem: CCKBinaryItem): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds activity information that signifies a score out of a possible maximum
|
||||
* @param {CCKScoreItem} scoreItem The score item to add to the activity.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setScoreItem(scoreItem: CCKScoreItem): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Activity information that signifies a quantity.
|
||||
* @param {CCKQuantityItem} quantityItem The quantity item to add to the activity.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setQuantityItem(quantityItem: CCKQuantityItem): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,592 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
declare var clevertap: any;
|
||||
|
||||
/**
|
||||
* @name CleverTap
|
||||
* @description
|
||||
* Cordova Plugin that wraps CleverTap SDK for Android and iOS
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { CleverTap } from '@ionic-native/clevertap';
|
||||
|
||||
* constructor(private clevertap: CleverTap) { }
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'CleverTap',
|
||||
plugin: 'clevertap-cordova',
|
||||
pluginRef: 'CleverTap',
|
||||
repo: 'https://github.com/CleverTap/clevertap-cordova',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class CleverTap extends IonicNativePlugin {
|
||||
/**
|
||||
* notify device ready
|
||||
* NOTE: in iOS use to be notified of launch Push Notification or Deep Link
|
||||
* in Android use only in android phonegap build projects
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
notifyDeviceReady(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/*******************
|
||||
* Personalization
|
||||
******************/
|
||||
|
||||
/**
|
||||
* Personalization
|
||||
* Enables the Personalization API
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
enablePersonalization(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables tracking opt out for the currently active user.
|
||||
* @param optOut {boolean}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setOptOut(optOut: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables the reporting of device network related information, including IP address. This reporting is disabled by default.
|
||||
* @param enable {boolean}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
enableDeviceNetworkInfoReporting(enable: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/*******************
|
||||
* Push
|
||||
******************/
|
||||
|
||||
/**
|
||||
* Registers for push notifications
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerPush(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the device's push token
|
||||
* @param token {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setPushToken(token: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Notification Channel for Android O+
|
||||
* @param channelID {string}
|
||||
* @param channelName {string}
|
||||
* @param channelDescription {string}
|
||||
* @param importance {number}
|
||||
* @param showBadge {boolean}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
createNotificationChannel(
|
||||
channelID: string,
|
||||
channelName: string,
|
||||
channelDescription: string,
|
||||
importance: number,
|
||||
showBadge: boolean
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Notification Channel for Android O+
|
||||
* @param channelID {string}
|
||||
* @param channelName {string}
|
||||
* @param channelDescription {string}
|
||||
* @param importance {number}
|
||||
* @param showBadge {boolean}
|
||||
* @param sound {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
createNotificationChannelWithSound(
|
||||
channelID: string,
|
||||
channelName: string,
|
||||
channelDescription: string,
|
||||
importance: number,
|
||||
showBadge: boolean,
|
||||
sound: string
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Notification Channel with Group ID for Android O+
|
||||
* @param channelID {string}
|
||||
* @param channelName {string}
|
||||
* @param channelDescription {string}
|
||||
* @param importance {number}
|
||||
* @param groupId {string}
|
||||
* @param showBadge {boolean}
|
||||
* @param sound {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
createNotificationChannelWithGroupId(
|
||||
channelID: string,
|
||||
channelName: string,
|
||||
channelDescription: string,
|
||||
importance: number,
|
||||
groupId: string,
|
||||
showBadge: boolean
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Notification Channel with Group ID for Android O+
|
||||
* @param channelID {string}
|
||||
* @param channelName {string}
|
||||
* @param channelDescription {string}
|
||||
* @param importance {number}
|
||||
* @param groupId {string}
|
||||
* @param showBadge {boolean}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
createNotificationChannelWithGroupIdAndSound(
|
||||
channelID: string,
|
||||
channelName: string,
|
||||
channelDescription: string,
|
||||
importance: number,
|
||||
groupId: string,
|
||||
showBadge: boolean,
|
||||
sound: string
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Notification Channel Group for Android O+
|
||||
* @param groupID {string}
|
||||
* @param groupName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
createNotificationChannelGroup(
|
||||
groupID: string,
|
||||
groupName: string
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete Notification Channel for Android O+
|
||||
* @param channelID {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
deleteNotificationChannel(channelID: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete Notification Group for Android O+
|
||||
* @param groupID {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
deleteNotificationChannelGroup(groupID: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/*******************
|
||||
* Events
|
||||
******************/
|
||||
|
||||
/**
|
||||
* Record Screen View
|
||||
* @param screenName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
recordScreenView(screenName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Record Event with Name
|
||||
* @param eventName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
recordEventWithName(eventName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Record Event with Name and Event properties
|
||||
* @param eventName {string}
|
||||
* @param eventProps {any}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
recordEventWithNameAndProps(
|
||||
eventName: string,
|
||||
eventProps: any
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Record Charged Event with Details and Items
|
||||
* @param details {any} object with transaction details
|
||||
* @param items {any} array of items purchased
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
recordChargedEventWithDetailsAndItems(
|
||||
details: any,
|
||||
items: any
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Event First Time
|
||||
* @param eventName {string}
|
||||
* callback returns epoch seconds or -1
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
eventGetFirstTime(eventName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Event Last Time
|
||||
* @param eventName {string}
|
||||
* callback returns epoch seconds or -1
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
eventGetLastTime(eventName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Event Number of Occurrences
|
||||
* @param eventName {string}
|
||||
* calls back with int or -1
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
eventGetOccurrences(eventName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Event Details
|
||||
* @param eventName {string}
|
||||
* calls back with object {"eventName": <string>, "firstTime":<epoch seconds>, "lastTime": <epoch seconds>, "count": <int>} or empty object
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
eventGetDetails(eventName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Event History
|
||||
* calls back with object {"eventName1":<event1 details object>, "eventName2":<event2 details object>}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getEventHistory(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/*******************
|
||||
* Profiles
|
||||
******************/
|
||||
|
||||
/**
|
||||
* Get the device location if available.
|
||||
* On iOS:
|
||||
* Calling this will prompt the user location permissions dialog.
|
||||
* Please be sure to include the NSLocationWhenInUseUsageDescription key in your Info.plist.
|
||||
* Uses desired accuracy of kCLLocationAccuracyHundredMeters.
|
||||
* If you need background location updates or finer accuracy please implement your own location handling.
|
||||
* On Android:
|
||||
* Requires Location Permission in AndroidManifest e.g. "android.permission.ACCESS_COARSE_LOCATION"
|
||||
* You can use location to pass it to CleverTap via the setLocation API
|
||||
* for, among other things, more fine-grained geo-targeting and segmentation purposes.
|
||||
* Note: on iOS the call to CleverTapSDK must be made on the main thread due to LocationManager restrictions, but the CleverTapSDK method itself is non-blocking.
|
||||
* calls back with {lat:lat, lon:lon} lat and lon are floats
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getLocation(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set location
|
||||
* @param lat {number}
|
||||
* @param lon {number}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setLocation(lat: number, lon: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a separate and distinct user profile identified by one or more of Identity, Email, FBID or GPID values,
|
||||
* and populated with the key-values included in the profile dictionary.
|
||||
* If your app is used by multiple users, you can use this method to assign them each a unique profile to track them separately.
|
||||
* If instead you wish to assign multiple Identity, Email, FBID and/or GPID values to the same user profile,
|
||||
* use profileSet rather than this method.
|
||||
* If none of Identity, Email, FBID or GPID is included in the profile dictionary,
|
||||
* all properties values will be associated with the current user profile.
|
||||
* When initially installed on this device, your app is assigned an "anonymous" profile.
|
||||
* The first time you identify a user on this device (whether via onUserLogin or profileSet),
|
||||
* the "anonymous" history on the device will be associated with the newly identified user.
|
||||
* Then, use this method to switch between subsequent separate identified users.
|
||||
* Please note that switching from one identified user to another is a costly operation
|
||||
* in that the current session for the previous user is automatically closed
|
||||
* and data relating to the old user removed, and a new session is started
|
||||
* for the new user and data for that user refreshed via a network call to CleverTap.
|
||||
* In addition, any global frequency caps are reset as part of the switch.
|
||||
* @param profile {any} object
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
onUserLogin(profile: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set profile attributes
|
||||
* @param profile {any} object
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
profileSet(profile: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set profile attributes from facebook user
|
||||
* @param profile {any} facebook graph user object
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
profileSetGraphUser(profile: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set profile attributes rom google plus user
|
||||
* @param profile {any} google plus user object
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
profileGooglePlusUser(profile: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get User Profile Property
|
||||
* @param propertyName {string}
|
||||
* calls back with value of propertyName or false
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
profileGetProperty(propertyName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a unique CleverTap identifier suitable for use with install attribution providers.
|
||||
* calls back with unique CleverTap attribution identifier
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
profileGetCleverTapAttributionIdentifier(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get User Profile CleverTapID
|
||||
* calls back with CleverTapID or false
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
profileGetCleverTapID(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the property specified by key from the user profile
|
||||
* @param key {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
profileRemoveValueForKey(key: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method for setting a multi-value user profile property
|
||||
* @param key {string}
|
||||
* @param values {any} array of strings
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
profileSetMultiValues(key: string, values: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method for adding a value to a multi-value user profile property
|
||||
* @param key {string}
|
||||
* @param value {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
profileAddMultiValue(key: string, value: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method for adding values to a multi-value user profile property
|
||||
* @param key {string}
|
||||
* @param values {any} array of strings
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
profileAddMultiValues(key: string, values: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method for removing a value from a multi-value user profile property
|
||||
* @param key {string}
|
||||
* @param value {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
profileRemoveMultiValue(key: string, value: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method for removing a value from a multi-value user profile property
|
||||
* @param key {string}
|
||||
* @param values {any} array of strings
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
profileRemoveMultiValues(key: string, values: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/*******************
|
||||
* Session
|
||||
******************/
|
||||
|
||||
/**
|
||||
* Get Session Elapsed Time
|
||||
* calls back with seconds
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
sessionGetTimeElapsed(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Session Total Visits
|
||||
* calls back with with int or -1
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
sessionGetTotalVisits(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Session Screen Count
|
||||
* calls back with with int
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
sessionGetScreenCount(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Session Previous Visit Time
|
||||
* calls back with with epoch seconds or -1
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
sessionGetPreviousVisitTime(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Sesssion Referrer UTM details
|
||||
* object {"source": <string>, "medium": <string>, "campaign": <string>} or empty object
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
sessionGetUTMDetails(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to manually track the utm details for an incoming install referrer
|
||||
* @param source {string}
|
||||
* @param medium {string}
|
||||
* @param campaign {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
pushInstallReferrer(
|
||||
source: string,
|
||||
medium: string,
|
||||
campaign: string
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/*******************
|
||||
* Developer Options
|
||||
******************/
|
||||
/**
|
||||
* 0 is off, 1 is info, 2 is debug, default is 1
|
||||
* @param level {number}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setDebugLevel(level: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,8 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
* alert('Error: ' + reject);
|
||||
* }
|
||||
* );
|
||||
*
|
||||
* this.clipboard.clear();
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
@@ -52,4 +54,11 @@ export class Clipboard extends IonicNativePlugin {
|
||||
@Cordova()
|
||||
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; }
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Cloud Settings
|
||||
* @description
|
||||
* Stores app settings in cloud storage so if the user re-installs the app or installs it on a different device, the settings will be restored and available in the new installation.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { CloudSettings } from '@ionic-native/cloud-settings';
|
||||
*
|
||||
*
|
||||
* constructor(private cloudSettings: CloudSettings) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.cloudSettings.exists()
|
||||
* .then((exists: boolean) => console.log("Saved settings exist: " + exists) )
|
||||
*
|
||||
* this.cloudSettings.load()
|
||||
* .then((settings: any) => this.settings = settings)
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* this.cloudSettings.save(this.settings)
|
||||
* .then((savedSettings: any) => console.log("Saved settings: " + JSON.stringify(savedSettings)))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'CloudSettings',
|
||||
plugin: 'cordova-plugin-cloud-settings',
|
||||
pluginRef: 'cordova.plugin.cloudsettings',
|
||||
repo: 'https://github.com/dpa99c/cordova-plugin-cloud-settings',
|
||||
install:
|
||||
'ionic cordova plugin add cordova-plugin-cloud-settings --variable ANDROID_BACKUP_SERVICE_KEY=myapikey',
|
||||
installVariables: ['ANDROID_BACKUP_SERVICE_KEY'],
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class CloudSettings extends IonicNativePlugin {
|
||||
/**
|
||||
* Indicates if any stored cloud settings currently exist for the current user.
|
||||
* @return {Promise<boolean>} Will be passed a boolean flag which indicates whether an store settings exist for the user.
|
||||
*/
|
||||
@Cordova()
|
||||
exists(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the settings to cloud backup.
|
||||
* @param {object} settings - a JSON structure representing the user settings to save to cloud backup.
|
||||
* @param {boolean} [overwrite] - (optional) if true, existing settings will be replaced rather than updated. Defaults to false.
|
||||
* If false, existing settings will be merged with the new settings passed to this function.
|
||||
* @return {Promise<any>} Will be passed a single object argument which contains the saved settings as a JSON object.
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
})
|
||||
save(settings: any, overwrite?: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the current settings.
|
||||
* @return {Promise<any>} Will be passed a single object argument which contains the saved settings as a JSON object.
|
||||
*/
|
||||
@Cordova()
|
||||
load(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a function which will be called if/when settings on the device have been updated from the cloud.
|
||||
* @param {Function} handler - callback function to invoke when device settings have been updated from the cloud.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
onRestore(handler: Function): void {}
|
||||
|
||||
/**
|
||||
* Outputs verbose log messages from the native plugin components to the JS console.
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
enableDebug(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -306,6 +306,7 @@ export class ContactFindOptions implements IContactFindOptions {
|
||||
* @description
|
||||
* Access and manage Contacts on the device.
|
||||
*
|
||||
* @deprecated
|
||||
* @usage
|
||||
*
|
||||
* ```typescript
|
||||
|
||||
@@ -45,12 +45,12 @@ export interface DeeplinkOptions {
|
||||
* '/about-us': AboutPage,
|
||||
* '/universal-links-test': AboutPage,
|
||||
* '/products/:productId': ProductPage
|
||||
* }).subscribe((match) => {
|
||||
* }).subscribe(match => {
|
||||
* // match.$route - the route we matched, which is the matched entry from the arguments to route()
|
||||
* // match.$args - the args passed in the link
|
||||
* // match.$link - the full link data
|
||||
* console.log('Successfully matched route', match);
|
||||
* }, (nomatch) => {
|
||||
* }, nomatch => {
|
||||
* // nomatch.$link - the full link data
|
||||
* console.error('Got a deeplink that didn\'t match', nomatch);
|
||||
* });
|
||||
@@ -63,12 +63,12 @@ export interface DeeplinkOptions {
|
||||
* this.deeplinks.routeWithNavController(this.navController, {
|
||||
* '/about-us': AboutPage,
|
||||
* '/products/:productId': ProductPage
|
||||
* }).subscribe((match) => {
|
||||
* }).subscribe(match => {
|
||||
* // match.$route - the route we matched, which is the matched entry from the arguments to route()
|
||||
* // match.$args - the args passed in the link
|
||||
* // match.$link - the full link data
|
||||
* console.log('Successfully matched route', match);
|
||||
* }, (nomatch) => {
|
||||
* }, nomatch => {
|
||||
* // nomatch.$link - the full link data
|
||||
* console.error('Got a deeplink that didn\'t match', nomatch);
|
||||
* });
|
||||
|
||||
@@ -10,9 +10,9 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { IOSDocumentPicker } from '@ionic-native/document-picker';
|
||||
* import { DocumentPicker } from '@ionic-native/document-picker';
|
||||
*
|
||||
* constructor(private docPicker: IOSDocumentPicker) { }
|
||||
* constructor(private docPicker: DocumentPicker) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
|
||||
@@ -4,7 +4,11 @@ import { CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
/**
|
||||
* @name Extended Device Information
|
||||
* @description
|
||||
* Retrieves additional device information that is not provided by other plugins
|
||||
* Retrieves additional device information from the Device Hardware
|
||||
* - memory
|
||||
* - cpumhz
|
||||
* - totalstorage
|
||||
* - freestorage
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
@@ -22,23 +26,23 @@ import { CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
pluginName: 'ExtendedDeviceInformation',
|
||||
plugin: 'cordova-plugin-extended-device-information',
|
||||
pluginRef: 'extended-device-information',
|
||||
repo: 'https://github.com/danielehrhardt/cordova-plugin-extended-device-information',
|
||||
repo:
|
||||
'https://github.com/danielehrhardt/cordova-plugin-extended-device-information',
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class ExtendedDeviceInformation extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Get the device's memory size
|
||||
*/
|
||||
@CordovaProperty
|
||||
memory: number;
|
||||
memory: string;
|
||||
|
||||
/**
|
||||
* Get the device's CPU mhz
|
||||
*/
|
||||
@CordovaProperty
|
||||
cpumhz: string;
|
||||
cpumhz: number;
|
||||
|
||||
/**
|
||||
* Get the total storage
|
||||
@@ -46,4 +50,9 @@ export class ExtendedDeviceInformation extends IonicNativePlugin {
|
||||
@CordovaProperty
|
||||
totalstorage: string;
|
||||
|
||||
/**
|
||||
* Get the total storage
|
||||
*/
|
||||
@CordovaProperty
|
||||
freestorage: number;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,425 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface Attributes {
|
||||
[index: string]: String;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Crashlytics
|
||||
* @description
|
||||
* API for interacting with the Crashlytics kit.
|
||||
*
|
||||
* https://docs.fabric.io/crashlytics/index.html
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Crashlytics } from '@ionic-native/fabric';
|
||||
*
|
||||
*
|
||||
* constructor(private crashlytics: Crashlytics) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* try {
|
||||
* await this.loadData();
|
||||
* } catch (e) {
|
||||
* this.crashlytics.addLog("Error while loading data");
|
||||
* this.crashlytics.sendNonFatalCrash(e.message || e);
|
||||
* }
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Crashlytics',
|
||||
plugin: 'cordova-fabric-plugin',
|
||||
pluginRef: 'window.fabric.Crashlytics',
|
||||
repo: 'https://www.npmjs.com/package/cordova-fabric-plugin',
|
||||
install:
|
||||
'ionic cordova plugin add cordova-fabric-plugin --variable FABRIC_API_KEY=XXX --variable FABRIC_API_SECRET=xxx',
|
||||
installVariables: ['FABRIC_API_KEY', 'FABRIC_API_SECRET'],
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Crashlytics extends IonicNativePlugin {
|
||||
/**
|
||||
* Add logging that will be sent with your crash data. This logging will not show up
|
||||
* in the system.log and will only be visible in your Crashlytics dashboard.
|
||||
* @param message {string}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
addLog(message: string): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to simulate a native platform crash (useful for testing Crashlytics logging).
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
sendCrash(): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to log a non-fatal error message (Android only).
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
sendNonFatalCrash(message: string, stacktrace?: any): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to record a non-fatal error message (iOS only).
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
recordError(message: string, code: number): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the user's identifier for logging to Crashlytics backend.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setUserIdentifier(userId: string): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the user's name for logging to Crashlytics backend.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setUserName(userName: string): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the user's email address for logging to Crashlytics backend.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setUserEmail(email: string): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a custom key/value pair for logging to Crashlytics backend.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setStringValueForKey(value: string, key: string): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a custom key/value pair for logging to Crashlytics backend.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setIntValueForKey(value: number, key: string): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a custom key/value pair for logging to Crashlytics backend.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setBoolValueForKey(value: boolean, key: string): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a custom key/value pair for logging to Crashlytics backend.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setFloatValueForKey(value: number, key: string): void {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Answers
|
||||
* @description
|
||||
* API for interacting with the Answers kit.
|
||||
*
|
||||
* https://docs.fabric.io/crashlytics/index.html
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Answers } from '@ionic-native/fabric';
|
||||
*
|
||||
*
|
||||
* constructor(private answers: Answers) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.answers.sendCustomEvent('SomeCustomEvent', { some: "attributes" })
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Answers',
|
||||
plugin: 'cordova-fabric-plugin',
|
||||
pluginRef: 'window.fabric.Answers',
|
||||
repo: 'https://www.npmjs.com/package/cordova-fabric-plugin',
|
||||
install:
|
||||
'ionic cordova plugin add cordova-fabric-plugin --variable FABRIC_API_KEY=XXX --variable FABRIC_API_SECRET=xxx',
|
||||
installVariables: ['FABRIC_API_KEY', 'FABRIC_API_SECRET'],
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Answers extends IonicNativePlugin {
|
||||
/**
|
||||
* Sends the Purchase tracking event.
|
||||
*
|
||||
* All parameters are optional.
|
||||
*
|
||||
* https://docs.fabric.io/android/answers/answers-events.html#purchase
|
||||
*
|
||||
* @param itemPrice The item's amount in the currency specified.
|
||||
* @param currency The ISO4217 currency code.
|
||||
* @param success Was the purchase completed succesfully?
|
||||
* @param itemName The human-readable name for the item.
|
||||
* @param itemType The category the item falls under.
|
||||
* @param itemId A unique identifier used to track the item.
|
||||
* @param attributes Any additional user-defined attributes to be logged.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
sendPurchase(
|
||||
itemPrice?: number,
|
||||
currency?: string,
|
||||
success?: boolean,
|
||||
itemName?: string,
|
||||
itemType?: string,
|
||||
itemId?: string,
|
||||
attributes?: Attributes
|
||||
): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends the Add To Cart tracking event.
|
||||
*
|
||||
* All parameters are optional.
|
||||
*
|
||||
* https://docs.fabric.io/android/answers/answers-events.html#add-to-cart
|
||||
*
|
||||
* @param itemPrice The item's amount in the currency specified.
|
||||
* @param currency The ISO4217 currency code.
|
||||
* @param itemName The human-readable name for the item.
|
||||
* @param itemType The category the item falls under.
|
||||
* @param itemId A unique identifier used to track the item.
|
||||
* @param attributes Any additional user-defined attributes to be logged.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
sendAddToCart(
|
||||
itemPrice?: number,
|
||||
currency?: string,
|
||||
itemName?: string,
|
||||
itemType?: string,
|
||||
itemId?: string,
|
||||
attributes?: Attributes
|
||||
): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends the Start Checkout tracking event.
|
||||
*
|
||||
* All parameters are optional.
|
||||
*
|
||||
* https://docs.fabric.io/android/answers/answers-events.html#start-checkout
|
||||
*
|
||||
* @param totalPrice The total price of all items in cart in the currency specified.
|
||||
* @param currency The ISO4217 currency code.
|
||||
* @param itemCount The count of items in cart.
|
||||
* @param attributes Any additional user-defined attributes to be logged.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
sendStartCheckout(
|
||||
totalPrice?: number,
|
||||
currency?: string,
|
||||
itemCount?: number,
|
||||
attributes?: Attributes
|
||||
): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends the Search tracking event.
|
||||
*
|
||||
* https://docs.fabric.io/android/answers/answers-events.html#search
|
||||
*
|
||||
* @param query What the user is searching for.
|
||||
* @param attributes Any additional user-defined attributes to be logged.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
sendSearch(query: string, attributes?: Attributes): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends the Share tracking event.
|
||||
*
|
||||
* All parameters are optional.
|
||||
*
|
||||
* https://docs.fabric.io/android/answers/answers-events.html#share
|
||||
*
|
||||
* @param method The method used to share content.
|
||||
* @param contentName The description of the content.
|
||||
* @param contentType The type or genre of content.
|
||||
* @param contentId A unique key identifying the content.
|
||||
* @param attributes Any additional user-defined attributes to be logged.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
sendShare(
|
||||
method?: string,
|
||||
contentName?: string,
|
||||
contentType?: string,
|
||||
contentId?: string,
|
||||
attributes?: Attributes
|
||||
): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends the Rated Content tracking event.
|
||||
*
|
||||
* All parameters are optional.
|
||||
*
|
||||
* https://docs.fabric.io/android/answers/answers-events.html#rated-content
|
||||
*
|
||||
* @param rating An integer rating of the content.
|
||||
* @param contentName The human-readable name of content.
|
||||
* @param contentType The category your item falls under.
|
||||
* @param contentId A unique identifier used to track the item.
|
||||
* @param attributes Any additional user-defined attributes to be logged.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
sendRatedContent(
|
||||
rating?: number,
|
||||
contentName?: string,
|
||||
contentType?: string,
|
||||
contentId?: string,
|
||||
attributes?: Attributes
|
||||
): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends the Sign Up tracking event.
|
||||
*
|
||||
* All parameters are optional.
|
||||
*
|
||||
* https://docs.fabric.io/android/answers/answers-events.html#sign-up
|
||||
*
|
||||
* @param method An optional description of the sign up method (Twitter, Facebook, etc.); defaults to "Direct".
|
||||
* @param success An optional flag that indicates sign up success; defaults to true.
|
||||
* @param attributes Any additional user-defined attributes to be logged.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
sendSignUp(
|
||||
method?: string,
|
||||
success?: boolean,
|
||||
attributes?: Attributes
|
||||
): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends the Log In tracking event.
|
||||
*
|
||||
* All parameters are optional.
|
||||
*
|
||||
* https://docs.fabric.io/android/answers/answers-events.html#log-in
|
||||
*
|
||||
* @param method An optional description of the sign in method (Twitter, Facebook, etc.); defaults to "Direct".
|
||||
* @param success An optional flag that indicates sign in success; defaults to true.
|
||||
* @param attributes Any additional user-defined attributes to be logged.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
sendLogIn(method?: string, success?: boolean, attributes?: Attributes): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends the Invite tracking event.
|
||||
*
|
||||
* All parameters are optional.
|
||||
*
|
||||
* https://docs.fabric.io/android/answers/answers-events.html#invite
|
||||
*
|
||||
* @param method An optional description of the sign in method (Twitter, Facebook, etc.); defaults to "Direct".
|
||||
* @param attributes Any additional user-defined attributes to be logged.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
sendInvite(method?: string, attributes?: Attributes): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends the Level Start tracking event.
|
||||
*
|
||||
* All parameters are optional.
|
||||
*
|
||||
* https://docs.fabric.io/android/answers/answers-events.html#level-start
|
||||
*
|
||||
* @param levelName String key describing the level.
|
||||
* @param attributes Any additional user-defined attributes to be logged.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
sendLevelStart(levelName?: string, attributes?: Attributes): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends the Level End tracking event.
|
||||
*
|
||||
* All parameters are optional.
|
||||
*
|
||||
* https://docs.fabric.io/android/answers/answers-events.html#level-end
|
||||
*
|
||||
* @param levelName String key describing the level.
|
||||
* @param score The score for this level.
|
||||
* @param success Completed the level or failed trying.
|
||||
* @param attributes Any additional user-defined attributes to be logged.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
sendLevelEnd(
|
||||
levelName?: string,
|
||||
score?: number,
|
||||
success?: boolean,
|
||||
attributes?: Attributes
|
||||
): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the Content View tracking event.
|
||||
*
|
||||
* https://docs.fabric.io/android/answers/answers-events.html#content-view
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
sendContentView(
|
||||
name: string,
|
||||
type?: string,
|
||||
id?: string,
|
||||
attributes?: Attributes
|
||||
): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcut for sendContentView(...) using type of "Screen".
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
sendScreenView(name: string, id: string, attributes?: Attributes): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a custom tracking event with the given name.
|
||||
*
|
||||
* https://docs.fabric.io/android/answers/answers-events.html#custom-event
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
sendCustomEvent(name: string, attributes?: Attributes): void {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -2,11 +2,9 @@ import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface FacebookLoginResponse {
|
||||
|
||||
status: string;
|
||||
|
||||
authResponse: {
|
||||
|
||||
session_key: boolean;
|
||||
|
||||
accessToken: string;
|
||||
@@ -18,9 +16,7 @@ export interface FacebookLoginResponse {
|
||||
secret: string;
|
||||
|
||||
userID: string;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,46 +110,46 @@ export interface FacebookLoginResponse {
|
||||
plugin: 'cordova-plugin-facebook4',
|
||||
pluginRef: 'facebookConnectPlugin',
|
||||
repo: 'https://github.com/jeduan/cordova-plugin-facebook4',
|
||||
install: 'ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"',
|
||||
install:
|
||||
'ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"',
|
||||
installVariables: ['APP_ID', 'APP_NAME'],
|
||||
platforms: ['Android', 'iOS', 'Browser']
|
||||
})
|
||||
@Injectable()
|
||||
export class Facebook extends IonicNativePlugin {
|
||||
|
||||
EVENTS: {
|
||||
EVENT_NAME_ACTIVATED_APP: 'fb_mobile_activate_app',
|
||||
EVENT_NAME_DEACTIVATED_APP: 'fb_mobile_deactivate_app',
|
||||
EVENT_NAME_SESSION_INTERRUPTIONS: 'fb_mobile_app_interruptions',
|
||||
EVENT_NAME_TIME_BETWEEN_SESSIONS: 'fb_mobile_time_between_sessions',
|
||||
EVENT_NAME_COMPLETED_REGISTRATION: 'fb_mobile_complete_registration',
|
||||
EVENT_NAME_VIEWED_CONTENT: 'fb_mobile_content_view',
|
||||
EVENT_NAME_SEARCHED: 'fb_mobile_search',
|
||||
EVENT_NAME_RATED: 'fb_mobile_rate',
|
||||
EVENT_NAME_COMPLETED_TUTORIAL: 'fb_mobile_tutorial_completion',
|
||||
EVENT_NAME_PUSH_TOKEN_OBTAINED: 'fb_mobile_obtain_push_token',
|
||||
EVENT_NAME_ADDED_TO_CART: 'fb_mobile_add_to_cart',
|
||||
EVENT_NAME_ADDED_TO_WISHLIST: 'fb_mobile_add_to_wishlist',
|
||||
EVENT_NAME_INITIATED_CHECKOUT: 'fb_mobile_initiated_checkout',
|
||||
EVENT_NAME_ADDED_PAYMENT_INFO: 'fb_mobile_add_payment_info',
|
||||
EVENT_NAME_PURCHASED: 'fb_mobile_purchase',
|
||||
EVENT_NAME_ACHIEVED_LEVEL: 'fb_mobile_level_achieved',
|
||||
EVENT_NAME_UNLOCKED_ACHIEVEMENT: 'fb_mobile_achievement_unlocked',
|
||||
EVENT_NAME_SPENT_CREDITS: 'fb_mobile_spent_credits',
|
||||
EVENT_PARAM_CURRENCY: 'fb_currency',
|
||||
EVENT_PARAM_REGISTRATION_METHOD: 'fb_registration_method',
|
||||
EVENT_PARAM_CONTENT_TYPE: 'fb_content_type',
|
||||
EVENT_PARAM_CONTENT_ID: 'fb_content_id',
|
||||
EVENT_PARAM_SEARCH_STRING: 'fb_search_string',
|
||||
EVENT_PARAM_SUCCESS: 'fb_success',
|
||||
EVENT_PARAM_MAX_RATING_VALUE: 'fb_max_rating_value',
|
||||
EVENT_PARAM_PAYMENT_INFO_AVAILABLE: 'fb_payment_info_available',
|
||||
EVENT_PARAM_NUM_ITEMS: 'fb_num_items',
|
||||
EVENT_PARAM_LEVEL: 'fb_level',
|
||||
EVENT_PARAM_DESCRIPTION: 'fb_description',
|
||||
EVENT_PARAM_SOURCE_APPLICATION: 'fb_mobile_launch_source',
|
||||
EVENT_PARAM_VALUE_YES: '1',
|
||||
EVENT_PARAM_VALUE_NO: '0'
|
||||
EVENT_NAME_ACTIVATED_APP: 'fb_mobile_activate_app';
|
||||
EVENT_NAME_DEACTIVATED_APP: 'fb_mobile_deactivate_app';
|
||||
EVENT_NAME_SESSION_INTERRUPTIONS: 'fb_mobile_app_interruptions';
|
||||
EVENT_NAME_TIME_BETWEEN_SESSIONS: 'fb_mobile_time_between_sessions';
|
||||
EVENT_NAME_COMPLETED_REGISTRATION: 'fb_mobile_complete_registration';
|
||||
EVENT_NAME_VIEWED_CONTENT: 'fb_mobile_content_view';
|
||||
EVENT_NAME_SEARCHED: 'fb_mobile_search';
|
||||
EVENT_NAME_RATED: 'fb_mobile_rate';
|
||||
EVENT_NAME_COMPLETED_TUTORIAL: 'fb_mobile_tutorial_completion';
|
||||
EVENT_NAME_PUSH_TOKEN_OBTAINED: 'fb_mobile_obtain_push_token';
|
||||
EVENT_NAME_ADDED_TO_CART: 'fb_mobile_add_to_cart';
|
||||
EVENT_NAME_ADDED_TO_WISHLIST: 'fb_mobile_add_to_wishlist';
|
||||
EVENT_NAME_INITIATED_CHECKOUT: 'fb_mobile_initiated_checkout';
|
||||
EVENT_NAME_ADDED_PAYMENT_INFO: 'fb_mobile_add_payment_info';
|
||||
EVENT_NAME_PURCHASED: 'fb_mobile_purchase';
|
||||
EVENT_NAME_ACHIEVED_LEVEL: 'fb_mobile_level_achieved';
|
||||
EVENT_NAME_UNLOCKED_ACHIEVEMENT: 'fb_mobile_achievement_unlocked';
|
||||
EVENT_NAME_SPENT_CREDITS: 'fb_mobile_spent_credits';
|
||||
EVENT_PARAM_CURRENCY: 'fb_currency';
|
||||
EVENT_PARAM_REGISTRATION_METHOD: 'fb_registration_method';
|
||||
EVENT_PARAM_CONTENT_TYPE: 'fb_content_type';
|
||||
EVENT_PARAM_CONTENT_ID: 'fb_content_id';
|
||||
EVENT_PARAM_SEARCH_STRING: 'fb_search_string';
|
||||
EVENT_PARAM_SUCCESS: 'fb_success';
|
||||
EVENT_PARAM_MAX_RATING_VALUE: 'fb_max_rating_value';
|
||||
EVENT_PARAM_PAYMENT_INFO_AVAILABLE: 'fb_payment_info_available';
|
||||
EVENT_PARAM_NUM_ITEMS: 'fb_num_items';
|
||||
EVENT_PARAM_LEVEL: 'fb_level';
|
||||
EVENT_PARAM_DESCRIPTION: 'fb_description';
|
||||
EVENT_PARAM_SOURCE_APPLICATION: 'fb_mobile_launch_source';
|
||||
EVENT_PARAM_VALUE_YES: '1';
|
||||
EVENT_PARAM_VALUE_NO: '0';
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -178,7 +174,9 @@ export class Facebook extends IonicNativePlugin {
|
||||
* @returns {Promise<FacebookLoginResponse>} Returns a Promise that resolves with a status object if login succeeds, and rejects if login fails.
|
||||
*/
|
||||
@Cordova()
|
||||
login(permissions: string[]): Promise<FacebookLoginResponse> { return; }
|
||||
login(permissions: string[]): Promise<FacebookLoginResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Logout of Facebook.
|
||||
@@ -187,7 +185,9 @@ export class Facebook extends IonicNativePlugin {
|
||||
* @returns {Promise<any>} Returns a Promise that resolves on a successful logout, and rejects if logout fails.
|
||||
*/
|
||||
@Cordova()
|
||||
logout(): Promise<any> { return; }
|
||||
logout(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a user is logged in to Facebook and has authenticated your app. There are three possible states for a user:
|
||||
@@ -216,7 +216,9 @@ export class Facebook extends IonicNativePlugin {
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with a status, or rejects with an error
|
||||
*/
|
||||
@Cordova()
|
||||
getLoginStatus(): Promise<any> { return; }
|
||||
getLoginStatus(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a Facebook access token for using Facebook services.
|
||||
@@ -224,7 +226,9 @@ export class Facebook extends IonicNativePlugin {
|
||||
* @returns {Promise<string>} Returns a Promise that resolves with an access token, or rejects with an error
|
||||
*/
|
||||
@Cordova()
|
||||
getAccessToken(): Promise<string> { return; }
|
||||
getAccessToken(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show one of various Facebook dialogs. Example of options for a Share dialog:
|
||||
@@ -244,7 +248,9 @@ export class Facebook extends IonicNativePlugin {
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with success data, or rejects with an error
|
||||
*/
|
||||
@Cordova()
|
||||
showDialog(options: any): Promise<any> { return; }
|
||||
showDialog(options: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a call to Facebook Graph API. Can take additional permissions beyond those granted on login.
|
||||
@@ -260,7 +266,9 @@ export class Facebook extends IonicNativePlugin {
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the result of the request, or rejects with an error
|
||||
*/
|
||||
@Cordova()
|
||||
api(requestPath: string, permissions: string[]): Promise<any> { return; }
|
||||
api(requestPath: string, permissions: string[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Log an event. For more information see the Events section above.
|
||||
@@ -274,7 +282,9 @@ export class Facebook extends IonicNativePlugin {
|
||||
successIndex: 3,
|
||||
errorIndex: 4
|
||||
})
|
||||
logEvent(name: string, params?: Object, valueToSum?: number): Promise<any> { return; }
|
||||
logEvent(name: string, params?: Object, valueToSum?: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Log a purchase. For more information see the Events section above.
|
||||
@@ -284,26 +294,16 @@ export class Facebook extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
logPurchase(value: number, currency: string): Promise<any> { return; }
|
||||
logPurchase(value: number, currency: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Open App Invite dialog. Does not require login.
|
||||
*
|
||||
* For more information see:
|
||||
*
|
||||
* the App Invites Overview - https://developers.facebook.com/docs/app-invites/overview
|
||||
* the App Links docs - https://developers.facebook.com/docs/applinks
|
||||
*
|
||||
*
|
||||
* @param {Object} options An object containing an [App Link](https://developers.facebook.com/docs/applinks) URL to your app and an optional image URL.
|
||||
* @param {string} options.url [App Link](https://developers.facebook.com/docs/applinks) to your app
|
||||
* @param {string} [options.picture] image to be displayed in the App Invite dialog
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the result data, or rejects with an error
|
||||
* Returns the deferred app link
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
appInvite(options: {
|
||||
url: string,
|
||||
picture: string
|
||||
}): Promise<any> { return; }
|
||||
|
||||
getDeferredApplink(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,9 +55,9 @@ export interface NotificationData {
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'FCM',
|
||||
plugin: 'cordova-plugin-fcm',
|
||||
plugin: 'cordova-plugin-fcm-with-dependecy-updated',
|
||||
pluginRef: 'FCMPlugin',
|
||||
repo: 'https://github.com/fechanique/cordova-plugin-fcm',
|
||||
repo: 'https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
|
||||
@@ -654,7 +654,7 @@ declare const window: Window;
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.file.checkDir(this.file.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err => console.log('Directory doesn't exist'));
|
||||
* this.file.checkDir(this.file.dataDirectory, 'mydir').then(_ => console.log('Directory exists')).catch(err => console.log('Directory doesn\'t exist'));
|
||||
*
|
||||
* ```
|
||||
*
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @name Firebase Config
|
||||
* @description
|
||||
* Cordova plugin for Firebase Config
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { FirebaseConfig } from '@ionic-native/firebase-config';
|
||||
*
|
||||
*
|
||||
* constructor(private firebaseConfig: FirebaseConfig) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.firebaseConfig.getBoolean('my_key')
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'FirebaseConfig',
|
||||
plugin: 'cordova-plugin-firebase-config',
|
||||
pluginRef: 'cordova.plugins.firebase.config',
|
||||
repo: 'https://github.com/chemerisuk/cordova-plugin-firebase-config',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class FirebaseConfig extends IonicNativePlugin {
|
||||
/**
|
||||
* Fetches remote config values with appropriate TTL and then activates them.
|
||||
*
|
||||
* @param {number} ttlSeconds
|
||||
* @returns {Promise<null>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
update(ttlSeconds: number): Promise<null> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches a boolean configuration value from RemoteConfig
|
||||
*
|
||||
* @param {string} key
|
||||
* @param {string} [namespace]
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
getBoolean(key: string, namespace?: string): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches a string configuration value from RemoteConfig
|
||||
*
|
||||
* @param {string} key
|
||||
* @param {string} [namespace]
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
getString(key: string, namespace?: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches a numeric configuration value from RemoteConfig
|
||||
*
|
||||
* @param {string} key
|
||||
* @param {string} [namespace]
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
getNumber(key: string, namespace?: string): Promise<number> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches an array of bytes configuration value from RemoteConfig
|
||||
*
|
||||
* @param {string} key
|
||||
* @param {string} [namespace]
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
getBytes(key: string, namespace?: string): Promise<any[]> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -23,10 +23,10 @@ export interface IDynamicLink {
|
||||
*
|
||||
*config.xml:
|
||||
* ```xml
|
||||
* <platform name="android">
|
||||
* <platform name="ios">
|
||||
* <preference name="GoogleIOSClientId" value="..." />
|
||||
* </platform>
|
||||
* <platform name="ios">
|
||||
* <platform name="android">
|
||||
* <preference name="GoogleAndroidClientId" value="..." />
|
||||
* </platform>
|
||||
* ```
|
||||
@@ -38,10 +38,9 @@ export interface IDynamicLink {
|
||||
* constructor(private firebaseDynamicLinks: FirebaseDynamicLinks) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* // Handle the logic here after opening the app with the Dynamic link
|
||||
* this.firebaseDynamicLinks.onDynamicLink()
|
||||
* .then((res: any) => console.log(res)) //Handle the logic here after opening the app with the Dynamic link
|
||||
* .catch((error:any) => console.log(error));
|
||||
* .subscribe((res: any) => console.log(res), (error:any) => console.log(error));
|
||||
* ```
|
||||
*
|
||||
* @interfaces
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export interface IFirebaseMessage {
|
||||
aps: any;
|
||||
gcm: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @name Firebase Messaging
|
||||
* @description
|
||||
* Cordova plugin for Firebase Messaging
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { FirebaseMessaging } from '@ionic-native/firebase-messaging';
|
||||
*
|
||||
*
|
||||
* constructor(private firebaseMessaging: FirebaseMessaging) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.firebaseMessaging.logEvent('page_view', {page: "dashboard"})
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
* @interfaces
|
||||
* IFirebaseMessage
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'FirebaseMessaging',
|
||||
plugin: 'cordova-plugin-firebase-messaging',
|
||||
pluginRef: 'cordova.plugins.firebase.messaging',
|
||||
repo: 'https://github.com/chemerisuk/cordova-plugin-firebase-messaging',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class FirebaseMessaging extends IonicNativePlugin {
|
||||
/**
|
||||
* Called when a push message received while app is in foreground.
|
||||
*
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
@Cordova({ observable: true, callbackOrder: 'reverse' })
|
||||
onMessage(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a push message received while app is in background.
|
||||
*
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
@Cordova({ observable: true, callbackOrder: 'reverse' })
|
||||
onBackgroundMessage(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Grant permission to recieve push notifications (will trigger prompt on iOS).
|
||||
*
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
requestPermission(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a promise that fulfills with the current FCM token
|
||||
*
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
getToken(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers every time when FCM token updated.
|
||||
* You should usually call getToken to get an updated token and send it to server.
|
||||
*
|
||||
* @returns {Observable<void>}
|
||||
*/
|
||||
@Cordova({ observable: true, callbackOrder: 'reverse' })
|
||||
onTokenRefresh(): Observable<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Subscribe to topic in background.
|
||||
*
|
||||
* @param {string} topic
|
||||
* @returns {Promise<null>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
subscribe(topic: string): Promise<null> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsubscribe from topic in background.
|
||||
*
|
||||
* @param {string} topic
|
||||
* @returns {Promise<null>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
unsubscribe(topic: string): Promise<null> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads current badge number (if supported).
|
||||
*
|
||||
* @returns {Promise<number>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
getBadge(): Promise<number> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets current badge number (if supported).
|
||||
*
|
||||
* @param {number} value
|
||||
* @returns {Promise<null>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setBadge(value: number): Promise<null> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -307,32 +307,20 @@ export class Firebase extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends an SMS to the user with the SMS verification code and returns the Verification ID required to sign in using phone authentication
|
||||
* @param {string} phoneNumber
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
platforms: ['iOS']
|
||||
})
|
||||
getVerificationID(phoneNumber: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends an SMS to the user with the SMS verification code and returns the Verification ID required to sign in using phone authentication
|
||||
* @param {string} phoneNumber The phone number, including '+' and country code
|
||||
* @param {number} timeoutDuration The timeout in sec - no more SMS will be sent to this number until this timeout expires
|
||||
* @param {number} timeoutDuration (Android only) The timeout in sec - no more SMS will be sent to this number until this timeout expires
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
platforms: ['Android'],
|
||||
platforms: ['Android', 'iOS'],
|
||||
successIndex: 2,
|
||||
errorIndex: 3
|
||||
})
|
||||
verifyPhoneNumber(
|
||||
phoneNumber: string,
|
||||
timeoutDuration: number
|
||||
timeoutDuration: number = 0
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
/**
|
||||
* @name FTP
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
/**
|
||||
* @name google-nearby
|
||||
* @name Google Nearby
|
||||
* @description
|
||||
* This plugin adds support for the Google Nearby Messages API.
|
||||
*
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name hce
|
||||
* @description
|
||||
* HCE Cordova Wrapper
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { hce } from '@ionic-native/hce';
|
||||
*
|
||||
*
|
||||
* constructor(private hce: hce) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* function onCommand(command){
|
||||
* var commandAsBytes = new Uint8Array(command);
|
||||
* var commandAsString = hce.util.byteArrayToHexString(commandAsBytes);
|
||||
*
|
||||
* // do something with the command
|
||||
*
|
||||
* // send the response
|
||||
* hce.sendReponse(commandResponse);
|
||||
* }
|
||||
* this.hce.registerCommandCallback().then(onCommand);
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'hce',
|
||||
plugin: 'cordova-plugin-hce',
|
||||
pluginRef: 'hce',
|
||||
repo: 'https://github.com/don/cordova-plugin-hce',
|
||||
install: '',
|
||||
installVariables: ['AID_FILTER'],
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable()
|
||||
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 {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
/**
|
||||
* Registers Deactivated receiver.
|
||||
* @param ok {HCEDeactivatedEvent} Success event handler.
|
||||
* @param fail {Function} Error event handler.
|
||||
*
|
||||
*/
|
||||
@Cordova()
|
||||
registerDeactivatedCallback(ok: HCEDeactivatedEvent, fail?: Function): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sends response APDU.
|
||||
* @param response {Uint8Array} Response
|
||||
* @param success {string} Success Callback.
|
||||
* @param success {string} Failure Callback.
|
||||
*
|
||||
*/
|
||||
@Cordova()
|
||||
sendResponse(response: Uint8Array, success?: Function, failure?: Function): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
}
|
||||
|
||||
export interface HCECommandEvent { (command: Uint8Array): void; }
|
||||
export interface HCEDeactivatedEvent { (command: number): void; }
|
||||
@@ -1,127 +1,81 @@
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface HealthKitOptions {
|
||||
/**
|
||||
* HKWorkoutActivityType constant
|
||||
* Read more here: https://developer.apple.com/library/ios/documentation/HealthKit/Reference/HKWorkout_Class/#//apple_ref/c/tdef/HKWorkoutActivityType
|
||||
*/
|
||||
* HKWorkoutActivityType constant
|
||||
* Read more here: https://developer.apple.com/library/ios/documentation/HealthKit/Reference/HKWorkout_Class/#//apple_ref/c/tdef/HKWorkoutActivityType
|
||||
*/
|
||||
activityType?: string;
|
||||
|
||||
/**
|
||||
* 'hour', 'week', 'year' or 'day', default 'day'
|
||||
*/
|
||||
* 'hour', 'week', 'year' or 'day', default 'day'
|
||||
*/
|
||||
aggregation?: string;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
amount?: number;
|
||||
|
||||
/**
|
||||
* specifies if the data returned by querySampleType() should be sorted by
|
||||
* end date in ascending order, default is false
|
||||
*/
|
||||
* specifies if the data returned by querySampleType() should be sorted by
|
||||
* end date in ascending order, default is false
|
||||
*/
|
||||
ascending?: boolean;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
correlationType?: string;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
date?: any;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
distance?: number;
|
||||
|
||||
/**
|
||||
* probably useful with the former param
|
||||
*/
|
||||
* probably useful with the former param
|
||||
*/
|
||||
distanceUnit?: string;
|
||||
|
||||
/**
|
||||
* in seconds, optional, use either this or endDate
|
||||
*/
|
||||
* in seconds, optional, use either this or endDate
|
||||
*/
|
||||
duration?: number;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
endDate?: any;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
energy?: number;
|
||||
|
||||
/**
|
||||
* J|cal|kcal
|
||||
*/
|
||||
* J|cal|kcal
|
||||
*/
|
||||
energyUnit?: string;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
extraData?: any;
|
||||
|
||||
/**
|
||||
* limits the maximum number of records returned by querySampleType()
|
||||
*/
|
||||
* limits the maximum number of records returned by querySampleType()
|
||||
*/
|
||||
limit?: number;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
metadata?: any;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
quantityType?: string;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
type?: string;
|
||||
|
||||
readTypes?: any;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
requestWritePermission?: boolean;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
samples?: any;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
sampleType?: string;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
startDate?: any;
|
||||
|
||||
/**
|
||||
* m|cm|mm|in|ft
|
||||
*/
|
||||
* m|cm|mm|in|ft
|
||||
*/
|
||||
unit?: string;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
requestReadPermission?: boolean;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
writeTypes?: any;
|
||||
}
|
||||
|
||||
@@ -153,168 +107,207 @@ export interface HealthKitOptions {
|
||||
})
|
||||
@Injectable()
|
||||
export class HealthKit extends IonicNativePlugin {
|
||||
/**
|
||||
* Check if HealthKit is supported (iOS8+, not on iPad)
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
available(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if HealthKit is supported (iOS8+, not on iPad)
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
* Pass in a type and get back on of undetermined | denied | authorized
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
available(): Promise<any> { return; }
|
||||
checkAuthStatus(options: HealthKitOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pass in a type and get back on of undetermined | denied | authorized
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
* Ask some or all permissions up front
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
checkAuthStatus(options: HealthKitOptions): Promise<any> { return; }
|
||||
requestAuthorization(options: HealthKitOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ask some or all permissions up front
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
* Formatted as yyyy-MM-dd
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
requestAuthorization(options: HealthKitOptions): Promise<any> { return; }
|
||||
readDateOfBirth(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Formatted as yyyy-MM-dd
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
* Output = male|female|other|unknown
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
readDateOfBirth(): Promise<any> { return; }
|
||||
readGender(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Output = male|female|other|unknown
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
* Output = A+|A-|B+|B-|AB+|AB-|O+|O-|unknown
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
readGender(): Promise<any> { return; }
|
||||
readBloodType(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Output = A+|A-|B+|B-|AB+|AB-|O+|O-|unknown
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
* Output = I|II|III|IV|V|VI|unknown
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
readBloodType(): Promise<any> { return; }
|
||||
readFitzpatrickSkinType(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Output = I|II|III|IV|V|VI|unknown
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
* Pass in unit (g=gram, kg=kilogram, oz=ounce, lb=pound, st=stone) and amount
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
readFitzpatrickSkinType(): Promise<any> { return; }
|
||||
saveWeight(options: HealthKitOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pass in unit (g=gram, kg=kilogram, oz=ounce, lb=pound, st=stone) and amount
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
* Pass in unit (g=gram, kg=kilogram, oz=ounce, lb=pound, st=stone)
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
saveWeight(options: HealthKitOptions): Promise<any> { return; }
|
||||
readWeight(options: HealthKitOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pass in unit (g=gram, kg=kilogram, oz=ounce, lb=pound, st=stone)
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
* Pass in unit (mm=millimeter, cm=centimeter, m=meter, in=inch, ft=foot) and amount
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
readWeight(options: HealthKitOptions): Promise<any> { return; }
|
||||
saveHeight(options: HealthKitOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pass in unit (mm=millimeter, cm=centimeter, m=meter, in=inch, ft=foot) and amount
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
* Pass in unit (mm=millimeter, cm=centimeter, m=meter, in=inch, ft=foot)
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
saveHeight(options: HealthKitOptions): Promise<any> { return; }
|
||||
readHeight(options: HealthKitOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pass in unit (mm=millimeter, cm=centimeter, m=meter, in=inch, ft=foot)
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
* no params yet, so this will return all workouts ever of any type
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
readHeight(options: HealthKitOptions): Promise<any> { return; }
|
||||
findWorkouts(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* no params yet, so this will return all workouts ever of any type
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
*
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
findWorkouts(): Promise<any> { return; }
|
||||
saveWorkout(options: HealthKitOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
*
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
saveWorkout(options: HealthKitOptions): Promise<any> { return; }
|
||||
querySampleType(options: HealthKitOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
*
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
querySampleType(options: HealthKitOptions): Promise<any> { return; }
|
||||
querySampleTypeAggregated(options: HealthKitOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
*
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
querySampleTypeAggregated(options: HealthKitOptions): Promise<any> { return; }
|
||||
deleteSamples(options: HealthKitOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
*
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
deleteSamples(options: HealthKitOptions): Promise<any> { return; }
|
||||
monitorSampleType(options: HealthKitOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
*
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
monitorSampleType(options: HealthKitOptions): Promise<any> { return; }
|
||||
sumQuantityType(options: HealthKitOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
*
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
sumQuantityType(options: HealthKitOptions): Promise<any> { return; }
|
||||
saveQuantitySample(options: HealthKitOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
*
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
saveQuantitySample(options: HealthKitOptions): Promise<any> { return; }
|
||||
saveCorrelation(options: HealthKitOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
*
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
saveCorrelation(options: HealthKitOptions): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param options {HealthKitOptions}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
queryCorrelationType(options: HealthKitOptions): Promise<any> { return; }
|
||||
|
||||
|
||||
queryCorrelationType(options: HealthKitOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,6 +76,12 @@ export interface HealthQueryOptionsAggregated {
|
||||
* supported values are: 'hour', 'day', 'week', 'month', 'year'.
|
||||
*/
|
||||
bucket: string;
|
||||
|
||||
/**
|
||||
* In Android, it is possible to query for "raw" steps or to select those as filtered by the Google Fit app.
|
||||
* In the latter case the query object must contain the field filtered: true.
|
||||
*/
|
||||
filtered?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -235,7 +241,7 @@ export class Health extends IonicNativePlugin {
|
||||
* been given at some point in the past.
|
||||
*
|
||||
* Quirks of requestAuthorization()
|
||||
|
||||
*
|
||||
* In Android, it will try to get authorization from the Google Fit APIs.
|
||||
* It is necessary that the app's package name and the signing key are registered in the Google API console.
|
||||
* In Android, be aware that if the activity is destroyed (e.g. after a rotation) or is put in background,
|
||||
@@ -292,11 +298,11 @@ export class Health extends IonicNativePlugin {
|
||||
* nutrition.vitamin_a is given in micrograms in HealthKit and International Unit in Google Fit.
|
||||
* Automatic conversion is not trivial and depends on the actual substance.
|
||||
*
|
||||
* @param queryOptions {HealthQueryOptions}
|
||||
* @return {Promise<HealthData>}
|
||||
* @param {HealthQueryOptions} queryOptions
|
||||
* @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.
|
||||
@@ -316,7 +322,7 @@ export class Health extends IonicNativePlugin {
|
||||
* To be sure to get all the stored quantities, it's better to query single nutrients.
|
||||
* nutrition.vitamin_a is given in micrograms in HealthKit and International Unit in Google Fit.
|
||||
*
|
||||
* @param queryOptionsAggregated {HealthQueryOptionsAggregated}
|
||||
* @param {HealthQueryOptionsAggregated} queryOptionsAggregated
|
||||
* @return {Promise<HealthData[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
|
||||
@@ -105,6 +105,10 @@ export interface HotspotDevice {
|
||||
* @beta
|
||||
* @name Hotspot
|
||||
* @description
|
||||
* A Cordova plugin for managing Hotspot networks on Android.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-hotspot`. For more info, please see the [Hotspot plugin docs](https://github.com/hypery2k/cordova-hotspot-plugin).
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Hotspot, HotspotNetwork } from '@ionic-native/hotspot';
|
||||
|
||||
@@ -74,7 +74,7 @@ export class HTTP extends IonicNativePlugin {
|
||||
* This returns an object representing a basic HTTP Authorization header of the form.
|
||||
* @param username {string} Username
|
||||
* @param password {string} Password
|
||||
* @returns {Object} an object representing a basic HTTP Authorization header of the form {'Authorization': 'Basic base64encodedusernameandpassword'}
|
||||
* @returns {Object} an object representing a basic HTTP Authorization header of the form {'Authorization': 'Basic base64EncodedUsernameAndPassword'}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
getBasicAuthHeader(
|
||||
@@ -154,7 +154,9 @@ export class HTTP extends IonicNativePlugin {
|
||||
* @param url {string}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
getCookieString(url: string): string { return; }
|
||||
getCookieString(url: string): string {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get global request timeout value in seconds.
|
||||
@@ -173,26 +175,15 @@ export class HTTP extends IonicNativePlugin {
|
||||
setRequestTimeout(timeout: number): void {}
|
||||
|
||||
/**
|
||||
* Enable or disable SSL Pinning. This defaults to false.
|
||||
*
|
||||
* To use SSL pinning you must include at least one .cer SSL certificate in your app project. You can pin to your server certificate or to one of the issuing CA certificates. For ios include your certificate in the root level of your bundle (just add the .cer file to your project/target at the root level). For android include your certificate in your project's platforms/android/assets folder. In both cases all .cer files found will be loaded automatically. If you only have a .pem certificate see this [stackoverflow answer](https://stackoverflow.com/questions/16583428/how-to-convert-an-ssl-certificate-in-linux/16583429#16583429). You want to convert it to a DER encoded certificate with a .cer extension.
|
||||
*
|
||||
* As an alternative, you can store your .cer files in the www/certificates folder.
|
||||
* @param enable {boolean} Set to true to enable
|
||||
* @returns {Promise<void>} returns a promise that will resolve on success, and reject on failure
|
||||
* Set SSL Cert handling mode, being one of the following values
|
||||
* default: default SSL cert handling using system's CA certs
|
||||
* nocheck: disable SSL cert checking, trusting all certs (meant to be used only for testing purposes)
|
||||
* pinned: trust only provided certs
|
||||
* @see https://github.com/silkimen/cordova-plugin-advanced-http#setsslcertmode
|
||||
* @param {'default' | 'nocheck' | 'pinned'} mode SSL Cert handling mode
|
||||
*/
|
||||
@Cordova()
|
||||
enableSSLPinning(enable: boolean): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accept all SSL certificates. Or disabled accepting all certificates. Defaults to false.
|
||||
* @param accept {boolean} Set to true to accept
|
||||
* @returns {Promise<void>} returns a promise that will resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
acceptAllCerts(accept: boolean): Promise<void> {
|
||||
setSSLCertMode(mode: 'default' | 'nocheck' | 'pinned'): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -202,7 +193,9 @@ export class HTTP extends IonicNativePlugin {
|
||||
* @returns {Promise<void>} returns a promise that will resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
disableRedirect(disable: boolean): Promise<void> { return; }
|
||||
disableRedirect(disable: boolean): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a POST request
|
||||
@@ -283,7 +276,7 @@ export class HTTP extends IonicNativePlugin {
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @param filePath {string} The local path of the file to upload
|
||||
* @param name {string} The name of the parameter to pass the file along as
|
||||
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
||||
* @returns {Promise<any>} returns a FileEntry promise that resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
uploadFile(
|
||||
@@ -292,7 +285,7 @@ export class HTTP extends IonicNativePlugin {
|
||||
headers: any,
|
||||
filePath: string,
|
||||
name: string
|
||||
): Promise<HTTPResponse> {
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -301,8 +294,8 @@ export class HTTP extends IonicNativePlugin {
|
||||
* @param url {string} The url to send the request to
|
||||
* @param body {Object} The body of the request
|
||||
* @param headers {Object} The headers to set for this request
|
||||
* @param filePath {string} The path to donwload the file to, including the file name.
|
||||
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
||||
* @param filePath {string} The path to download the file to, including the file name.
|
||||
* @returns {Promise<any>} returns a FileEntry promise that resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
downloadFile(
|
||||
@@ -310,7 +303,7 @@ export class HTTP extends IonicNativePlugin {
|
||||
body: any,
|
||||
headers: any,
|
||||
filePath: string
|
||||
): Promise<HTTPResponse> {
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,11 +23,19 @@ export interface ImagePickerOptions {
|
||||
quality?: number;
|
||||
|
||||
/**
|
||||
* Output type, defaults to 0 (FILE_URI).
|
||||
* Choose the format of the return value.
|
||||
* Defined in ImagePicker.OutputType. Default is FILE_URI.
|
||||
* FILE_URI : 0, Return image file URI,
|
||||
* DATA_URL : 1, Return image as base64-encoded string
|
||||
*/
|
||||
outputType?: number;
|
||||
}
|
||||
|
||||
export enum OutputType {
|
||||
FILE_URL = 0,
|
||||
DATA_URL
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Image Picker
|
||||
* @description
|
||||
|
||||
@@ -15,25 +15,42 @@ export interface InAppBrowserOptions {
|
||||
clearcache?: 'yes';
|
||||
/** Set to yes to have the session cookie cache cleared before the new window is opened. */
|
||||
clearsessioncache?: 'yes';
|
||||
/** (Android Only) set to yes to show Android browser's zoom controls, set to no to hide them. Default value is 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.
|
||||
* (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.
|
||||
* (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';
|
||||
/** 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.
|
||||
* (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.*/
|
||||
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.
|
||||
* (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.
|
||||
* (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) */
|
||||
shouldPauseOnSuspend?: 'yes' | 'no';
|
||||
/** (Android Only) Set to yes to show a close button in the footer similar to the iOS Done button. The close button will appear the same as for the header hence use closebuttoncaption and closebuttoncolor to set its properties */
|
||||
footer?: 'yes' | 'no';
|
||||
/** (Android Only) Set to a valid hex color string, for example #00ff00 or #CC00ff00 (#aarrggbb) , and it will change the footer color from default. Only has effect if user has footer set to yes */
|
||||
/** (Android Only) Set to a valid hex color string, for example #00ff00 or #CC00ff00 (#aarrggbb), and it will change the footer color from default. Only has effect if user has footer set to yes */
|
||||
footercolor?: string;
|
||||
/** (iOS Only) Set to a string to use as the Done button's caption. Note that you need to localize this value yourself. */
|
||||
closebuttoncaption?: string;
|
||||
/** (iOS Only) Set to yes or no (default is no). Turns on/off the UIWebViewBounce property. */
|
||||
disallowoverscroll?: 'yes' | 'no';
|
||||
/** (iOS Only) Set to yes or no to turn the toolbar on or off for the InAppBrowser (defaults to yes) */
|
||||
toolbar?: 'yes' | 'no';
|
||||
/** (iOS Only) Set to yes or no to make the toolbar translucent(semi-transparent) (defaults to yes). Only applicable if toolbar is not disabled. */
|
||||
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.
|
||||
@@ -54,7 +71,8 @@ export interface InAppBrowserOptions {
|
||||
/** (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). */
|
||||
useWideViewPort?: 'yes' | 'no';
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
|
||||
@@ -46,7 +46,7 @@ import { Injectable } from '@angular/core';
|
||||
* alert('Store Error ' + JSON.stringify(err));
|
||||
* });
|
||||
*
|
||||
* this.store.ready().then((status) => {
|
||||
* this.store.ready(() => {
|
||||
* console.log(JSON.stringify(this.store.get(productId)));
|
||||
* console.log('Store is Ready: ' + JSON.stringify(status));
|
||||
* console.log('Products: ' + JSON.stringify(this.store.products));
|
||||
@@ -416,12 +416,8 @@ export class InAppPurchase2 extends IonicNativePlugin {
|
||||
@Cordova({ sync: true })
|
||||
order(product: string | IAPProduct, additionalData?: any): { then: Function; error: Function; } { return; }
|
||||
|
||||
/**
|
||||
*
|
||||
* @return {Promise<any>} returns a promise that resolves when the store is ready
|
||||
*/
|
||||
@Cordova()
|
||||
ready(): Promise<void> { return; }
|
||||
ready(callback: Function): void { return; }
|
||||
|
||||
@Cordova({ sync: true })
|
||||
refresh(): void {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, CordovaFunctionOverride, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export interface IndexItem {
|
||||
domain: string;
|
||||
@@ -84,7 +85,7 @@ export class IndexAppContent extends IonicNativePlugin {
|
||||
/**
|
||||
* Add or change items to spotlight index
|
||||
* @param {Array<IndexItem>} Array of items to index
|
||||
* @return {Promise<any>} Returns if index set was successfull
|
||||
* @return {Promise<any>} Returns if index set was successful
|
||||
*/
|
||||
@Cordova()
|
||||
setItems(items: Array<IndexItem>): Promise<any> {
|
||||
@@ -94,7 +95,7 @@ export class IndexAppContent extends IonicNativePlugin {
|
||||
/**
|
||||
* Clear all items stored for a given array of domains
|
||||
* @param {Array<string>} Array of domains to clear
|
||||
* @return {Promise<any>} Resolve if successfull
|
||||
* @return {Promise<any>} Resolve if successful
|
||||
*/
|
||||
@Cordova()
|
||||
clearItemsForDomains(domains: Array<string>): Promise<any> {
|
||||
@@ -104,13 +105,23 @@ export class IndexAppContent extends IonicNativePlugin {
|
||||
/**
|
||||
* Clear all items stored for a given array of identifiers
|
||||
* @param {Array<string>} Array of identifiers to clear
|
||||
* @return {Promise<any>} Resolve if successfull
|
||||
* @return {Promise<any>} Resolve if successful
|
||||
*/
|
||||
@Cordova()
|
||||
clearItemsForIdentifiers(identifiers: Array<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
|
||||
*/
|
||||
@CordovaFunctionOverride()
|
||||
onItemPressed(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* You might want to avoid to update spotlight index too frequently.
|
||||
* Without calling this function a subsequent call to manipulate the index is only possible after 1440 minutes (= 24 hours)!
|
||||
|
||||
@@ -6,6 +6,10 @@ 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).
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Keyboard } from '@ionic-native/keyboard';
|
||||
|
||||
@@ -24,7 +24,7 @@ export type LinkedInLoginScopes = 'r_basicprofile' | 'r_emailaddress' | 'rw_comp
|
||||
* // login
|
||||
* const scopes = ['r_basicprofile', 'r_emailaddress', 'rw_company_admin', 'w_share'];
|
||||
* this.linkedin.login(scopes, true)
|
||||
* .then(() => console.log('Logged in!')
|
||||
* .then(() => console.log('Logged in!'))
|
||||
* .catch(e => console.log('Error logging in', e));
|
||||
*
|
||||
*
|
||||
|
||||
@@ -17,7 +17,6 @@ export enum ELocalNotificationTriggerUnit {
|
||||
}
|
||||
|
||||
export interface ILocalNotificationTrigger {
|
||||
|
||||
/** ***** FIX ***** */
|
||||
|
||||
/**
|
||||
@@ -125,7 +124,7 @@ export interface ILocalNotificationAction {
|
||||
/**
|
||||
* Specifies whether the action causes the app to launch in the foreground
|
||||
*/
|
||||
launch?: boolean;
|
||||
foreground?: boolean;
|
||||
|
||||
/**
|
||||
* If the value is 'decline' the action is displayed with special highlighting to indicate that it performs a destructive task
|
||||
@@ -192,7 +191,6 @@ export interface ILocalNotificationProgressBar {
|
||||
}
|
||||
|
||||
export interface ILocalNotification {
|
||||
|
||||
/**
|
||||
* A unique identifier required to clear, cancel, update or retrieve the local notification in the future
|
||||
* Default: 0
|
||||
@@ -267,7 +265,7 @@ export interface ILocalNotification {
|
||||
* the value of the key 1 will be used as the 'on' timing, the value of
|
||||
* the key 2 will be used as the 'off' timing
|
||||
*/
|
||||
led?: {color: string, on: number, off: number} | any[] | boolean | string;
|
||||
led?: { color: string; on: number; off: number } | any[] | boolean | string;
|
||||
|
||||
/**
|
||||
* Notification priority.
|
||||
@@ -396,7 +394,12 @@ export interface ILocalNotification {
|
||||
* ANDROID ONLY
|
||||
* Set the token for the media session
|
||||
*/
|
||||
mediaSession?: string;
|
||||
mediaSession?: string;
|
||||
|
||||
/**
|
||||
* Make this notification show when app in foreground.
|
||||
*/
|
||||
foreground?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -457,7 +460,6 @@ export interface ILocalNotification {
|
||||
})
|
||||
@Injectable()
|
||||
export class LocalNotifications extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Schedules a single or multiple notifications
|
||||
* @param options {Notification | Array<ILocalNotification>} optional
|
||||
@@ -465,7 +467,7 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
schedule(options?: ILocalNotification | Array<ILocalNotification>): void { }
|
||||
schedule(options?: ILocalNotification | Array<ILocalNotification>): void {}
|
||||
|
||||
/**
|
||||
* Updates a previously scheduled notification. Must include the id in the options parameter.
|
||||
@@ -474,7 +476,7 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
update(options?: ILocalNotification): void { }
|
||||
update(options?: ILocalNotification): void {}
|
||||
|
||||
/**
|
||||
* Clears single or multiple notifications
|
||||
@@ -482,14 +484,18 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
* @returns {Promise<any>} Returns a promise when the notification had been cleared
|
||||
*/
|
||||
@Cordova()
|
||||
clear(notificationId: any): Promise<any> { return; }
|
||||
clear(notificationId: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all notifications
|
||||
* @returns {Promise<any>} Returns a promise when all notifications have cleared
|
||||
*/
|
||||
@Cordova()
|
||||
clearAll(): Promise<any> { return; }
|
||||
clearAll(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels single or multiple notifications
|
||||
@@ -497,14 +503,18 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
* @returns {Promise<any>} Returns a promise when the notification is canceled
|
||||
*/
|
||||
@Cordova()
|
||||
cancel(notificationId: any): Promise<any> { return; }
|
||||
cancel(notificationId: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels all notifications
|
||||
* @returns {Promise<any>} Returns a promise when all notifications are canceled
|
||||
*/
|
||||
@Cordova()
|
||||
cancelAll(): Promise<any> { return; }
|
||||
cancelAll(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks presence of a notification
|
||||
@@ -512,7 +522,9 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
isPresent(notificationId: number): Promise<boolean> { return; }
|
||||
isPresent(notificationId: number): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks is a notification is scheduled
|
||||
@@ -520,7 +532,9 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
isScheduled(notificationId: number): Promise<boolean> { return; }
|
||||
isScheduled(notificationId: number): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a notification is triggered
|
||||
@@ -528,28 +542,36 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
isTriggered(notificationId: number): Promise<boolean> { return; }
|
||||
isTriggered(notificationId: number): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all the notification ids
|
||||
* @returns {Promise<Array<number>>}
|
||||
*/
|
||||
@Cordova()
|
||||
getIds(): Promise<Array<number>> { return; }
|
||||
getIds(): Promise<Array<number>> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the ids of triggered notifications
|
||||
* @returns {Promise<Array<number>>}
|
||||
*/
|
||||
@Cordova()
|
||||
getTriggeredIds(): Promise<Array<number>> { return; }
|
||||
getTriggeredIds(): Promise<Array<number>> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the ids of scheduled notifications
|
||||
* @returns {Promise<Array<number>>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
getScheduledIds(): Promise<Array<number>> { return; }
|
||||
getScheduledIds(): Promise<Array<number>> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a notification object
|
||||
@@ -557,7 +579,9 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
* @returns {Promise<ILocalNotification>}
|
||||
*/
|
||||
@Cordova()
|
||||
get(notificationId: any): Promise<ILocalNotification> { return; }
|
||||
get(notificationId: any): Promise<ILocalNotification> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a scheduled notification object
|
||||
@@ -565,7 +589,9 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
* @returns {Promise<ILocalNotification>}
|
||||
*/
|
||||
@Cordova()
|
||||
getScheduled(notificationId: any): Promise<ILocalNotification> { return; }
|
||||
getScheduled(notificationId: any): Promise<ILocalNotification> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a triggered notification object
|
||||
@@ -573,42 +599,54 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
* @returns {Promise<ILocalNotification>}
|
||||
*/
|
||||
@Cordova()
|
||||
getTriggered(notificationId: any): Promise<ILocalNotification> { return; }
|
||||
getTriggered(notificationId: any): Promise<ILocalNotification> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all notification objects
|
||||
* @returns {Promise<Array<ILocalNotification>>}
|
||||
*/
|
||||
@Cordova()
|
||||
getAll(): Promise<Array<ILocalNotification>> { return; }
|
||||
getAll(): Promise<Array<ILocalNotification>> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all scheduled notification objects
|
||||
* @returns {Promise<Array<ILocalNotification>>}
|
||||
*/
|
||||
@Cordova()
|
||||
getAllScheduled(): Promise<Array<ILocalNotification>> { return; }
|
||||
getAllScheduled(): Promise<Array<ILocalNotification>> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all triggered notification objects
|
||||
* @returns {Promise<Array<ILocalNotification>>}
|
||||
*/
|
||||
@Cordova()
|
||||
getAllTriggered(): Promise<Array<ILocalNotification>> { return; }
|
||||
getAllTriggered(): Promise<Array<ILocalNotification>> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request permission to show notifications if not already granted.
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
requestPermission(): Promise<boolean> { return; }
|
||||
requestPermission(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Informs if the app has the permission to show notifications.
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
hasPermission(): Promise<boolean> { return; }
|
||||
hasPermission(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a group of actions
|
||||
@@ -617,7 +655,12 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
addActions(groupId: any, actions: Array<ILocalNotificationAction>): Promise<any> { return; }
|
||||
addActions(
|
||||
groupId: any,
|
||||
actions: Array<ILocalNotificationAction>
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a group of actions
|
||||
@@ -625,7 +668,9 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
removeActions(groupId: any): Promise<any> { return; }
|
||||
removeActions(groupId: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a group of actions is defined
|
||||
@@ -633,7 +678,9 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
* @returns {Promise<boolean>} Whether the group is defined
|
||||
*/
|
||||
@Cordova()
|
||||
hasActions(groupId: any): Promise<boolean> { return; }
|
||||
hasActions(groupId: any): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the (platform specific) default settings.
|
||||
@@ -642,7 +689,9 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
getDefaults(): Promise<any> { return; }
|
||||
getDefaults(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overwrites the (platform specific) default settings.
|
||||
@@ -651,7 +700,9 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
setDefaults(defaults: any): Promise<any> { return; }
|
||||
setDefaults(defaults: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a callback for a specific event
|
||||
@@ -663,7 +714,9 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
clearFunction: 'un',
|
||||
clearWithArgs: true
|
||||
})
|
||||
on(eventName: string): Observable<any> { return; }
|
||||
on(eventName: string): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Not an official interface, however its possible to manually fire events.
|
||||
@@ -673,12 +726,14 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
fireEvent(eventName: string, args: any): void { }
|
||||
fireEvent(eventName: string, args: any): void {}
|
||||
|
||||
/**
|
||||
* Fire queued events once the device is ready and all listeners are registered.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
fireQueuedEvents(): Promise<any> { return; }
|
||||
fireQueuedEvents(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,6 +115,10 @@ export interface ConfigurationData {
|
||||
/**
|
||||
* @name Media Capture
|
||||
* @description
|
||||
* This plugin provides access to the device's audio, image, and video capture capabilities.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-media-capture`. For more info, please see the [Media Capture plugin docs](https://github.com/apache/cordova-plugin-media-capture).
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { MediaCapture, MediaFile, CaptureError, CaptureImageOptions } from '@ionic-native/media-capture';
|
||||
|
||||
@@ -8,23 +8,29 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { NativeGeocoder, NativeGeocoderReverseResult, NativeGeocoderForwardResult } from '@ionic-native/native-geocoder';
|
||||
* import { NativeGeocoder, NativeGeocoderReverseResult, NativeGeocoderForwardResult, NativeGeocoderOptions } from '@ionic-native/native-geocoder';
|
||||
*
|
||||
* constructor(private nativeGeocoder: NativeGeocoder) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.nativeGeocoder.reverseGeocode(52.5072095, 13.1452818)
|
||||
* .then((result: NativeGeocoderReverseResult) => console.log(JSON.stringify(result)))
|
||||
* let options: NativeGeocoderOptions = {
|
||||
* useLocale: true,
|
||||
* maxResults: 5
|
||||
* };
|
||||
*
|
||||
* this.nativeGeocoder.reverseGeocode(52.5072095, 13.1452818, options)
|
||||
* .then((result: NativeGeocoderReverseResult[]) => console.log(JSON.stringify(result[0])))
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* this.nativeGeocoder.forwardGeocode('Berlin')
|
||||
* .then((coordinates: NativeGeocoderForwardResult) => console.log('The coordinates are latitude=' + coordinates.latitude + ' and longitude=' + coordinates.longitude))
|
||||
* this.nativeGeocoder.forwardGeocode('Berlin', options)
|
||||
* .then((coordinates: NativeGeocoderForwardResult[]) => console.log('The coordinates are latitude=' + coordinates[0].latitude + ' and longitude=' + coordinates[0].longitude))
|
||||
* .catch((error: any) => console.log(error));
|
||||
* ```
|
||||
* @interfaces
|
||||
* NativeGeocoderReverseResult
|
||||
* NativeGeocoderForwardResult
|
||||
* NativeGeocoderOptions
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'NativeGeocoder',
|
||||
@@ -40,22 +46,24 @@ export class NativeGeocoder extends IonicNativePlugin {
|
||||
* Reverse geocode a given latitude and longitude to find location address
|
||||
* @param latitude {number} The latitude
|
||||
* @param longitude {number} The longitude
|
||||
* @return {Promise<NativeGeocoderReverseResult>}
|
||||
* @param options {NativeGeocoderOptions} The options
|
||||
* @return {Promise<NativeGeocoderReverseResult[]>}
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
reverseGeocode(latitude: number, longitude: number): Promise<NativeGeocoderReverseResult> { return; }
|
||||
reverseGeocode(latitude: number, longitude: number, options?: NativeGeocoderOptions): Promise<NativeGeocoderReverseResult[]> { return; }
|
||||
|
||||
/**
|
||||
* Forward geocode a given address to find coordinates
|
||||
* @param addressString {string} The address to be geocoded
|
||||
* @return {Promise<NativeGeocoderForwardResult>}
|
||||
* @param options {NativeGeocoderOptions} The options
|
||||
* @return {Promise<NativeGeocoderForwardResult[]>}
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
forwardGeocode(addressString: string): Promise<NativeGeocoderForwardResult> { return; }
|
||||
forwardGeocode(addressString: string, options?: NativeGeocoderOptions): Promise<NativeGeocoderForwardResult[]> { return; }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -116,3 +124,25 @@ export interface NativeGeocoderForwardResult {
|
||||
*/
|
||||
longitude: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Options for reverse and forward geocoding.
|
||||
*/
|
||||
export interface NativeGeocoderOptions {
|
||||
/**
|
||||
* The locale to use when returning the address information.
|
||||
* If set to 'false' the locale will always be 'en_US'.
|
||||
* Default is 'true'
|
||||
*/
|
||||
useLocale: boolean;
|
||||
/**
|
||||
* The default locale to use when returning the address information.
|
||||
* e.g.: 'fa-IR' or 'de_DE'.
|
||||
*/
|
||||
defaultLocale?: string;
|
||||
/**
|
||||
* The maximum number of result to return (max is 5).
|
||||
* Default is 1
|
||||
*/
|
||||
maxResults: number;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
* @beta
|
||||
* @name Navigation Bar
|
||||
* @description
|
||||
* The NavigationBar plugin can you to hide and auto hide the android navigation bar.
|
||||
* The NavigationBar plugin allows you to hide and auto hide the android navigation bar.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
|
||||
@@ -10,15 +10,21 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
* ```typescript
|
||||
* import { NetworkInterface } from '@ionic-native/network-interface';
|
||||
*
|
||||
* constructor( private networkInterface: NetworkInterface ) {
|
||||
*
|
||||
* constructor(private networkInterface: NetworkInterface) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.networkInterface.getWiFiIPAddress(function (ip) { alert(ip); });
|
||||
* this.networkInterface.getCarrierIPAddress(function (ip) { alert(ip); });
|
||||
* this.networkInterface.getWiFiIPAddress()
|
||||
* .then(address => console.info(`IP: ${address.ip}, Subnet: ${address.subnet}`))
|
||||
* .catch(error => console.error(`Unable to get IP: ${error}`));
|
||||
*
|
||||
* this.networkInterface.getCarrierIPAddress()
|
||||
* .then(address => console.info(`IP: ${address.ip}, Subnet: ${address.subnet}`))
|
||||
* .catch(error => console.error(`Unable to get IP: ${error}`));
|
||||
*
|
||||
* const url = 'www.github.com';
|
||||
* this.networkInterface.getHttpProxyInformation(url)
|
||||
* .then(proxy => console.info(`Type: ${proxy.type}, Host: ${proxy.host}, Port: ${proxy.port}`))
|
||||
* .catch(error => console.error(`Unable to get proxy info: ${error}`));
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
@@ -31,28 +37,32 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
@Injectable()
|
||||
export class NetworkInterface extends IonicNativePlugin {
|
||||
|
||||
@Cordova()
|
||||
getIPAddress(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the WiFi IP address
|
||||
* @param success {Function} Callback used when successful
|
||||
* @param error {Function} Callback used when failure
|
||||
* @return {Promise<any>} Returns a Promise that resolves with the IP address information.
|
||||
*/
|
||||
@Cordova()
|
||||
getWiFiIPAddress(): Promise<string> {
|
||||
getWiFiIPAddress(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the wireless carrier IP address
|
||||
* @param success {Function} Callback used when successful
|
||||
* @param error {Function} Callback used when failure
|
||||
* @return {Promise<any>} Returns a Promise that resolves with the IP address information.
|
||||
*/
|
||||
@Cordova()
|
||||
getCarrierIPAddress(): Promise<string> {
|
||||
getCarrierIPAddress(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the relevant proxies for the passed URL in order of application
|
||||
* @param {url} message The message to display.
|
||||
* @return {Promise<any>} Returns a Promise that resolves with the proxy information.
|
||||
*/
|
||||
@Cordova()
|
||||
getHttpProxyInformation(url: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, CordovaProperty, Plugin, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
|
||||
import {
|
||||
Cordova,
|
||||
CordovaProperty,
|
||||
Plugin,
|
||||
CordovaCheck,
|
||||
IonicNativePlugin
|
||||
} from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import 'rxjs/add/observable/merge';
|
||||
|
||||
import { merge } from 'rxjs/observable/merge';
|
||||
|
||||
declare const navigator: any;
|
||||
|
||||
@@ -57,20 +62,17 @@ declare const navigator: any;
|
||||
})
|
||||
@Injectable()
|
||||
export class Network extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Connection type
|
||||
* @return {string}
|
||||
*/
|
||||
@CordovaProperty
|
||||
type: string;
|
||||
@CordovaProperty type: string;
|
||||
|
||||
/**
|
||||
* Downlink Max Speed
|
||||
* @return {string}
|
||||
*/
|
||||
@CordovaProperty
|
||||
downlinkMax: string;
|
||||
@CordovaProperty downlinkMax: string;
|
||||
|
||||
/**
|
||||
* Returns an observable to watch connection changes
|
||||
@@ -78,7 +80,7 @@ export class Network extends IonicNativePlugin {
|
||||
*/
|
||||
@CordovaCheck()
|
||||
onchange(): Observable<any> {
|
||||
return Observable.merge(this.onConnect(), this.onDisconnect());
|
||||
return merge(this.onConnect(), this.onDisconnect());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -87,9 +89,12 @@ export class Network extends IonicNativePlugin {
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'offline'
|
||||
event: 'offline',
|
||||
element: document
|
||||
})
|
||||
onDisconnect(): Observable<any> { return; }
|
||||
onDisconnect(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get notified when the device goes online
|
||||
@@ -97,8 +102,10 @@ export class Network extends IonicNativePlugin {
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'online'
|
||||
event: 'online',
|
||||
element: document
|
||||
})
|
||||
onConnect(): Observable<any> { return; }
|
||||
|
||||
onConnect(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,13 +291,13 @@ export class Ndef extends IonicNativePlugin {
|
||||
record(tnf: number, type: number[] | string, id: number[] | string, payload: number[] | string): NdefRecord { return; }
|
||||
|
||||
@Cordova({ sync: true })
|
||||
textRecord(text: string, languageCode: string, id: number[] | string): NdefRecord { return; }
|
||||
textRecord(text: string, languageCode?: string, id?: number[] | string): NdefRecord { return; }
|
||||
|
||||
@Cordova({ sync: true })
|
||||
uriRecord(uri: string, id: number[] | string): NdefRecord { return; }
|
||||
uriRecord(uri: string, id?: number[] | string): NdefRecord { return; }
|
||||
|
||||
@Cordova({ sync: true })
|
||||
absoluteUriRecord(uri: string, payload: number[] | string, id: number[] | string): NdefRecord { return; }
|
||||
absoluteUriRecord(uri: string, payload: number[] | string, id?: number[] | string): NdefRecord { return; }
|
||||
|
||||
@Cordova({ sync: true })
|
||||
mimeMediaRecord(mimeType: string, payload: string): NdefRecord { return; }
|
||||
|
||||
@@ -6,11 +6,11 @@ export interface OSNotification {
|
||||
/**
|
||||
* Was app in focus.
|
||||
*/
|
||||
isAppInFocus: boolean;
|
||||
isAppInFocus?: boolean;
|
||||
/**
|
||||
* Was notification shown to the user. Will be false for silent notifications.
|
||||
*/
|
||||
shown: boolean;
|
||||
shown?: boolean;
|
||||
/**
|
||||
* **ANDROID** - Android Notification assigned to the notification. Can be used to cancel or replace the notification.
|
||||
*/
|
||||
@@ -18,17 +18,17 @@ export interface OSNotification {
|
||||
/**
|
||||
* Payload received from OneSignal.
|
||||
*/
|
||||
payload: OSNotificationPayload;
|
||||
payload?: OSNotificationPayload;
|
||||
/**
|
||||
* How the notification was displayed to the user. Can be set to `Notification`, `InAppAlert`, or `None` if it was not displayed.
|
||||
*/
|
||||
displayType: OSDisplayType;
|
||||
displayType?: OSDisplayType;
|
||||
/**
|
||||
* **ANDROID** - Notification is a summary notification for a group this will contain all notification payloads it was created from.
|
||||
*/
|
||||
groupedNotifications?: OSNotificationPayload[];
|
||||
app_id?: string;
|
||||
contents: any;
|
||||
contents?: any;
|
||||
headings?: any;
|
||||
isIos?: boolean;
|
||||
isAndroid?: boolean;
|
||||
@@ -60,6 +60,7 @@ export interface OSNotification {
|
||||
wp_wns_sound?: string;
|
||||
data?: any;
|
||||
buttons?: any;
|
||||
collapse_id?: string;
|
||||
small_icon?: string;
|
||||
large_icon?: string;
|
||||
big_picture?: string;
|
||||
@@ -228,9 +229,13 @@ export interface OSPermissionState {
|
||||
*/
|
||||
hasPrompted: boolean;
|
||||
/**
|
||||
* Permissions Status
|
||||
* Permissions Status (iOS Only)
|
||||
*/
|
||||
status: any;
|
||||
/**
|
||||
* Permissions State (Android Only)
|
||||
*/
|
||||
state: any;
|
||||
}
|
||||
/**
|
||||
* OSSubscriptionState
|
||||
@@ -695,7 +700,7 @@ export class OneSignal extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all OneSignla notifications
|
||||
* Clears all OneSignal notifications
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
clearOneSignalNotifications(): void {}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Plugin, IonicNativePlugin, Cordova } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Open Native Settings
|
||||
* @description
|
||||
* Plugin to open native screens of iOS/android settings
|
||||
* @usage
|
||||
* Plugin to open native screens of iOS/android settings
|
||||
* @usage
|
||||
* You can open any of these settings:
|
||||
* ```
|
||||
* "about", // ios
|
||||
@@ -78,7 +78,7 @@ import { Injectable } from '@angular/core';
|
||||
"wifi_ip", // android
|
||||
"wifi", // ios, android
|
||||
"wireless" // android
|
||||
```
|
||||
```
|
||||
* ```typescript
|
||||
* import { OpenNativeSettings } from '@ionic-native/open-native-settings';
|
||||
*
|
||||
@@ -99,13 +99,13 @@ import { Injectable } from '@angular/core';
|
||||
})
|
||||
@Injectable()
|
||||
export class OpenNativeSettings extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Opens a setting dialog
|
||||
* @param setting {string} setting name
|
||||
* @param setting {string|array} setting name
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
open(setting: string): Promise<any> { return; }
|
||||
|
||||
open(setting: string | [string, boolean]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,6 +252,8 @@ export interface GetLibraryOptions {
|
||||
chunkTimeSec?: number;
|
||||
useOriginalFileNames?: boolean;
|
||||
includeAlbumData?: boolean;
|
||||
includeVideos?: boolean;
|
||||
maxItems?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,9 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
/**
|
||||
* @name Pin Dialog
|
||||
* @description
|
||||
* PhoneGap numeric password dialog plugin for Android and iOS.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-pin-dialog`. For more info, please see the [Pin Dialog plugin docs](https://github.com/Paldom/PinDialog).
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
|
||||
@@ -31,6 +31,8 @@ export interface DeployConfig {
|
||||
channel?: string;
|
||||
}
|
||||
|
||||
export type ProgressMessage = number | string;
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
@@ -43,7 +45,7 @@ export class ProDeploy {
|
||||
* @param config A valid Deploy config object
|
||||
*/
|
||||
@CordovaInstance()
|
||||
init(config: DeployConfig): Promise<any> { return; }
|
||||
init(config: DeployConfig): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Check a channel for an available update
|
||||
@@ -54,27 +56,27 @@ export class ProDeploy {
|
||||
|
||||
/**
|
||||
* Download an available version
|
||||
* @return {Observable<any>} Updates with percent completion, or errors with a message.
|
||||
* @return {Observable<ProgressMessage>} Updates with percent completion, or errors with a message.
|
||||
*/
|
||||
@CordovaInstance({
|
||||
observable: true
|
||||
})
|
||||
download(): Observable<any> { return; }
|
||||
download(): Observable<ProgressMessage> { return; }
|
||||
|
||||
/**
|
||||
* Unzip the latest downloaded version
|
||||
* @return {Observable<any>} Updates with percent completion, or errors with a message.
|
||||
* @return {Observable<ProgressMessage>} Updates with percent completion, or errors with a message.
|
||||
*/
|
||||
@CordovaInstance({
|
||||
observable: true
|
||||
})
|
||||
extract(): Observable<any> { return; }
|
||||
extract(): Observable<ProgressMessage> { return; }
|
||||
|
||||
/**
|
||||
* Reload app with the deployed version
|
||||
*/
|
||||
@CordovaInstance()
|
||||
redirect(): Promise<any> { return; }
|
||||
redirect(): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Get info about the version running on the device
|
||||
@@ -87,14 +89,14 @@ export class ProDeploy {
|
||||
* List versions stored on the device
|
||||
*/
|
||||
@CordovaInstance()
|
||||
getVersions(): Promise<any> { return; }
|
||||
getVersions(): Promise<string[]> { return; }
|
||||
|
||||
/**
|
||||
* Delete a version stored on the device by UUID
|
||||
* @param version A version UUID
|
||||
*/
|
||||
@CordovaInstance()
|
||||
deleteVersion(version: string): Promise<any> { return; }
|
||||
deleteVersion(version: string): Promise<void> { return; }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, CordovaInstance, checkAvailability, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { checkAvailability, Cordova, CordovaInstance, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
declare const window: any;
|
||||
|
||||
export type EventResponse = RegistrationEventResponse & NotificationEventResponse & Error;
|
||||
export type EventResponse = RegistrationEventResponse &
|
||||
NotificationEventResponse &
|
||||
Error;
|
||||
|
||||
export interface RegistrationEventResponse {
|
||||
/**
|
||||
@@ -13,7 +15,6 @@ export interface RegistrationEventResponse {
|
||||
registrationId: string;
|
||||
}
|
||||
|
||||
|
||||
export interface NotificationEventResponse {
|
||||
/**
|
||||
* The text of the push message sent from the 3rd party service.
|
||||
@@ -111,6 +112,13 @@ export interface IOSPushOptions {
|
||||
* Action Buttons on iOS - https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PAYLOAD.md#action-buttons-1
|
||||
*/
|
||||
categories?: CategoryArray;
|
||||
|
||||
/**
|
||||
* If true the device will be set up to receive VoIP Push notifications and the
|
||||
* other options will be ignored since VoIP notifications are silent
|
||||
* notifications that should be handled in the "notification" event.
|
||||
*/
|
||||
voip?: boolean | string;
|
||||
}
|
||||
|
||||
export interface CategoryArray {
|
||||
@@ -203,7 +211,6 @@ export interface BrowserPushOptions {
|
||||
* Default: http://push.api.phonegap.com/v1/push Optional.
|
||||
*/
|
||||
pushServiceURL?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface PushOptions {
|
||||
@@ -314,7 +321,6 @@ export type PushEvent = string;
|
||||
})
|
||||
@Injectable()
|
||||
export class Push extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Init push notifications
|
||||
* @param options {PushOptions}
|
||||
@@ -329,7 +335,9 @@ export class Push extends IonicNativePlugin {
|
||||
* @return {Promise<{isEnabled: boolean}>} Returns a Promise that resolves with an object with one property: isEnabled, a boolean that indicates if permission has been granted.
|
||||
*/
|
||||
@Cordova()
|
||||
hasPermission(): Promise<{ isEnabled: boolean }> { return; }
|
||||
hasPermission(): Promise<{ isEnabled: boolean }> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new notification channel for Android O and above.
|
||||
@@ -338,7 +346,9 @@ export class Push extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
createChannel(channel?: Channel): Promise<any> { return; }
|
||||
createChannel(channel?: Channel): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a notification channel for Android O and above.
|
||||
@@ -347,15 +357,18 @@ export class Push extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
deleteChannel(id?: string): Promise<any> { return; }
|
||||
deleteChannel(id?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of currently configured channels.
|
||||
* @return {Promise<Channel[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
listChannels(): Promise<Channel[]> { return; }
|
||||
|
||||
listChannels(): Promise<Channel[]> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -367,11 +380,12 @@ export class Push extends IonicNativePlugin {
|
||||
pluginRef: 'PushNotification'
|
||||
})
|
||||
export class PushObject {
|
||||
|
||||
private _objectInstance: any;
|
||||
|
||||
constructor(options: PushOptions) {
|
||||
if (checkAvailability('PushNotification', 'init', 'PushNotification') === true) {
|
||||
if (
|
||||
checkAvailability('PushNotification', 'init', 'PushNotification') === true
|
||||
) {
|
||||
this._objectInstance = window.PushNotification.init(options);
|
||||
}
|
||||
}
|
||||
@@ -386,7 +400,9 @@ export class PushObject {
|
||||
clearFunction: 'off',
|
||||
clearWithArgs: true
|
||||
})
|
||||
on(event: PushEvent): Observable<EventResponse> { return; }
|
||||
on(event: PushEvent): Observable<EventResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* The unregister method is used when the application no longer wants to receive push notifications.
|
||||
@@ -394,7 +410,9 @@ export class PushObject {
|
||||
* so you will need to re-register them if you want them to function again without an application reload.
|
||||
*/
|
||||
@CordovaInstance()
|
||||
unregister(): Promise<any> { return; }
|
||||
unregister(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the badge count visible when the app is not running
|
||||
@@ -407,13 +425,17 @@ export class PushObject {
|
||||
@CordovaInstance({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
setApplicationIconBadgeNumber(count?: number): Promise<any> { return; };
|
||||
setApplicationIconBadgeNumber(count?: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Get the current badge count visible when the app is not running
|
||||
* successHandler gets called with an integer which is the current badge count
|
||||
*/
|
||||
@CordovaInstance()
|
||||
getApplicationIconBadgeNumber(): Promise<number> { return; }
|
||||
getApplicationIconBadgeNumber(): Promise<number> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* iOS only
|
||||
@@ -424,13 +446,17 @@ export class PushObject {
|
||||
@CordovaInstance({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
finish(id?: string): Promise<any> { return; }
|
||||
finish(id?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tells the OS to clear all notifications from the Notification Center
|
||||
*/
|
||||
@CordovaInstance()
|
||||
clearAllNotifications(): Promise<any> { return; }
|
||||
clearAllNotifications(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* The subscribe method is used when the application wants to subscribe a new topic to receive push notifications.
|
||||
@@ -438,7 +464,9 @@ export class PushObject {
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@CordovaInstance()
|
||||
subscribe(topic: string): Promise<any> { return; }
|
||||
subscribe(topic: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* The unsubscribe method is used when the application no longer wants to receive push notifications from a specific topic but continue to receive other push messages.
|
||||
@@ -446,6 +474,7 @@ export class PushObject {
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@CordovaInstance()
|
||||
unsubscribe(topic: string): Promise<any> { return; }
|
||||
|
||||
unsubscribe(topic: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,6 +61,9 @@ export interface QRScannerStatus {
|
||||
/**
|
||||
* @name QR Scanner
|
||||
* @description
|
||||
* A fast, energy efficient, highly-configurable QR code scanner for Cordova apps.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-qrscanner`. For more info, please see the [QR Scanner plugin docs](https://github.com/bitpay/cordova-plugin-qrscanner).
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
|
||||
@@ -18,6 +18,10 @@ export interface SafariViewControllerOptions {
|
||||
/**
|
||||
* @name Safari View Controller
|
||||
* @description
|
||||
* For displaying read-only web content.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-safariviewcontroller`. For more info, please see the [Safari View Controller plugin docs](https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller).
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { SafariViewController } from '@ionic-native/safari-view-controller';
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export const enum TYPE_SENSOR {
|
||||
PROXIMITY = 'PROXIMITY',
|
||||
ACCELEROMETER = 'ACCELEROMETER',
|
||||
GRAVITY = 'GRAVITY',
|
||||
GYROSCOPE = 'GYROSCOPE',
|
||||
GYROSCOPE_UNCALIBRATED = 'GYROSCOPE_UNCALIBRATED',
|
||||
LINEAR_ACCELERATION = 'LINEAR_ACCELERATION',
|
||||
ROTATION_VECTOR = 'ROTATION_VECTOR',
|
||||
STEP_COUNTER = 'STEP_COUNTER',
|
||||
GAME_ROTATION_VECTOR = 'GAME_ROTATION_VECTOR',
|
||||
GEOMAGNETIC_ROTATION_VECTOR = 'GEOMAGNETIC_ROTATION_VECTOR',
|
||||
MAGNETIC_FIELD = 'MAGNETIC_FIELD',
|
||||
MAGNETIC_FIELD_UNCALIBRATED = 'MAGNETIC_FIELD_UNCALIBRATED',
|
||||
ORIENTATION = 'ORIENTATION',
|
||||
AMBIENT_TEMPERATURE = 'AMBIENT_TEMPERATURE',
|
||||
LIGHT = 'LIGHT',
|
||||
PRESSURE = 'PRESSURE',
|
||||
RELATIVE_HUMIDITY = 'RELATIVE_HUMIDITY',
|
||||
TEMPERATURE = 'TEMPERATURE',
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Sensors
|
||||
* @description
|
||||
* This plugin enables sensors on Android devices
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Sensors, TYPE_SENSOR } from '@ionic-native/sensors';
|
||||
*
|
||||
*
|
||||
* constructor(private sensors: Sensors) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.sensors.enableSensor(TYPE_SENSOR.LIGHT);
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Sensors',
|
||||
plugin: 'https://github.com/fabiorogeriosj/cordova-plugin-sensors.git',
|
||||
pluginRef: 'sensors',
|
||||
repo: 'https://github.com/fabiorogeriosj/cordova-plugin-sensors.git',
|
||||
platforms: ['Android'],
|
||||
})
|
||||
@Injectable()
|
||||
export class Sensors extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* This function enables the sensor
|
||||
* @param {string} TYPE_SENSOR Specify the sensor to enable
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
enableSensor(TYPE_SENSOR: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function disables the sensor
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
disableSensor(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function calls the success callback
|
||||
* @return {Promise<any>} Returns sensor state
|
||||
*/
|
||||
@Cordova()
|
||||
getState(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface SiriShortcut {
|
||||
persistentIdentifier: string;
|
||||
title: string;
|
||||
userInfo: { [key: string]: string; };
|
||||
suggestedInvocationPhrase: string;
|
||||
}
|
||||
|
||||
export interface SiriShortcutOptions extends SiriShortcut {
|
||||
isEligibleForSearch?: boolean;
|
||||
isEligibleForPrediction?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @name Siri Shortcuts
|
||||
* @description
|
||||
* This plugin only works when your app is built with XCode 10 Beta. Shortcuts will only appear on iOS-versions >= 12.0
|
||||
*
|
||||
* This plugin enables the use of Siri shortcuts in Cordova. Siri Shortcuts enable the user to perform certain actions by adding them to Siri.
|
||||
* After you have donated a shortcut to Siri, it will appear in the settings menu, after which the user is able to add the action. You can check
|
||||
* whether the user launched your app through a shortcut by calling `getActivatedShortcut()` when the app is resumed. It will return `null`
|
||||
* if it has not been launched by Siri, and if it did, it will return an object with `SiriShortcut` properties.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { SiriShortcuts } from '@ionic-native/siri-shortcuts';
|
||||
*
|
||||
*
|
||||
* constructor(private siriShortcuts: SiriShortcuts) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.siriShortcuts.donate({
|
||||
* persistentIdentifier: 'open-my-app',
|
||||
* title: 'Open my app',
|
||||
* suggestedInvocationPhrase: 'Open my app',
|
||||
* userInfo: { username: 'username' },
|
||||
* isEligibleForSearch: true,
|
||||
* isEligibleForPrediction: true,
|
||||
* })
|
||||
* .then(() => console.log('Shortcut donated.'))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* this.siriShortcuts.present({
|
||||
* persistentIdentifier: 'open-my-app',
|
||||
* title: 'Open my app',
|
||||
* suggestedInvocationPhrase: 'Open my app',
|
||||
* userInfo: { username: 'username' },
|
||||
* })
|
||||
* .then(() => console.log('Shortcut added.'))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* this.siriShortcuts.remove('open-my-app')
|
||||
* .then(() => console.log('Shortcut removed.'))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* this.siriShortcuts.removeAll()
|
||||
* .then(() => console.log('All shortcuts removed removed.'))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* this.siriShortcuts.getActivatedShortcut()
|
||||
* .then((data: SiriShortcut|null) => console.log(data))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*
|
||||
* @interfaces
|
||||
* SiriShortcut
|
||||
* SiriShortcutOptions
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'SiriShortcuts',
|
||||
plugin: 'cordova-plugin-siri-shortcuts',
|
||||
pluginRef: 'cordova.plugins.SiriShortcuts',
|
||||
repo: 'https://github.com/bartwesselink/cordova-plugin-siri-shortcuts',
|
||||
platforms: ['iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class SiriShortcuts extends IonicNativePlugin {
|
||||
/**
|
||||
* Donate shortcut to Siri
|
||||
* @param {SiriShortcutOptions} options Options to specify for the donation
|
||||
* @param {string} options.persistentIdentifier Specify an identifier to uniquely identify the shortcut, in order to be able to remove it
|
||||
* @param {string} options.title Specify a title for the shortcut, which is visible to the user as the name of the shortcut
|
||||
* @param {string} options.suggestedInvocationPhrase Specify the phrase to give the user some inspiration on what the shortcut to call
|
||||
* @param {object} options.userInfo Provide a key-value object that contains information about the shortcut, this will be returned in the getActivatedShortcut method. It is not possible to use the persistentIdentifier key, it is used internally
|
||||
* @param {boolean} options.isEligibleForSearch This value defaults to true, set this value to make it searchable in Siri
|
||||
* @param {boolean} options.isEligibleForPrediction This value defaults to true, set this value to set whether the shortcut eligible for prediction
|
||||
* @return Promise<void>
|
||||
*/
|
||||
@Cordova()
|
||||
donate(options: SiriShortcutOptions): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Present shortcut to the user, will popup a view controller asking the user to add it to Siri
|
||||
* @param {SiriShortcutOptions} options Options to specify for the donation
|
||||
* @param {string} options.persistentIdentifier Specify an identifier to uniquely identify the shortcut, in order to be able to remove it
|
||||
* @param {string} options.title Specify a title for the shortcut, which is visible to the user as the name of the shortcut
|
||||
* @param {string} options.suggestedInvocationPhrase Specify the phrase to give the user some inspiration on what the shortcut to call
|
||||
* @param {object} options.userInfo Provide a key-value object that contains information about the shortcut, this will be returned in the getActivatedShortcut method. It is not possible to use the persistentIdentifier key, it is used internally
|
||||
* @param {boolean} options.isEligibleForSearch This value defaults to true, set this value to make it searchable in Siri
|
||||
* @param {boolean} options.isEligibleForPrediction This value defaults to true, set this value to set whether the shortcut eligible for prediction
|
||||
* @return Promise<void>
|
||||
*/
|
||||
@Cordova()
|
||||
present(options: SiriShortcutOptions): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove shortcuts based on identifiers
|
||||
* @param {string|string[]} persistentIdentifiers Specify which shortcut(s) to delete by their persistent identifiers
|
||||
* @return Promise<void>
|
||||
*/
|
||||
@Cordova()
|
||||
remove(persistentIdentifiers: string|string[]): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all shortcuts from the application
|
||||
* @return Promise<void>
|
||||
*/
|
||||
@Cordova()
|
||||
removeAll(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current clicked user activity, and return `null` if none
|
||||
* @return Promise<SiriShortcut|null>
|
||||
*/
|
||||
@Cordova()
|
||||
getActivatedShortcut(): Promise<SiriShortcut|null> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,10 @@ export interface SpinnerDialogIOSOptions {
|
||||
/**
|
||||
* @name Spinner Dialog
|
||||
* @description
|
||||
* Cordova plugin for showing a native spinner based on Paldom/SpinnerDialog.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-native-spinner`. For more info, please see the [Spinner Dialog plugin docs](https://github.com/greybax/cordova-plugin-native-spinner).
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { SpinnerDialog } from '@ionic-native/spinner-dialog';
|
||||
|
||||
@@ -36,20 +36,21 @@ export interface SQLiteDatabaseConfig {
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
export interface SQLiteTransaction {
|
||||
start: () => void;
|
||||
export interface DbTransaction {
|
||||
executeSql: (
|
||||
sql: any,
|
||||
values: any,
|
||||
success: Function,
|
||||
error: Function
|
||||
) => void;
|
||||
addStatement: (
|
||||
sql: any,
|
||||
values: any,
|
||||
success: Function,
|
||||
error: Function
|
||||
values?: any[],
|
||||
success?: Function,
|
||||
error?: Function
|
||||
) => void;
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
export interface SQLiteTransaction extends DbTransaction {
|
||||
start: () => void;
|
||||
addStatement: DbTransaction['executeSql'];
|
||||
handleStatementSuccess: (handler: Function, response: any) => void;
|
||||
handleStatementFailure: (handler: Function, response: any) => void;
|
||||
run: () => void;
|
||||
@@ -74,14 +75,14 @@ export class SQLiteObject {
|
||||
addTransaction(transaction: (tx: SQLiteTransaction) => void): void {}
|
||||
|
||||
/**
|
||||
* @param fn {any}
|
||||
* @param fn {Function}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@CordovaInstance({
|
||||
successIndex: 2,
|
||||
errorIndex: 1
|
||||
})
|
||||
transaction(fn: any): Promise<any> {
|
||||
transaction(fn: (tx: DbTransaction) => void): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -120,7 +121,7 @@ export class SQLiteObject {
|
||||
* ensure it resolved and successfully opened the database.
|
||||
*/
|
||||
@CordovaInstance()
|
||||
executeSql(statement: string, params: any): Promise<any> {
|
||||
executeSql(statement: string, params?: any[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,986 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export interface Printer {
|
||||
/**
|
||||
* Printer model name and model number
|
||||
*/
|
||||
modelName?: string;
|
||||
|
||||
/**
|
||||
* Printer Mac Address
|
||||
*/
|
||||
macAddress?: string;
|
||||
|
||||
/**
|
||||
* Printer port name used to create a new port instance of SMPort or StarIOExtManager
|
||||
*/
|
||||
portName?: string;
|
||||
/**
|
||||
* USB Serial Number (USB Printers Only)
|
||||
*/
|
||||
USBSerialNumber?: string;
|
||||
}
|
||||
/**
|
||||
* Array of Printer objects returned by the portDiscovery() function
|
||||
*/
|
||||
export interface Printers extends Array<Printer> {}
|
||||
|
||||
export interface PrinterStatus {
|
||||
/**
|
||||
* Printer Online/Offline status
|
||||
*/
|
||||
offline?: boolean;
|
||||
|
||||
/**
|
||||
* Printer model name and model number
|
||||
*/
|
||||
ModelName?: string;
|
||||
|
||||
/**
|
||||
* Printer cover status
|
||||
*/
|
||||
coverOpen?: boolean;
|
||||
|
||||
/**
|
||||
* Printer Paper Cutter status
|
||||
*/
|
||||
cutterError?: boolean;
|
||||
|
||||
/**
|
||||
* Printer Paper status
|
||||
*/
|
||||
receiptPaperEmpty?: boolean;
|
||||
|
||||
/**
|
||||
* Printer Firmware information
|
||||
*/
|
||||
FirmwareVersion?: string;
|
||||
}
|
||||
|
||||
export interface PrintObj {
|
||||
/**
|
||||
* string containing the text to print, Example: "Star Clothing Boutique\n123 Star Road\nCity, State 12345\n\n"
|
||||
*/
|
||||
text: string;
|
||||
|
||||
/**
|
||||
* Sends a PartialCutWithFeed command to the printer, defaults to true
|
||||
*/
|
||||
cutReceipt?: boolean;
|
||||
|
||||
/**
|
||||
* sends a appendPeripheral command to the printer for channels No1 and No2 - Defaults to true
|
||||
*/
|
||||
openCashDrawer?: boolean;
|
||||
}
|
||||
export interface RasterObj extends PrintObj {
|
||||
/**
|
||||
* Font size number, defaults to 25
|
||||
*/
|
||||
fontSize?: number;
|
||||
|
||||
/**
|
||||
* Paper width (Units: Dots). 2 inches: 384, 3 inches: 576, 4 inches: 832, ESCPos 3 inches: 512, Dot 3 inches: 210. Defaults to 576
|
||||
*/
|
||||
paperWidth?: number;
|
||||
}
|
||||
export interface ImageObj {
|
||||
/**
|
||||
* Image URI to print, this can be obtained via the camera or photo library or as a static resource saved on the phone memory
|
||||
*/
|
||||
uri: string;
|
||||
|
||||
/**
|
||||
* Image width (Units: Dots) defaults to 576
|
||||
*/
|
||||
paperWidth?: number;
|
||||
|
||||
/**
|
||||
* Sends a PartialCutWithFeed command to the printer, defaults to true
|
||||
*/
|
||||
cutReceipt?: boolean;
|
||||
|
||||
/**
|
||||
* sends a appendPeripheral command to the printer for channels No1 and No2 - Defaults to true
|
||||
*/
|
||||
openCashDrawer?: boolean;
|
||||
}
|
||||
export interface PrintCommand {
|
||||
|
||||
/**
|
||||
* Characther encoding is used to getByte data from all subsequent commands. Default 'US-ASCII'
|
||||
* Choose the format of the return value Defined in StarPRNT.Encoding or the Encoding enum.
|
||||
* Example: {appendEncoding:'US-ASCII'}
|
||||
*/
|
||||
appendEncoding?: string;
|
||||
|
||||
/**
|
||||
* Select command of the code page is generated and added to the commands property.
|
||||
* Choose the format of the return value Defined in StarPRNT.CodePageType or the CodePageType enum.
|
||||
* Example: {appendCodePage:'CP858'}
|
||||
*/
|
||||
appendCodePage?: string;
|
||||
|
||||
/**
|
||||
* Data (Text) is added to the command buffer. Example: {append:"Star Clothing Boutique\n123 Star Road\nCity, State 12345\n\n"}
|
||||
*/
|
||||
append?: string;
|
||||
|
||||
/**
|
||||
* Data (Text) is added to the command buffer. Example: {appendRaw:"Star Clothing Boutique\n123 Star Road\nCity, State 12345\n\n"}
|
||||
*/
|
||||
appendRaw?: string;
|
||||
|
||||
/**
|
||||
* Data (Command) is added to the command buffer. Takes an array of bytes.
|
||||
* Example: {appendBytes:[0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x2e]}
|
||||
*/
|
||||
appendBytes?: Array<number>;
|
||||
|
||||
/**
|
||||
* Data (Command) is added to the command buffer. Takes an array of bytes.
|
||||
* Example: {appendRawBytes:[0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x2e]}
|
||||
*/
|
||||
appendRawBytes?: Array<number>;
|
||||
|
||||
/**
|
||||
* Set command of the character space is generated and added to the command buffer. Character Spacs (Unit: Dots) Example: 4
|
||||
*/
|
||||
appendCharacterSpace?: number;
|
||||
|
||||
/**
|
||||
* Select command of the emphasis mode is generated and added to the command buffer. Example: {appendEmphasis:"SALE\n"}
|
||||
*/
|
||||
appendEmphasis?: string;
|
||||
|
||||
/**
|
||||
* Enable emphasis mode is generated and added to the command buffer. Example: {enableEmphasis:true}
|
||||
*/
|
||||
enableEmphasis?: boolean;
|
||||
|
||||
/**
|
||||
* Select command of the invert mode is generated and added to the command buffer. Example: {appendInvert:"Refunds and Exchanges\n"}
|
||||
*/
|
||||
appendInvert?: string;
|
||||
/**
|
||||
* Enable invert mode is generated and added to the command buffer. Example: {enableInvert:true}
|
||||
*/
|
||||
enableInvert?: boolean;
|
||||
/**
|
||||
* Select command of the under line mode is generated and added to the command buffer. Example: {appendUnderline:"30 days"}
|
||||
*/
|
||||
appendUnderline?: string;
|
||||
/**
|
||||
* Enable under line mode is generated and added to the command buffer. Example: {enableUnderline:true}
|
||||
*/
|
||||
enableUnderline?: boolean;
|
||||
|
||||
/**
|
||||
* Select command of the international character mode is generated and added to the command buffer.
|
||||
* Choose the format of the return value Defined in StarPRNT.InternationalType or the InternationalType enum.
|
||||
* 'UK' | 'USA' | 'France' | 'Germany' | 'Denmark' | 'Sweden' | 'Italy' | 'Spain' | 'Japan' | 'Norway' | 'Denmark2' | 'Spain2' | 'LatinAmerica' | 'Korea' | 'Ireland' | 'Legal'
|
||||
* Example {appendInternational:InternationalType.UK}
|
||||
*/
|
||||
appendInternational?: string;
|
||||
|
||||
/**
|
||||
* Line feed command is generated and added to the command buffer. Paper feed units (Units: Lines) Example: 2
|
||||
*/
|
||||
appendLineFeed?: number;
|
||||
|
||||
/**
|
||||
* Unit feed command is generated and added to the command buffer. Paper feed units (Units: Dots) Example: 64
|
||||
*/
|
||||
appendUnitFeed?: number;
|
||||
|
||||
/**
|
||||
* Set command of the line space is generated and added to the command buffer. Line spaces (Units: Dots) Example: 32
|
||||
*/
|
||||
appendLineSpace?: number;
|
||||
|
||||
/**
|
||||
* Select command of the font style is generated and added to the command buffer.
|
||||
* Choose the format of the return value defined in StarPRNT.FontStyleType or the FontStyleType enum. 'A' | 'B'
|
||||
* Example: {appendFontStyle:FontStyleType.A}
|
||||
*/
|
||||
appendFontStyle?: string;
|
||||
|
||||
/**
|
||||
* Paper cut command is generated and added to the command buffer.
|
||||
* Choose the format of the return value defined in StarPRNT.CutPaperAction or the CutPaperAction enum. 'FullCut' | 'FullCutWithFeed' | 'PartialCut' | 'PartialCutWithFeed'
|
||||
* Example: {appendCutPaper:CutPaperAction.PartialCutWithFeed}
|
||||
*/
|
||||
appendCutPaper?: string;
|
||||
|
||||
/**
|
||||
* Black mark command is generated and added to the command buffer.
|
||||
* Choose the format of the return value defined in StarPRNT.BlackMarkType or the BlackMarkType enum. 'Valid' | 'Invalid' | 'ValidWithDetection'
|
||||
* Example: {appendBlackMark: BlackMarkType.Valid}
|
||||
*/
|
||||
appendBlackMark?: string;
|
||||
|
||||
/**
|
||||
* Absolute position command is generated and added to the command buffer. (Unit: Dots). Send in conjunction with the data property to append absolute position just to that string
|
||||
* Example1: Append data with Absolute position {appendAbsolutePosition:40, data: "Text with absolute position"}
|
||||
* Example2: Append absolute position to subsequent commands: {appendAbsolutePosition:40}
|
||||
*/
|
||||
appendAbsolutePosition?: number;
|
||||
|
||||
/**
|
||||
* Alignment command is generated and added to the command buffer. Send in conjunction with the data property to append alignment position just to that string
|
||||
* Choose the format of the return value defined in StarPRNT.AlignmentPosition or the AlignmentPosition enum. 'Left' | 'Center' | 'Right'.
|
||||
* Example1 Append data with Alignment position: {appendAlignment:AlignmentPosition.Center, data: "Text with centered position"}
|
||||
* Example2 Append absolute position to subsequent commands: {appendAlignment:AlignmentPosition.Center}
|
||||
*/
|
||||
appendAlignment?: string;
|
||||
|
||||
/**
|
||||
* Horizontal tab set/clear command is generated and added to the command buffer. (Only works for certain printer models, check the starSDK documentation for details)
|
||||
* Array of horizontal tab positions (Units: ANK character pitch). Specifying empty array deletes all currently set horizontal tab positions.
|
||||
* Example: {appendHorizontalTabPosition:[15, 35]}
|
||||
* Delete positions Example: {appendHorizontalTabPosition:[]}
|
||||
*/
|
||||
appendHorizontalTabPosition?: Array<number>;
|
||||
|
||||
/**
|
||||
* Print command of the logo is generated and added to the command buffer. The logo has to be uploaded to the printer using the Star Print utility.
|
||||
* Send in conjuction with the logoSize property to set the logo size
|
||||
* Example: {appendLogo:1}
|
||||
* Example with LogoSize: {appendLogo:1, logoSize:LogoSize.DoubleWidthDoubleHeight}
|
||||
*/
|
||||
appendLogo?: number;
|
||||
|
||||
/**
|
||||
* Property to be used with the appendLogo command.
|
||||
* Choose the format of the return value defined in StarPRNT.LogoSize or the LogoSize enum. 'Normal' | 'DoubleWidth' | 'DoubleHeight' | 'DoubleWidthDoubleHeight';
|
||||
* Example: {appendLogo:1, logoSize:LogoSize.DoubleWidthDoubleHeight}
|
||||
*/
|
||||
logoSize?: string;
|
||||
|
||||
/**
|
||||
* Print command of the barcode is generated and added to the command buffer.
|
||||
* Additional Properties: BarcodeSymbology, BarcodeWidth, height, hri, absolutePosition, alignment.
|
||||
* Example: {appendBarcode:"{BStar", BarcodeSymbology:BarcodeSymbology.Code128, BarcodeWidth:BarcodeWidth.Mode2, height:40, hri:true }
|
||||
* Example with absolutePosition: {appendBarcode:"{BStar", BarcodeSymbology:BarcodeSymbology.Code128, BarcodeWidth:BarcodeWidth.Mode2, height:40, hri:true, absolutePosition:40 }
|
||||
* Example with alignment:{appendBarcode:"{BStar", BarcodeSymbology:BarcodeSymbology.Code128, BarcodeWidth:BarcodeWidth.Mode2, height:40, hri:true, alignment:alignment:AlignmentPosition.Center }
|
||||
*/
|
||||
appendBarcode?: string;
|
||||
|
||||
/**
|
||||
* Property to be used with the appendBarcode command.
|
||||
* Choose the format of the return value defined in StarPRNT.BarcodeSymbology or the BarcodeSymbology enum.
|
||||
* 'Code128' | 'Code39' | 'Code93' | 'ITF' | 'JAN8' | 'JAN13' | 'NW7' | 'UPCA' | 'UPCE' |
|
||||
* Example: {appendBarcode:'{BStar', BarcodeSymbology:BarcodeSymbology.Code128}
|
||||
*/
|
||||
BarcodeSymbology?: string;
|
||||
|
||||
/**
|
||||
* Property to be used with the appendBarcode command.
|
||||
* Choose the format of the return value defined in StarPRNT.BarcodeWidth or the BarcodeWidth enum.
|
||||
* Mode1 | Mode2 | Mode3 | Mode4 | Mode5 | Mode6 | Mode7 | Mode8 | Mode9
|
||||
* Example: {appendBarcode:'{BStar', BarcodeWidth:BarcodeWidth.Mode2}
|
||||
*/
|
||||
BarcodeWidth?: string;
|
||||
|
||||
/**
|
||||
* Property to be used with the appendBarcode command.
|
||||
* Under-bar characters. true = Valid, false = Invalid
|
||||
* Example: {appendBarcode:'{BStar', hri:true}
|
||||
*/
|
||||
hri?: boolean;
|
||||
|
||||
/**
|
||||
* Property to be used with the appendBarcode command or the appendMultiple command (Units:Dots)
|
||||
* appendBarcode Example: {appendBarcode:'{BStar', height:40}
|
||||
* appendMultiple: {appendMultiple:'text to print', height:40}
|
||||
*/
|
||||
height?: number;
|
||||
|
||||
/**
|
||||
* Property to be used with the appendBitmap command or the appendMultiple command (Units:Dots)
|
||||
* appendBitmap Example: {appendBitmap:uri, width:576}
|
||||
* appendMultiple: {appendMultiple:'text to print', width:40}
|
||||
*/
|
||||
width?: number;
|
||||
|
||||
/**
|
||||
* Property to be used with the appendBitmap command, the appendBarcode command, or the appendQrCode command (Units:Dots)
|
||||
* appendBitmap Example: {appendBitmap:uri, absolutePosition:40}.
|
||||
* appendBarcode Example: {appendBarcode:'{BStar', absolutePosition:40}.
|
||||
* appendQrCode Example: {appendQrCode:'{BStar', absolutePosition:40}.
|
||||
*/
|
||||
absolutePosition?: number;
|
||||
|
||||
/**
|
||||
* Property to be used with the appendBitmap command, the appendBarcode command, or the appendQrCode command (Units:Dots)
|
||||
* Choose the format of the return value defined in StarPRNT.AlignmentPosition or the AlignmentPosition enum. 'Left' | 'Center' | 'Right'.
|
||||
* appendBitmap Example: {appendBitmap:uri, alignment:AlignmentPosition.Center}.
|
||||
* appendBarcode Example: {appendBarcode:'{BStar', alignment:AlignmentPosition.Center}.
|
||||
* appendQrCode Example: {appendQrCode:'{BStar', alignment:AlignmentPosition.Center}.
|
||||
*/
|
||||
alignment?: string;
|
||||
|
||||
/**
|
||||
* Select command of the multiple mode is generated and added to the command buffer.
|
||||
* Additional properties: width:number, height:number
|
||||
* Example: {appendMultiple:" $156.95\n", width:2, height:2}.
|
||||
*/
|
||||
appendMultiple?: string;
|
||||
|
||||
/**
|
||||
* Enable multiple mode is generated and added to the command buffer.
|
||||
* Additional properties: width:number, height:number
|
||||
* Example: {enableMultiple:true, width:2, height:2}
|
||||
* Disable Example: {enableMultiple:false}
|
||||
*/
|
||||
enableMultiple?: boolean;
|
||||
|
||||
/**
|
||||
* Print command of the QR code is generated and added to the command buffer.
|
||||
* Additional Properties: QrCodeModel, QrCodeLevel, cell, absolutePosition, alignment.
|
||||
* Example: {appendQrCode:"{BStar", QrCodeModel:"No2", QrCodeLevel:"L", cell: 8}.
|
||||
* Example with absolutePosition: {appendQrCode:"{BStar", QrCodeModel:"No2", QrCodeLevel:"L", cell: 8, absolutePosition: 40 }.
|
||||
* Example with alignment: {appendQrCode:"{BStar", QrCodeModel:"No2", QrCodeLevel:"L", cell: 8, alignment:"Center" }.
|
||||
*/
|
||||
appendQrCode?: string;
|
||||
|
||||
/**
|
||||
* Property to be used with the appendQrCode command.
|
||||
* Choose the format of the return value defined in StarPRNT.QrCodeModel or the QrCodeModel enum. 'No1' | 'No2' Default 'No2'
|
||||
* Example: {appendQrCode:'{BStar', QrCodeModel:QrCodeModel.No1}
|
||||
*/
|
||||
QrCodeModel?: string;
|
||||
|
||||
/**
|
||||
* Property to be used with the appendQrCode command.
|
||||
* Choose the format of the return value defined in StarPRNT.QrCodeLevel or the QrCodeLevel enum. 'No1' | 'No2'. Default 'H'
|
||||
* Example: {appendQrCode:'{BStar', QrCodeLevel:QrCodeLevel.H}
|
||||
*/
|
||||
QrCodeLevel?: string;
|
||||
|
||||
/**
|
||||
* Property to be used with the appendQrCode command. QRCode Cell size. Default 4.
|
||||
* Example: {appendQrCode:'{BStar', cell:8}
|
||||
*/
|
||||
cell?: number;
|
||||
|
||||
/**
|
||||
* Print command of the bitmap is generated and added to the command buffer. Takes a string image URI
|
||||
* this can be obtained via the camera or photo library or as a static resource saved on the phone memory.
|
||||
* Additional Properties: diffusion, width, bothScale, rotation, absolutePosition, alignment.
|
||||
* Example: {appendBitmap:uri, diffusion: true, width:576, bothScale: true}
|
||||
* Example with absolutePosition: {appendBitmap:uri, diffusion: true, width:576, bothScale: true, absolutePosition: 40 }.
|
||||
* Example with alignment: {appendBitmap:uri, diffusion: true, width:576, bothScale: true, alignment:"Center" }.
|
||||
*/
|
||||
appendBitmap?: string;
|
||||
|
||||
/**
|
||||
* Property to be used with the appendBitmap command. Random dither: true = Valid, false = Invalid. Default true.
|
||||
* Example: {appendBitmap:uri, diffusion: false }
|
||||
*/
|
||||
diffusion?: boolean;
|
||||
|
||||
/**
|
||||
* Property to be used with the appendBitmap command. Height is changed according to the conversion rate of the width property.
|
||||
* true = Valid, false = Invalid. Default true.
|
||||
* Example: {appendBitmap:uri, bothScale: true }
|
||||
*/
|
||||
bothScale?: boolean;
|
||||
|
||||
/**
|
||||
* Property to be used with the appendBitmap command.
|
||||
* Choose the format of the return value defined in StarPRNT.BitmapConverterRotation or the BitmapConverterRotation enum.
|
||||
* 'Normal' | 'Left90' | 'Right90' | 'Rotate180'
|
||||
* Example: {appendBitmap:uri, rotation: BitmapConverterRotation.Left90 }
|
||||
*/
|
||||
rotation?: string;
|
||||
|
||||
/**
|
||||
* sends a appendPeripheral command to the printer for channel number: Example: 1 = No1, 2 = No2
|
||||
*/
|
||||
openCashDrawer?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Emulation constants
|
||||
*/
|
||||
export enum Emulation {
|
||||
/** mPOP, SM-L200, SM-L300, SM-S210i, SM-S220i, SM-S230i, SM-T300i/T300, SM-T400i */
|
||||
StarPRNT = 'StarPRNT',
|
||||
/** SM-L200, SM-L300 */
|
||||
StarPRNTL = 'StarPRNTL',
|
||||
/** FVP10, TSP650II, TSP700II, TSP800II */
|
||||
StarLine = 'StarLine',
|
||||
/** TSP100 */
|
||||
StarGraphic = 'StarGraphic',
|
||||
/** BSC10 */
|
||||
EscPos = 'EscPos',
|
||||
/** SM-S210i, SM-S220i, SM-S230i, SM-T300i/T300, SM-T400i */
|
||||
EscPosMobile = 'EscPosMobile',
|
||||
/** SP700 */
|
||||
StarDotImpact = 'StarDotImpact',
|
||||
}
|
||||
|
||||
/**
|
||||
* Encoding constants
|
||||
*/
|
||||
export enum Encoding {
|
||||
/** English */
|
||||
USASCII = 'US-ASCII',
|
||||
/** French, German, Portuguese, Spanish */
|
||||
Windows1252 = 'Windows-1252',
|
||||
/** Japanese */
|
||||
ShiftJIS = 'Shift-JIS',
|
||||
/** Russian */
|
||||
Windows1251 = 'Windows-1251',
|
||||
/** Simplified Chinese */
|
||||
GB2312 = 'GB2312',
|
||||
/** Traditional Chinese */
|
||||
Big5 = 'Big5',
|
||||
/** UFT8 */
|
||||
UTF8 = 'UTF-8'
|
||||
}
|
||||
|
||||
/**
|
||||
* CodePageType constants
|
||||
*/
|
||||
export enum CodePageType {
|
||||
CP737 = 'CP737',
|
||||
CP772 = 'CP772',
|
||||
CP774 = 'CP774',
|
||||
CP851 = 'CP851',
|
||||
CP852 = 'CP852',
|
||||
CP855 = 'CP855',
|
||||
CP857 = 'CP857',
|
||||
CP858 = 'CP858',
|
||||
CP860 = 'CP860',
|
||||
CP861 = 'CP861',
|
||||
CP862 = 'CP862',
|
||||
CP863 = 'CP863',
|
||||
CP864 = 'CP864',
|
||||
CP865 = 'CP865',
|
||||
CP869 = 'CP869',
|
||||
CP874 = 'CP874',
|
||||
CP928 = 'CP928',
|
||||
CP932 = 'CP932',
|
||||
CP999 = 'CP999',
|
||||
CP1001 = 'CP1001',
|
||||
CP1250 = 'CP1250',
|
||||
CP1251 = 'CP1251',
|
||||
CP1252 = 'CP1252',
|
||||
CP2001 = 'CP2001',
|
||||
CP3001 = 'CP3001',
|
||||
CP3002 = 'CP3002',
|
||||
CP3011 = 'CP3011',
|
||||
CP3012 = 'CP3012',
|
||||
CP3021 = 'CP3021',
|
||||
CP3041 = 'CP3041',
|
||||
CP3840 = 'CP3840',
|
||||
CP3841 = 'CP3841',
|
||||
CP3843 = 'CP3843',
|
||||
CP3845 = 'CP3845',
|
||||
CP3846 = 'CP3846',
|
||||
CP3847 = 'CP3847',
|
||||
CP3848 = 'CP3848',
|
||||
UTF8 = 'UTF8',
|
||||
Blank = 'Blank'
|
||||
}
|
||||
|
||||
/**
|
||||
* InternationalType constants
|
||||
*/
|
||||
export enum InternationalType {
|
||||
UK = 'UK',
|
||||
USA = 'USA',
|
||||
France = 'France',
|
||||
Germany = 'Germany',
|
||||
Denmark = 'Denmark',
|
||||
Sweden = 'Sweden',
|
||||
Italy = 'Italy',
|
||||
Spain = 'Spain',
|
||||
Japan = 'Japan',
|
||||
Norway = 'Norway',
|
||||
Denmark2 = 'Denmark2',
|
||||
Spain2 = 'Spain2',
|
||||
LatinAmerica = 'LatinAmerica',
|
||||
Korea = 'Korea',
|
||||
Ireland = 'Ireland',
|
||||
Legal = 'Legal'
|
||||
}
|
||||
|
||||
/**
|
||||
* FontStyleType constants.
|
||||
*/
|
||||
export enum FontStyleType {
|
||||
/** Font-A (12 x 24 dots) / Specify 7 x 9 font (half dots) */
|
||||
A = 'A',
|
||||
/** Font-B (9 x 24 dots) / Specify 5 x 9 font (2P-1) */
|
||||
B = 'B'
|
||||
}
|
||||
|
||||
/**
|
||||
* CutPaperAction constants.
|
||||
*/
|
||||
export enum CutPaperAction {
|
||||
FullCut = 'FullCut',
|
||||
FullCutWithFeed = 'FullCutWithFeed',
|
||||
PartialCut = 'PartialCut',
|
||||
PartialCutWithFeed = 'PartialCutWithFeed'
|
||||
}
|
||||
|
||||
/**
|
||||
* BlackMarkType constants.
|
||||
*/
|
||||
export enum BlackMarkType {
|
||||
Valid = 'Valid',
|
||||
Invalid = 'Invalid',
|
||||
ValidWithDetection = 'ValidWithDetection'
|
||||
}
|
||||
|
||||
/**
|
||||
* LogoSize constants
|
||||
*/
|
||||
export enum LogoSize {
|
||||
Normal = 'Normal',
|
||||
DoubleWidth = 'DoubleWidth',
|
||||
DoubleHeight = 'DoubleHeight',
|
||||
DoubleWidthDoubleHeight = 'DoubleWidthDoubleHeight'
|
||||
}
|
||||
|
||||
/**
|
||||
* AlignmentPosition constants
|
||||
*/
|
||||
export enum AlignmentPosition {
|
||||
Left = 'Left',
|
||||
Center = 'Center',
|
||||
Right = 'Right'
|
||||
}
|
||||
|
||||
/**
|
||||
* BarcodeSymbology constants
|
||||
*/
|
||||
export enum BarcodeSymbology {
|
||||
Code128 = 'Code128',
|
||||
Code39 = 'Code39',
|
||||
Code93 = 'Code93',
|
||||
ITF = 'ITF',
|
||||
JAN8 = 'JAN8',
|
||||
JAN13 = 'JAN13',
|
||||
NW7 = 'NW7',
|
||||
UPCA = 'UPCA',
|
||||
UPCE = 'UPCE'
|
||||
}
|
||||
|
||||
/**
|
||||
* BarcodeWidth constants
|
||||
*/
|
||||
export enum BarcodeWidth {
|
||||
Mode1 = 'Mode1',
|
||||
Mode2 = 'Mode2',
|
||||
Mode3 = 'Mode3',
|
||||
Mode4 = 'Mode4',
|
||||
Mode5 = 'Mode5',
|
||||
Mode6 = 'Mode6',
|
||||
Mode7 = 'Mode7',
|
||||
Mode8 = 'Mode8',
|
||||
Mode9 = 'Mode9'
|
||||
}
|
||||
|
||||
/**
|
||||
* QrCodeModel constants
|
||||
*/
|
||||
export enum QrCodeModel {
|
||||
No1 = 'No1',
|
||||
No2 = 'No2'
|
||||
}
|
||||
|
||||
/**
|
||||
* QrCodeLevel constants
|
||||
*/
|
||||
export enum QrCodeLevel {
|
||||
H = 'H',
|
||||
L = 'L',
|
||||
M = 'M',
|
||||
Q = 'Q'
|
||||
}
|
||||
|
||||
/**
|
||||
* BitmapConverterRotation constants
|
||||
*/
|
||||
export enum BitmapConverterRotation {
|
||||
Normal = 'Normal',
|
||||
Left90 = 'Left90',
|
||||
Right90 = 'Right90',
|
||||
Rotate180 = 'Rotate180'
|
||||
}
|
||||
|
||||
/**
|
||||
* Push a new PrintCommand object to the array for a separate instruction to the printer. Example [{append:"text"}, {"openCashDrawer: 1"}]
|
||||
*/
|
||||
export interface CommandsArray extends Array<PrintCommand> {}
|
||||
|
||||
/**
|
||||
* @name StarPRNT
|
||||
* @description
|
||||
* * Ionic Native wrappers for the starprnt cordova plugin for Star Micronics Bluetooth/LAN printers
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { StarPRNT } from '@ionic-native/star-prnt';
|
||||
*
|
||||
*
|
||||
* constructor(private starprnt: StarPRNT) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.starprnt.portDiscovery('all')
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'StarPRNT',
|
||||
plugin: 'cordova-plugin-starprnt', // npm package name, example: cordova-plugin-camera
|
||||
pluginRef: 'starprnt', // the variable reference to call the plugin, example: navigator.geolocation
|
||||
repo: 'https://github.com/auctifera-josed/starprnt', // the github repository URL for the plugin
|
||||
platforms: ['Android', 'iOS'] // Array of platforms supported, example: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class StarPRNT extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Constant for Emulation
|
||||
*/
|
||||
Emulation = {
|
||||
StarPRNT: 'StarPRNT',
|
||||
StarPRNTL: 'StarPRNTL',
|
||||
StarLine: 'StarLine',
|
||||
StarGraphic: 'StarGraphic',
|
||||
EscPos: 'EscPos',
|
||||
EscPosMobile: 'EscPosMobile',
|
||||
StarDotImpact: 'StarDotImpact',
|
||||
};
|
||||
|
||||
/**
|
||||
* Constant for possible Encoding
|
||||
*/
|
||||
Encoding = {
|
||||
USASCII: 'US-ASCII',
|
||||
Windows1252: 'Windows-1252',
|
||||
ShiftJIS: 'Shift-JIS',
|
||||
Windows1251: 'Windows-1251',
|
||||
GB2312: 'GB2312',
|
||||
Big5: 'Big5',
|
||||
UTF8: 'UTF-8'
|
||||
};
|
||||
|
||||
/**
|
||||
* CodePageType constants
|
||||
*/
|
||||
CodePageType = {
|
||||
CP737: 'CP737',
|
||||
CP772: 'CP772',
|
||||
CP774: 'CP774',
|
||||
CP851: 'CP851',
|
||||
CP852: 'CP852',
|
||||
CP855: 'CP855',
|
||||
CP857: 'CP857',
|
||||
CP858: 'CP858',
|
||||
CP860: 'CP860',
|
||||
CP861: 'CP861',
|
||||
CP862: 'CP862',
|
||||
CP863: 'CP863',
|
||||
CP864: 'CP864',
|
||||
CP865: 'CP865',
|
||||
CP869: 'CP869',
|
||||
CP874: 'CP874',
|
||||
CP928: 'CP928',
|
||||
CP932: 'CP932',
|
||||
CP999: 'CP999',
|
||||
CP1001: 'CP1001',
|
||||
CP1250: 'CP1250',
|
||||
CP1251: 'CP1251',
|
||||
CP1252: 'CP1252',
|
||||
CP2001: 'CP2001',
|
||||
CP3001: 'CP3001',
|
||||
CP3002: 'CP3002',
|
||||
CP3011: 'CP3011',
|
||||
CP3012: 'CP3012',
|
||||
CP3021: 'CP3021',
|
||||
CP3041: 'CP3041',
|
||||
CP3840: 'CP3840',
|
||||
CP3841: 'CP3841',
|
||||
CP3843: 'CP3843',
|
||||
CP3845: 'CP3845',
|
||||
CP3846: 'CP3846',
|
||||
CP3847: 'CP3847',
|
||||
CP3848: 'CP3848',
|
||||
UTF8: 'UTF8',
|
||||
Blank: 'Blank'
|
||||
};
|
||||
|
||||
/**
|
||||
* Constant for possible InternationalType
|
||||
*/
|
||||
InternationalType = {
|
||||
UK: 'UK',
|
||||
USA: 'USA',
|
||||
France: 'France',
|
||||
Germany: 'Germany',
|
||||
Denmark: 'Denmark',
|
||||
Sweden: 'Sweden',
|
||||
Italy: 'Italy',
|
||||
Spain: 'Spain',
|
||||
Japan: 'Japan',
|
||||
Norway: 'Norway',
|
||||
Denmark2: 'Denmark2',
|
||||
Spain2: 'Spain2',
|
||||
LatinAmerica: 'LatinAmerica',
|
||||
Korea: 'Korea',
|
||||
Ireland: 'Ireland',
|
||||
Legal: 'Legal'
|
||||
};
|
||||
|
||||
/**
|
||||
* Constant for possible FontStyleType
|
||||
*/
|
||||
FontStyleType = {
|
||||
/** Font-A (12 x 24 dots) / Specify 7 x 9 font (half dots) */
|
||||
A: 'A',
|
||||
/** Font-B (9 x 24 dots) / Specify 5 x 9 font (2P-1) */
|
||||
B: 'B'
|
||||
};
|
||||
|
||||
/**
|
||||
* Constant for possible CutPaperAction
|
||||
*/
|
||||
CutPaperAction = {
|
||||
FullCut: 'FullCut',
|
||||
FullCutWithFeed: 'FullCutWithFeed',
|
||||
PartialCut: 'PartialCut',
|
||||
PartialCutWithFeed: 'PartialCutWithFeed'
|
||||
};
|
||||
|
||||
/**
|
||||
* Constant for possible BlackMarkType
|
||||
*/
|
||||
BlackMarkType = {
|
||||
Valid: 'Valid',
|
||||
Invalid: 'Invalid',
|
||||
ValidWithDetection: 'ValidWithDetection'
|
||||
};
|
||||
|
||||
/**
|
||||
* Constant for possible AlignmentPosition
|
||||
*/
|
||||
AlignmentPosition = {
|
||||
Left: 'Left',
|
||||
Center: 'Center',
|
||||
Right: 'Right'
|
||||
};
|
||||
|
||||
/**
|
||||
* Constant for possible LogoSize
|
||||
*/
|
||||
LogoSize = {
|
||||
Normal: 'Normal',
|
||||
DoubleWidth: 'DoubleWidth',
|
||||
DoubleHeight: 'DoubleHeight',
|
||||
DoubleWidthDoubleHeight: 'DoubleWidthDoubleHeight'
|
||||
};
|
||||
|
||||
/**
|
||||
* Constant for possible BarcodeSymbology
|
||||
*/
|
||||
BarcodeSymbology = {
|
||||
Code128: 'Code128',
|
||||
Code39: 'Code39',
|
||||
Code93: 'Code93',
|
||||
ITF: 'ITF',
|
||||
JAN8: 'JAN8',
|
||||
JAN13: 'JAN13',
|
||||
NW7: 'NW7',
|
||||
UPCA: 'UPCA',
|
||||
UPCE: 'UPCE'
|
||||
};
|
||||
|
||||
/**
|
||||
* Constant for possible BarcodeWidth
|
||||
*/
|
||||
BarcodeWidth = {
|
||||
Mode1: 'Mode1',
|
||||
Mode2: 'Mode2',
|
||||
Mode3: 'Mode3',
|
||||
Mode4: 'Mode4',
|
||||
Mode5: 'Mode5',
|
||||
Mode6: 'Mode6',
|
||||
Mode7: 'Mode7',
|
||||
Mode8: 'Mode8',
|
||||
Mode9: 'Mode9'
|
||||
};
|
||||
|
||||
/**
|
||||
* Constant for possible QrCodeModel
|
||||
*/
|
||||
QrCodeModel = {
|
||||
No1: 'No1',
|
||||
No2: 'No2'
|
||||
};
|
||||
|
||||
/**
|
||||
* Constant for possible QrCodeLevel
|
||||
*/
|
||||
QrCodeLevel = {
|
||||
H: 'H',
|
||||
L: 'L',
|
||||
M: 'M',
|
||||
Q: 'Q'
|
||||
};
|
||||
|
||||
/**
|
||||
* Constant for possible BitmapConverterRotation
|
||||
*/
|
||||
BitmapConverterRotation = {
|
||||
Normal: 'Normal',
|
||||
Left90: 'Left90',
|
||||
Right90: 'Right90',
|
||||
Rotate180: 'Rotate180'
|
||||
};
|
||||
|
||||
/**
|
||||
* Find available printers
|
||||
* @param {string} type Interface Type: All, LAN, Bluetooth, USB
|
||||
* @return {Promise<Printers>} Returns a promise that resolves with an array of printers
|
||||
*/
|
||||
@Cordova()
|
||||
portDiscovery(type: string): Promise<Printers> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks the status of the printer
|
||||
* @param {string} port Printer name i.e BT:StarMicronics
|
||||
* @param {string} emulation StarPrinter Emulation type: "StarPRNT", "StarPRNTL", "StarLine", "StarGraphic", "EscPos", "EscPosMobile", "StarDotImpact"
|
||||
* @return {Promise<PrinterStatus>} Returns a promise that resolves with the PrinterStatus object
|
||||
*/
|
||||
@Cordova()
|
||||
checkStatus(port: string, emulation: string): Promise<PrinterStatus> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints plain text
|
||||
* @param {string} port Printer name i.e BT:StarMicronics. Send null to use a printer connected via StarIOExtManager using the connect() function
|
||||
* @param {string} emulation StarPrinter Emulation type: "StarPRNT", "StarPRNTL", "StarLine", "StarGraphic", "EscPos", "EscPosMobile", "StarDotImpact"
|
||||
* @param {PrintObj} printObj text:string, cutReceipt?:boolean, openCashDrawer?:boolean
|
||||
* @return {Promise<any>} Success! if printed correctly or error message string returned by the SDK.
|
||||
*/
|
||||
@Cordova()
|
||||
printRawText(
|
||||
port: string,
|
||||
emulation: string,
|
||||
printObj: PrintObj
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the text into a bitmap image and sends it to the printer
|
||||
* @param {string} port Printer name i.e BT:StarMicronics. Send null to use a printer connected via StarIOExtManager using the connect() function
|
||||
* @param {string} emulation StarPrinter Emulation type: "StarPRNT", "StarPRNTL", "StarLine", "StarGraphic", "EscPos", "EscPosMobile", "StarDotImpact"
|
||||
* @param {RasterObj} rasterObj text:string, cutReceipt?:boolean, openCashDrawer?:boolean, fontSize:number, paperWidth:number
|
||||
* @return {Promise<any>} Success! if printed correctly or error message string returned by the SDK.
|
||||
*/
|
||||
@Cordova()
|
||||
printRasterReceipt(
|
||||
port: string,
|
||||
emulation: string,
|
||||
rasterObj: RasterObj
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an image from a string URI and converts it to bitmap to send it to the printer
|
||||
* @param {string} port Printer name i.e BT:StarMicronics. Send null to use a printer connected via StarIOExtManager using the connect() function
|
||||
* @param {string} emulation StarPrinter Emulation type: "StarPRNT", "StarPRNTL", "StarLine", "StarGraphic", "EscPos", "EscPosMobile", "StarDotImpact"
|
||||
* @param {ImageObj} imageObj uri:string, paperWidth?:number, cutReceipt?:boolean, openCashDrawer?:boolean
|
||||
* @return {Promise<any>} Success! if printed correctly or error message string returned by the SDK.
|
||||
*/
|
||||
@Cordova()
|
||||
printImage(
|
||||
port: string,
|
||||
emulation: string,
|
||||
imageObj: ImageObj
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* sends an appendPeripheral command to the printer for channels No1 and No2
|
||||
* @param {string} port Printer name i.e BT:StarMicronics. Send null to use a printer connected via StarIOExtManager using the connect() function
|
||||
* @param {string} emulation StarPrinter Emulation type: "StarPRNT", "StarPRNTL", "StarLine", "StarGraphic", "EscPos", "EscPosMobile", "StarDotImpact"
|
||||
* @return {Promise<any>} Success! if opened or error message string returned by the SDK.
|
||||
*/
|
||||
@Cordova()
|
||||
openCashDrawer(port: string, emulation: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends an Array of commands to the command buffer using the Android ICommandBuilderInterface or iOS ISCBBuilderInterface
|
||||
* @param {string} port Printer name i.e BT:StarMicronics. Send null to use a printer connected via StarIOExtManager using the connect() function
|
||||
* @param {string} emulation StarPrinter Emulation type: "StarPRNT", "StarPRNTL", "StarLine", "StarGraphic", "EscPos", "EscPosMobile", "StarDotImpact"
|
||||
* @param {CommandsArray} commandsArray each command in the array should be an instance of the PrintCommand object. Example [{append:"text"}, {"openCashDrawer: 1"}]
|
||||
* @return {Promise<any>} Success! if printed correctly or error message string returned by the SDK.
|
||||
*/
|
||||
@Cordova()
|
||||
print(
|
||||
port: string,
|
||||
emulation: string,
|
||||
commandsArray: CommandsArray
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows you to connect to the printer, keep the connection alive and receive status updates through an observable
|
||||
* @param {string} port printer name i.e BT:StarMicronics.
|
||||
* @param {string} emulation StarPrinter Emulation type: "StarPRNT", "StarPRNTL", "StarLine", "StarGraphic", "EscPos", "EscPosMobile", "StarDotImpact"
|
||||
* @param {boolean} hasBarcodeReader Set to true if the device has a barcode reader (e.g. mPop)
|
||||
* @return {Observable<any>} Success! if connected or error message string returned by the SDK.
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
callbackStyle: 'node'
|
||||
})
|
||||
connect(port: string, emulation: string, hasBarcodeReader: boolean): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an observable with the device status events. Only fires when a printer is connnected through the connect() function
|
||||
* @return {Observable<any>} dataType: printerOnline, printerOffline, printerImpossible, printerPaperEmpty, printerPaperNearEmpty, printerPaperReady, printerCoverOpen, printerCoverClose, cashDrawerOpen, cashDrawerClose
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'starPrntData'
|
||||
})
|
||||
getStatus(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows to disconnect (close the connection to the peripherals), this is useful to avoid keeping alive a connection when not in the app to save device battery
|
||||
* (energy consumption). You should call this function when the app is paused or closed.
|
||||
* @return {Promise<any>} Success! if connected or error message string returned by the SDK.
|
||||
*/
|
||||
@Cordova()
|
||||
disconnect(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,48 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* Object of options to pass into the playVideo method.
|
||||
*/
|
||||
export interface StreamingVideoOptions {
|
||||
/** Executes after success playing audio. */
|
||||
successCallback?: Function;
|
||||
/** Executes after error playing video. */
|
||||
errorCallback?: Function;
|
||||
/** Force one orientation for playing video. */
|
||||
orientation?: string;
|
||||
/** Should the video close after it's over. Defaults to true. */
|
||||
shouldAutoClose?: boolean;
|
||||
/** Should the video have controls. Defaults to true. Android only. */
|
||||
controls?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Object of options to pass into the playAudio method.
|
||||
*/
|
||||
export interface StreamingAudioOptions {
|
||||
/** Background color for audio player. */
|
||||
bgColor?: string;
|
||||
/** Background image for audio player. */
|
||||
bgImage?: string;
|
||||
/**
|
||||
* Background image scale for audio player.
|
||||
* Valid values are:
|
||||
* fit
|
||||
* stretch
|
||||
* aspectStretch.
|
||||
*/
|
||||
bgImageScale?: string;
|
||||
/** Start audio player in full screen. iOS only. */
|
||||
initFullscreen?: boolean;
|
||||
/**
|
||||
* Keeps the screen lit and stops it from locking
|
||||
* while audio is playing. Android only.
|
||||
*/
|
||||
keepAwake?: boolean;
|
||||
/** Executes after success playing audio. */
|
||||
successCallback?: Function;
|
||||
/** Executes after error playing audio. */
|
||||
errorCallback?: Function;
|
||||
}
|
||||
|
||||
@@ -30,7 +60,9 @@ export interface StreamingAudioOptions {
|
||||
* let options: StreamingVideoOptions = {
|
||||
* successCallback: () => { console.log('Video played') },
|
||||
* errorCallback: (e) => { console.log('Error streaming') },
|
||||
* orientation: 'landscape'
|
||||
* orientation: 'landscape',
|
||||
* shouldAutoClose: true,
|
||||
* controls: false
|
||||
* };
|
||||
*
|
||||
* this.streamingMedia.playVideo('https://path/to/video/stream', options);
|
||||
|
||||
@@ -45,7 +45,7 @@ export interface StripeCardTokenParams {
|
||||
/**
|
||||
* Postal code / ZIP Code
|
||||
*/
|
||||
postal_code?: string;
|
||||
postalCode?: string;
|
||||
/**
|
||||
* 3-letter ISO code for currency
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
/**
|
||||
* @paid
|
||||
* @name TealiumAdIdentifier
|
||||
* @description
|
||||
* This module depends on the [Tealium Cordova Plugin](https://github.com/tealium/cordova-plugin). Without it, this module will not do anything.
|
||||
* Makes the IDFA and Google Ad Identifier available in the Tealium data layer.
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import { TealiumAdIdentifier } from '@ionic-native/tealium-adidentifier';
|
||||
*
|
||||
*
|
||||
* constructor(private adIdentifier: TealiumAdIdentifier) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.adIdentifier.setPersistent("main");
|
||||
* this.adIdentifier.setVolatile("main");
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
|
||||
@Plugin({
|
||||
pluginName: 'TealiumAdIdentifier',
|
||||
plugin: 'tealium-cordova-adidentifier', // npm package name, example: cordova-plugin-camera
|
||||
pluginRef: 'window.tealiumAdIdentifier', // the variable reference to call the plugin, example: navigator.geolocation
|
||||
repo: 'https://github.com/Tealium/cordova-plugin', // the github repository URL for the plugin
|
||||
platforms: ['Android', 'iOS'], // Array of platforms supported, example: ['Android', 'iOS']
|
||||
install: '', // OPTIONAL install command, in case the plugin requires variables
|
||||
})
|
||||
|
||||
@Injectable()
|
||||
export class TealiumAdIdentifier extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* This function stores the ad identifier information as persistent data
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
setPersistent(instanceName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function stores the ad identifier information as volatile data
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
setVolatile(instanceName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
/**
|
||||
* @paid
|
||||
* @name TealiumInstallReferrer
|
||||
* @description
|
||||
* This module depends on the [Tealium Cordova Plugin](https://github.com/tealium/cordova-plugin). Without it, this module will not do anything.
|
||||
* Implements a Broadcast Receiver for the INSTALL_REFERRER intent.
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import { TealiumInstallReferrer } from '@ionic-native/tealium-installreferrer';
|
||||
*
|
||||
*
|
||||
* constructor(private installReferrer: TealiumInstallReferrer) { }
|
||||
*
|
||||
*
|
||||
* this.installReferrer.setPersistent("main");
|
||||
* this.installReferrer.setVolatile("main");
|
||||
*
|
||||
*
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
|
||||
@Plugin({
|
||||
pluginName: 'TealiumInstallReferrer',
|
||||
plugin: 'tealium-cordova-installreferrer', // npm package name, example: cordova-plugin-camera
|
||||
pluginRef: 'window.tealiumInstallReferrer', // the variable reference to call the plugin, example: navigator.geolocation
|
||||
repo: 'https://github.com/Tealium/cordova-plugin', // the github repository URL for the plugin
|
||||
platforms: ['Android'], // Array of platforms supported, example: ['Android', 'iOS']
|
||||
install: '', // OPTIONAL install command, in case the plugin requires variables
|
||||
})
|
||||
|
||||
@Injectable()
|
||||
export class TealiumInstallReferrer extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* This function stores the install referrer information as persistent data
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
setPersistent(instanceName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function stores the install referrer information as volatile data
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
setVolatile(instanceName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,220 @@
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
export interface TealConfig {
|
||||
/**
|
||||
* Your Tealium account name
|
||||
*/
|
||||
account: string;
|
||||
/**
|
||||
* Your Tealium profile name
|
||||
*/
|
||||
profile: string;
|
||||
/**
|
||||
* Your Tealium environment name (dev, qa, prod)
|
||||
*/
|
||||
environment: string;
|
||||
/**
|
||||
* Arbitrary instance name string. Must be consistent for all calls to Tealium API.
|
||||
*/
|
||||
instance: string;
|
||||
/**
|
||||
* Enables ("true") or disables ("false") lifecycle reporting. Default true if omitted.
|
||||
*/
|
||||
isLifecycleEnabled?: string;
|
||||
/**
|
||||
* Not usually required. Sets a custom URL override for dispatches to UDH.
|
||||
*/
|
||||
collectDispatchURL?: string;
|
||||
/**
|
||||
* Your Tealium UDH profile. Only active if you do not have collectDispatchURL set.
|
||||
*/
|
||||
collectDispatchProfile?: string;
|
||||
/**
|
||||
* Enables ("true") or disables ("false") Crash Reporter module for Android. Default false if omitted.
|
||||
*/
|
||||
isCrashReporterEnabled?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @paid
|
||||
* @name Tealium
|
||||
* @description
|
||||
* This plugin provides a TypeScript wrapper around the [Tealium](https://www.tealium.com) Cordova plugin for Ionic Native.
|
||||
*
|
||||
* For full documentation, see [https://community.tealiumiq.com/t5/Mobile-Libraries/Tealium-for-Cordova/ta-p/17618](https://community.tealiumiq.com/t5/Mobile-Libraries/Tealium-for-Cordova/ta-p/17618)
|
||||
* @usage
|
||||
* ```
|
||||
* import { Tealium, TealConfig } from '@ionic-native/tealium';
|
||||
*
|
||||
*
|
||||
* constructor(private tealium: Tealium) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* let tealConfig: TealConfig = {
|
||||
* account: "<your-account>",
|
||||
* profile: "<your-profile>",
|
||||
* environment: "<your-environment>", // usually "dev", "qa" or "prod"
|
||||
* isLifecycleEnabled: "true", // pass "false" to disable lifecycle tracking
|
||||
* isCrashReporterEnabled: "false", // pass "true" to enable crash reporter (Android only)
|
||||
* instance: "<your-instance-name" // an arbitrary instance name. use the same instance name for all subsequent API calls
|
||||
* }
|
||||
*
|
||||
* this.tealium.init(tealConfig).then(()=>{
|
||||
* this.tealium.trackView({"screen_name": "homescreen"});
|
||||
* });
|
||||
*
|
||||
* ```
|
||||
* @interfaces
|
||||
* TealConfig
|
||||
*/
|
||||
|
||||
@Plugin({
|
||||
pluginName: 'Tealium',
|
||||
plugin: 'tealium-cordova-plugin', // npm package name, example: cordova-plugin-camera
|
||||
pluginRef: 'window.tealium', // the variable reference to call the plugin, example: navigator.geolocation
|
||||
repo: 'https://github.com/Tealium/cordova-plugin', // the github repository URL for the plugin
|
||||
platforms: ['Android', 'iOS'], // Array of platforms supported, example: ['Android', 'iOS']
|
||||
install: '', // OPTIONAL install command, in case the plugin requires variables
|
||||
})
|
||||
|
||||
@Injectable()
|
||||
export class Tealium extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* This function initializes the Tealium Cordova plugin.
|
||||
* This should usually be done inside the "deviceReady" handler.
|
||||
* @param config {TealConfig}
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
init(config: TealConfig): Promise<any> {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
* This function tracks a view event in the Tealium Cordova plugin
|
||||
* @param dataObject {any} The JSON data object containing your key-value pairs
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
trackView(dataObject: any, instanceName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function tracks a link event in the Tealium Cordova plugin
|
||||
* @param dataObject {any} The JSON data object containing your key-value pairs
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
trackEvent(dataObject: any, instanceName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function tracks a custom event in the Tealium Cordova plugin
|
||||
* @param eventType {string} The event type, link or view
|
||||
* @param dataObject {any} The JSON data object containing your key-value pairs
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
track(eventType: string, dataObject: any, instanceName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function adds data to the Tealium persistent data store
|
||||
* @param keyName {string} The key name that this data will be stored under for later retrieval
|
||||
* @param value {any} The value to be stored as persistent data
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
addPersistent(keyName: string, value: string | string[] | any, instanceName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function adds data to the Tealium volatile data store
|
||||
* @param keyName {string} The key name that this data will be stored under for later retrieval
|
||||
* @param value {any} The value to be stored as volatile data
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
addVolatile(keyName: string, value: string | string[], instanceName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function removes data from the Tealium volatile data store
|
||||
* @param keyName {string} The key name that this data will removed from the Tealium data store
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
removeVolatile(keyName: string, instanceName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function removes data from the Tealium persistent data store
|
||||
* @param keyName {string} The key name that this data will removed from the Tealium data store
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
removePersistent(keyName: string, instanceName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function retrieves a value from the Tealium Persistent data store
|
||||
* @param keyName {string} The key name that this data will retrieved from the Tealium data store
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @param callback {any} A callback function that will be called when the data has been retrieved
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
getPersistent(keyName: string, instanceName: string, callback: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* This function retrieves a value from the Tealium Volatile data store
|
||||
* @param keyName {string} The key name that this data will retrieved from the Tealium data store
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @param callback {any} A callback function that will be called when the data has been retrieved
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
getVolatile(keyName: string, instanceName: string, callback: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function adds a remote command for later execution
|
||||
* @param commandName {string} The command name for this Remote Command
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @param callback {any} A callback function that will be called when the data has been retrieved
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
addRemoteCommand(commandName: string, instanceName: string, callback: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function retrieves the Tealium Visitor ID
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
getVisitorId(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -48,9 +48,9 @@ export interface ThemeableBrowserOptions {
|
||||
|
||||
// inAppBrowser options
|
||||
location?: string;
|
||||
hidden?: string;
|
||||
clearcache?: string;
|
||||
clearsessioncache?: string;
|
||||
hidden?: boolean;
|
||||
clearcache?: boolean;
|
||||
clearsessioncache?: boolean;
|
||||
zoom?: string;
|
||||
hardwareback?: string;
|
||||
mediaPlaybackRequiresUserAction?: string;
|
||||
|
||||
@@ -58,6 +58,10 @@ export interface ThreeDeeTouchForceTouch {
|
||||
/**
|
||||
* @name 3D Touch
|
||||
* @description
|
||||
* The 3D Touch plugin adds 3D Touch capabilities to your Cordova app.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-3dtouch`. For more info, please see the [3D Touch plugin docs](https://github.com/EddyVerbruggen/cordova-plugin-3dtouch).
|
||||
*
|
||||
* @usage
|
||||
* Please do refer to the original plugin's repo for detailed usage. The usage example here might not be sufficient.
|
||||
* ```typescript
|
||||
|
||||
@@ -8,7 +8,6 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* ionic cordova plugin add cordova-plugin-uptime
|
||||
* import { Uptime } from '@ionic-native/uptime';
|
||||
*
|
||||
* constructor(private uptime: Uptime) { }
|
||||
|
||||
@@ -35,7 +35,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
@Plugin({
|
||||
pluginName: 'UserAgent',
|
||||
plugin: 'cordova-plugin-useragent',
|
||||
pluginRef: 'plugins.useragent',
|
||||
pluginRef: 'UserAgent',
|
||||
repo: 'https://github.com/danielsogl/cordova-plugin-useragent',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
|
||||
@@ -194,9 +194,14 @@ export class WebIntent extends IonicNativePlugin {
|
||||
/**
|
||||
* Registers a broadcast receiver for the specified filters
|
||||
* @param filters {any}
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
registerBroadcastReceiver(filters: any): void {}
|
||||
@Cordova({
|
||||
observable: true
|
||||
})
|
||||
registerBroadcastReceiver(filters: any): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters a broadcast receiver
|
||||
@@ -211,4 +216,14 @@ export class WebIntent extends IonicNativePlugin {
|
||||
getIntent(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a result back to the Intent that started this Activity.
|
||||
* The data can be passed using 'extras'.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
sendResult({ extras: {}}): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,197 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Webengage
|
||||
* @description
|
||||
* Ionic-Native wrapper that wraps Webengage Cordova plugin for Android and iOS
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Webengage, WebengageUser, WebengagePush, WebengageNotification } from '@ionic-native/webengage';
|
||||
*
|
||||
*
|
||||
* constructor(private webengage: Webengage, private webengageUser: WebengageUser, private webengagePush: WebengagePush, private webengageNotification: WebengageNotification ) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.webengage.engage();
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Webengage',
|
||||
plugin: 'cordova-plugin-webengage',
|
||||
pluginRef: 'webengage',
|
||||
repo: 'https://github.com/WebEngage/cordova-plugin',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Webengage extends IonicNativePlugin {
|
||||
/**
|
||||
* Initializes WebEngage SDK
|
||||
* @param {any} [config]
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
engage(config?: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets WebEngage SDK configuration
|
||||
* @param {string} key
|
||||
* @param {any} value
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
options(key: string, value: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tracks event
|
||||
* @param {string} eventName
|
||||
* @param {any} [attributes]
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
track(eventName: string, attributes?: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tracks screen
|
||||
* @param {string} eventName
|
||||
* @param {any} [screenData]
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
screen(screenName: string, screenData?: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Webengage',
|
||||
plugin: 'cordova-plugin-webengage',
|
||||
pluginRef: 'webengage.user'
|
||||
})
|
||||
@Injectable()
|
||||
export class WebengageUser extends IonicNativePlugin {
|
||||
/**
|
||||
* Logs user in
|
||||
* @param {string} userId
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
login(userId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user out
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
logout(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets user attribute
|
||||
* @param {string} key
|
||||
* @param {any} value
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setAttribute(key: string, value: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Webengage',
|
||||
plugin: 'cordova-plugin-webengage',
|
||||
pluginRef: 'webengage.push'
|
||||
})
|
||||
@Injectable()
|
||||
export class WebengagePush extends IonicNativePlugin {
|
||||
/**
|
||||
* Callback function is invoked when a push notification is clicked
|
||||
* @param {any} callback
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
onClick(callback: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets push notification configuration
|
||||
* @param {string} key
|
||||
* @param {any} value
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
options(key: string, value: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Webengage',
|
||||
plugin: 'cordova-plugin-webengage',
|
||||
pluginRef: 'webengage.notification'
|
||||
})
|
||||
@Injectable()
|
||||
export class WebengageNotification extends IonicNativePlugin {
|
||||
/**
|
||||
* Callback function is invoked when a in-app notification is shown
|
||||
* @param {any} callback
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
onShown(callback: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function is invoked when a in-app notification is clicked
|
||||
* @param {any} callback
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
onClick(callback: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function is invoked when a in-app notification is dismissed
|
||||
* @param {any} callback
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
onDismiss(callback: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets in-app notification configuration
|
||||
* @param {string} key
|
||||
* @param {any} value
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
options(key: string, value: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name In App Review
|
||||
* @description
|
||||
* This plugin does use the iOS class SKStoreReviewController to open the inApp review popup available since iOS 10.3
|
||||
*
|
||||
* This functionality only works on iOS devices
|
||||
*
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { InAppReview } from '@ionic-native/in-app-review';
|
||||
*
|
||||
*
|
||||
* constructor(private inAppReview: InAppReview) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.inAppReview.requestReview()
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'InAppReview',
|
||||
plugin: 'com.omarben.inappreview',
|
||||
pluginRef: 'inappreview',
|
||||
repo: 'https://github.com/omaxlive/com.omarben.inappreview',
|
||||
platforms: ['iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class InAppReview extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Open the inApp review popup
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
requestReview(): Promise<any> {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user