mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-02-16 00:00:02 +08:00
Compare commits
61 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 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,3 +5,4 @@ node_modules/
|
||||
aot/
|
||||
scripts/ionic-native-bower
|
||||
dist/
|
||||
|
||||
|
||||
193
CHANGELOG.md
193
CHANGELOG.md
@@ -1,10 +1,113 @@
|
||||
<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))
|
||||
* **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))
|
||||
|
||||
|
||||
@@ -36,7 +139,7 @@
|
||||
* **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))
|
||||
* **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))
|
||||
@@ -86,12 +189,12 @@
|
||||
|
||||
### 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))
|
||||
@@ -103,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))
|
||||
|
||||
|
||||
@@ -115,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))
|
||||
@@ -144,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))
|
||||
|
||||
@@ -233,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)
|
||||
|
||||
|
||||
|
||||
@@ -244,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)
|
||||
|
||||
|
||||
|
||||
@@ -270,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))
|
||||
|
||||
|
||||
@@ -287,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))
|
||||
@@ -332,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))
|
||||
@@ -426,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)
|
||||
|
||||
|
||||
|
||||
@@ -657,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))
|
||||
@@ -666,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)
|
||||
@@ -716,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)
|
||||
|
||||
|
||||
|
||||
@@ -763,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))
|
||||
|
||||
|
||||
@@ -836,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)
|
||||
|
||||
|
||||
|
||||
@@ -862,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
|
||||
@@ -914,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>
|
||||
@@ -1030,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))
|
||||
@@ -1261,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)
|
||||
|
||||
|
||||
|
||||
@@ -1384,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)
|
||||
@@ -1600,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))
|
||||
@@ -1621,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))
|
||||
@@ -1718,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)
|
||||
|
||||
|
||||
|
||||
|
||||
35
README.md
35
README.md
@@ -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.
|
||||
@@ -68,9 +68,9 @@ export class MyComponent {
|
||||
// to stop watching
|
||||
watch.unsubscribe();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
@@ -92,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');
|
||||
});
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -101,9 +101,7 @@ 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:
|
||||
@@ -126,37 +124,26 @@ class CameraMock extends Camera {
|
||||
}
|
||||
|
||||
@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: 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
|
||||
|
||||
33
gulpfile.js
33
gulpfile.js
@@ -1,8 +1,8 @@
|
||||
"use strict";
|
||||
'use strict';
|
||||
|
||||
const gulp = require('gulp'),
|
||||
minimist = require('minimist'),
|
||||
rename = require("gulp-rename"),
|
||||
rename = require('gulp-rename'),
|
||||
tslint = require('gulp-tslint'),
|
||||
replace = require('gulp-replace'),
|
||||
_ = require('lodash');
|
||||
@@ -10,41 +10,44 @@ const gulp = require('gulp'),
|
||||
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');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
|
||||
};
|
||||
|
||||
4678
package-lock.json
generated
4678
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
37
package.json
37
package.json
@@ -1,45 +1,44 @@
|
||||
{
|
||||
"name": "ionic-native",
|
||||
"version": "4.9.2",
|
||||
"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.8.8",
|
||||
"@types/node": "^8.10.20",
|
||||
"@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",
|
||||
"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.99.1",
|
||||
"karma": "^1.7.0",
|
||||
"jasmine-core": "^3.2.1",
|
||||
"karma": "^2.0.5",
|
||||
"karma-cli": "^1.0.1",
|
||||
"karma-jasmine": "^1.1.2",
|
||||
"karma-phantomjs-launcher": "^1.0.4",
|
||||
"karma-typescript": "^3.0.12",
|
||||
"karma-typescript": "^3.0.13",
|
||||
"karma-typescript-es6-transform": "^1.0.4",
|
||||
"lodash": "4.17.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.11",
|
||||
"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",
|
||||
|
||||
@@ -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!');
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 { Observable } from 'rxjs/Observable';
|
||||
import { _throw } from 'rxjs/observable/throw';
|
||||
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import {
|
||||
checkAvailability,
|
||||
instanceAvailability,
|
||||
overrideFunction,
|
||||
wrap,
|
||||
wrapInstance
|
||||
} from './plugin';
|
||||
import { checkAvailability, instanceAvailability, overrideFunction, wrap, wrapInstance } from './plugin';
|
||||
import { getPlugin, getPromise } from './util';
|
||||
|
||||
export interface PluginConfig {
|
||||
|
||||
@@ -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'
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
336
src/@ionic-native/plugins/abbyy-rtr/index.ts
Normal file
336
src/@ionic-native/plugins/abbyy-rtr/index.ts
Normal file
@@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -12,20 +12,38 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
* ```typescript
|
||||
* import { AES256 } from '@ionic-native/aes-256';
|
||||
*
|
||||
*
|
||||
* constructor(private aES256: AES256) { }
|
||||
* 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('12345678123456781234567812345678', '1234567812345678', 'testdata')
|
||||
* this.aes256.encrypt(this.secureKey, this.secureIV, 'testdata')
|
||||
* .then(res => console.log('Encrypted Data: ',res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* this.aES256.decrypt('12345678123456781234567812345678', '1234567812345678', 'encryptedData')
|
||||
* 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({
|
||||
@@ -63,4 +81,26 @@ export class AES256 extends IonicNativePlugin {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
1065
src/@ionic-native/plugins/bluetooth-le/index.ts
Normal file
1065
src/@ionic-native/plugins/bluetooth-le/index.ts
Normal file
File diff suppressed because it is too large
Load Diff
366
src/@ionic-native/plugins/class-kit/index.ts
Normal file
366
src/@ionic-native/plugins/class-kit/index.ts
Normal file
@@ -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;
|
||||
}
|
||||
}
|
||||
592
src/@ionic-native/plugins/clevertap/index.ts
Normal file
592
src/@ionic-native/plugins/clevertap/index.ts
Normal file
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -306,6 +306,7 @@ export class ContactFindOptions implements IContactFindOptions {
|
||||
* @description
|
||||
* Access and manage Contacts on the device.
|
||||
*
|
||||
* @deprecated
|
||||
* @usage
|
||||
*
|
||||
* ```typescript
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
425
src/@ionic-native/plugins/fabric/index.ts
Normal file
425
src/@ionic-native/plugins/fabric/index.ts
Normal file
@@ -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,6 +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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the deferred app link
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -17,7 +17,6 @@ export enum ELocalNotificationTriggerUnit {
|
||||
}
|
||||
|
||||
export interface ILocalNotificationTrigger {
|
||||
|
||||
/** ***** FIX ***** */
|
||||
|
||||
/**
|
||||
@@ -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,8 +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;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -458,7 +460,6 @@ export interface ILocalNotification {
|
||||
})
|
||||
@Injectable()
|
||||
export class LocalNotifications extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Schedules a single or multiple notifications
|
||||
* @param options {Notification | Array<ILocalNotification>} optional
|
||||
@@ -466,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.
|
||||
@@ -475,7 +476,7 @@ export class LocalNotifications extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
update(options?: ILocalNotification): void { }
|
||||
update(options?: ILocalNotification): void {}
|
||||
|
||||
/**
|
||||
* Clears single or multiple notifications
|
||||
@@ -483,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
|
||||
@@ -498,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
|
||||
@@ -513,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
|
||||
@@ -521,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
|
||||
@@ -529,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
|
||||
@@ -558,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
|
||||
@@ -566,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
|
||||
@@ -574,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
|
||||
@@ -618,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
|
||||
@@ -626,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
|
||||
@@ -634,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.
|
||||
@@ -643,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.
|
||||
@@ -652,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
|
||||
@@ -664,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.
|
||||
@@ -674,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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
* .then(address => console.info(`IP: ${address.ip}, Subnet: ${address.subnet}`))
|
||||
* .catch(error => console.error(`Unable to get IP: ${error}`));
|
||||
*
|
||||
* this.networkInterface.getCarrierIPAddress() {
|
||||
* this.networkInterface.getCarrierIPAddress()
|
||||
* .then(address => console.info(`IP: ${address.ip}, Subnet: ${address.subnet}`))
|
||||
* .catch(error => console.error(`Unable to get IP: ${error}`));
|
||||
*
|
||||
|
||||
@@ -89,7 +89,8 @@ export class Network extends IonicNativePlugin {
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'offline'
|
||||
event: 'offline',
|
||||
element: document
|
||||
})
|
||||
onDisconnect(): Observable<any> {
|
||||
return;
|
||||
@@ -101,7 +102,8 @@ export class Network extends IonicNativePlugin {
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'online'
|
||||
event: 'online',
|
||||
element: document
|
||||
})
|
||||
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; }
|
||||
|
||||
@@ -700,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,7 @@ export interface GetLibraryOptions {
|
||||
chunkTimeSec?: number;
|
||||
useOriginalFileNames?: boolean;
|
||||
includeAlbumData?: boolean;
|
||||
includeVideos?: boolean;
|
||||
maxItems?: number;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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']
|
||||
})
|
||||
|
||||
197
src/@ionic-native/plugins/webengage/index.ts
Normal file
197
src/@ionic-native/plugins/webengage/index.ts
Normal file
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user