Compare commits

..
Author SHA1 Message Date
Daniel Sogl 674e80ee61 chore(): update changelog 2019-01-20 17:49:40 +01:00
Daniel Sogl 7e817a0223 5.0.0-beta.24 2019-01-20 17:49:32 +01:00
Daniel Sogl 2efc5b2e2c chore(lint): ignore unused rule 2019-01-20 17:46:43 +01:00
Daniel Sogl 3f65ce1c7e chore(package): bump deps 2019-01-20 17:44:29 +01:00
Daniel Sogl 2d49671282 refactor(admob): add decorators 2019-01-20 17:40:40 +01:00
Daniel Sogl a9dbb23b23 Merge branch 'master' into v5 2019-01-20 17:37:35 +01:00
Marc KassayandDaniel Sogl 34ecd29d9f feat(audio-management): add plugin for audio streams (#2877)
* feat(audio-management): add plugin for audio streams

* Update index.ts
2019-01-19 09:25:51 +01:00
Ibby Hadeed 651a40f784 chore(): update changelog 2019-01-08 07:06:18 -05:00
Ibby Hadeed f420d2b830 5.0.0-beta.23 2019-01-08 07:06:12 -05:00
Ibby Hadeed e374b52c59 feat: add analytics-firebase plugin 2019-01-08 07:06:05 -05:00
Andrew CritesandDaniel Sogl 8e405cc3d3 feat(blinkid): add plugin (#2833)
* feat(blinkid): add plugin

* fix(blinkid): type name corrections
2019-01-04 22:06:25 +01:00
Daniel 7483c3554c chore(): bump deps 2018-12-07 13:41:16 +01:00
Daniel 06634dc5f4 chore(): update changelog 2018-12-01 17:07:08 +01:00
Daniel 8879ffb789 5.0.0-beta.22 2018-12-01 17:06:42 +01:00
Daniel 649dca1ef4 chore: update deps
BREAKING CHANGE: Requires Angular 7.1 and TypeScript 3.1
2018-12-01 17:04:03 +01:00
Daniel 165c3cc211 Merge branch 'master' into v5 2018-12-01 16:55:01 +01:00
Simon Bang TerkildsenandDaniel Sogl 31e4058257 fix(local-notifications): update type of the every property (#2825) 2018-12-01 16:06:27 +01:00
Luka313andDaniel Sogl b9e9aa184e feat(downloader): add plugin (#2820)
* feat(downloader): add plugin

* Update index.ts
2018-12-01 15:48:11 +01:00
mhartington 220e22b659 docs(): add ngx import path 2018-10-10 16:13:45 -05:00
Perry GovierandDaniel Sogl ac78a1540c chore(tidy up): getting rid of redundant code to make TSDoc happy (#2747) 2018-09-27 08:05:08 +02:00
Daniel bdd1755f8b chore(): update changelog 2018-09-25 20:37:32 +02:00
Daniel 3ed39c06ed 5.0.0-beta.21 2018-09-25 20:37:24 +02:00
Daniel 89a5ca7ec5 merge master into v5 2018-09-25 20:29:32 +02:00
Daniel 0422521db6 chore(package): bump deps 2018-09-25 20:12:57 +02:00
Ken SodemannandGitHub 8d57df3e64 fix(keyboard): include the mode parameter in setResizeMode() 2018-09-25 10:12:24 -05:00
Ken SodemannandDaniel Sogl fbf7463724 fix(keyboard): use cordova-plugin-ionic-keyboard (#2743)
Previous was using the deprecated keyboard plugin.

Fixes #2306
2018-09-25 16:45:43 +02:00
somqandDaniel Sogl cbeb4139d9 fix(bluetooth-le): Removed a wrong cordova decorator param (#2733)
* fix(bluetooth-le): Removed a wrong cordova decorator param (v5)

* fix(bluetooth-le): Fixed wrong return encapsulation - removed 'result' prop - for methods read and subscribe
2018-09-25 16:44:42 +02:00
Tom SeldonandDaniel Sogl 457d47cc16 fix(secure-storage): add missing "getPromise" import (#2727) 2018-09-25 16:42:31 +02:00
Daniel 358474dcfd fix(build): fix macos mojave build errors 2018-09-25 11:06:10 +02:00
Daniel d6d9b54991 chore(package): cleanup deps 2018-09-25 11:04:22 +02:00
Daniel 93ff513bd8 chore(package): bump deps 2018-09-24 19:16:55 +02:00
Daniel d3af51915e Revert "chore(pacakge): bump deps"
This reverts commit 276c88dea1.
2018-09-24 19:14:04 +02:00
Daniel 276c88dea1 chore(pacakge): bump deps 2018-09-24 19:08:57 +02:00
Daniel 653f5a2969 fix(secure-storage): import getPromise 2018-09-24 19:07:06 +02:00
Daniel e661f2ece9 fix(screenshot): import getPromise 2018-09-24 19:06:55 +02:00
Daniel 15cd285ec6 fix(printer): import getPromise 2018-09-24 19:06:40 +02:00
Daniel SoglandGitHub 95b92623a6 fix(admob-free): fix duplicated class 2018-09-24 18:59:51 +02:00
Daniel 7aa5e00453 chore(): update changelog 2018-09-18 19:23:27 +02:00
Daniel 59fd0cc50d 5.0.0-beta.20 2018-09-18 19:23:22 +02:00
Max LynchandDaniel c433317051 fix(build): Fix TypeScript bug, wrong type exported for wrap fn 2018-09-18 19:23:00 +02:00
239 changed files with 7746 additions and 3228 deletions
+66 -114
View File
@@ -1,4 +1,68 @@
<a name="5.0.0-beta.19"></a>
# [5.0.0-beta.24](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.23...v5.0.0-beta.24) (2019-01-20)
# [5.0.0-beta.23](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.22...v5.0.0-beta.23) (2019-01-19)
### Features
* add analytics-firebase plugin ([e374b52](https://github.com/ionic-team/ionic-native/commit/e374b52))
* **audio-management:** add plugin for audio streams ([#2877](https://github.com/ionic-team/ionic-native/issues/2877)) ([34ecd29](https://github.com/ionic-team/ionic-native/commit/34ecd29))
* **blinkid:** add plugin ([#2833](https://github.com/ionic-team/ionic-native/issues/2833)) ([8e405cc](https://github.com/ionic-team/ionic-native/commit/8e405cc))
# [5.0.0-beta.22](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.21...v5.0.0-beta.22) (2018-12-01)
### Bug Fixes
* **local-notifications:** update type of the every property ([#2825](https://github.com/ionic-team/ionic-native/issues/2825)) ([31e4058](https://github.com/ionic-team/ionic-native/commit/31e4058))
### chore
* update deps ([649dca1](https://github.com/ionic-team/ionic-native/commit/649dca1))
### Features
* **downloader:** add plugin ([#2820](https://github.com/ionic-team/ionic-native/issues/2820)) ([b9e9aa1](https://github.com/ionic-team/ionic-native/commit/b9e9aa1))
### BREAKING CHANGES
* Requires Angular 7.1 and TypeScript 3.1
# [5.0.0-beta.21](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.20...v5.0.0-beta.21) (2018-09-25)
### Bug Fixes
* **admob-free:** fix duplicated class ([95b9262](https://github.com/ionic-team/ionic-native/commit/95b9262))
* **bluetooth-le:** Removed a wrong cordova decorator param ([#2733](https://github.com/ionic-team/ionic-native/issues/2733)) ([cbeb413](https://github.com/ionic-team/ionic-native/commit/cbeb413))
* **build:** fix macos mojave build errors ([358474d](https://github.com/ionic-team/ionic-native/commit/358474d))
* **keyboard:** include the mode parameter in setResizeMode() ([8d57df3](https://github.com/ionic-team/ionic-native/commit/8d57df3))
* **keyboard:** use cordova-plugin-ionic-keyboard ([#2743](https://github.com/ionic-team/ionic-native/issues/2743)) ([fbf7463](https://github.com/ionic-team/ionic-native/commit/fbf7463)), closes [#2306](https://github.com/ionic-team/ionic-native/issues/2306)
* **printer:** import getPromise ([15cd285](https://github.com/ionic-team/ionic-native/commit/15cd285))
* **screenshot:** import getPromise ([e661f2e](https://github.com/ionic-team/ionic-native/commit/e661f2e))
* **secure-storage:** add missing "getPromise" import ([#2727](https://github.com/ionic-team/ionic-native/issues/2727)) ([457d47c](https://github.com/ionic-team/ionic-native/commit/457d47c))
* **secure-storage:** import getPromise ([653f5a2](https://github.com/ionic-team/ionic-native/commit/653f5a2))
# [5.0.0-beta.20](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.19...v5.0.0-beta.20) (2018-09-18)
### Bug Fixes
* **build:** Fix TypeScript bug, wrong type exported for wrap fn ([c433317](https://github.com/ionic-team/ionic-native/commit/c433317))
# [5.0.0-beta.19](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.18...v5.0.0-beta.19) (2018-09-18)
@@ -10,7 +74,6 @@
<a name="5.0.0-beta.18"></a>
# [5.0.0-beta.18](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.14...v5.0.0-beta.18) (2018-09-15)
@@ -24,7 +87,6 @@
<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)
@@ -42,7 +104,6 @@
<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)
@@ -53,7 +114,6 @@
<a name="4.9.1"></a>
## [4.9.1](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.13...v4.9.1) (2018-07-09)
@@ -71,7 +131,6 @@
<a name="5.0.0-beta.13"></a>
# [5.0.0-beta.13](https://github.com/ionic-team/ionic-native/compare/v4.9.0...v5.0.0-beta.13) (2018-06-28)
@@ -92,7 +151,6 @@
<a name="5.0.0-beta.12"></a>
# [5.0.0-beta.12](https://github.com/ionic-team/ionic-native/compare/v4.8.0...v5.0.0-beta.12) (2018-06-23)
@@ -148,7 +206,6 @@
<a name="4.7.0"></a>
# [4.7.0](https://github.com/ionic-team/ionic-native/compare/v4.6.0...v4.7.0) (2018-04-09)
@@ -223,12 +280,10 @@
<a name="5.0.0-beta.4"></a>
# [5.0.0-beta.4](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.3...v5.0.0-beta.4) (2017-12-29)
<a name="5.0.0-beta.3"></a>
# [5.0.0-beta.3](https://github.com/ionic-team/ionic-native/compare/v4.5.1...v5.0.0-beta.3) (2017-12-29)
@@ -243,7 +298,6 @@
<a name="4.5.1"></a>
## [4.5.1](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.0...v4.5.1) (2017-12-12)
@@ -253,7 +307,6 @@
<a name="5.0.0-beta.0"></a>
# [5.0.0-beta.0](https://github.com/ionic-team/ionic-native/compare/v4.5.0...v5.0.0-beta.0) (2017-12-08)
@@ -293,17 +346,14 @@
<a name="4.4.2"></a>
## [4.4.2](https://github.com/ionic-team/ionic-native/compare/v4.4.1...v4.4.2) (2017-11-15)
<a name="4.4.1"></a>
## [4.4.1](https://github.com/ionic-team/ionic-native/compare/v4.4.0...v4.4.1) (2017-11-13)
<a name="4.4.0"></a>
# [4.4.0](https://github.com/ionic-team/ionic-native/compare/v4.3.3...v4.4.0) (2017-11-09)
@@ -314,7 +364,6 @@
<a name="4.3.3"></a>
## [4.3.3](https://github.com/ionic-team/ionic-native/compare/4.3.2...v4.3.3) (2017-11-01)
@@ -324,7 +373,6 @@
<a name="4.3.2"></a>
## [4.3.2](https://github.com/ionic-team/ionic-native/compare/4.3.1...4.3.2) (2017-10-17)
@@ -339,7 +387,6 @@
<a name="4.3.1"></a>
## [4.3.1](https://github.com/ionic-team/ionic-native/compare/v4.3.0...4.3.1) (2017-10-06)
@@ -357,7 +404,6 @@
<a name="4.3.0"></a>
# [4.3.0](https://github.com/ionic-team/ionic-native/compare/v4.2.1...v4.3.0) (2017-09-27)
@@ -390,7 +436,6 @@
<a name="4.2.0"></a>
# [4.2.0](https://github.com/ionic-team/ionic-native/compare/v4.1.0...v4.2.0) (2017-08-26)
@@ -417,7 +462,6 @@
<a name="4.1.0"></a>
# [4.1.0](https://github.com/ionic-team/ionic-native/compare/v4.0.1...v4.1.0) (2017-07-21)
@@ -435,7 +479,6 @@
<a name="4.0.1"></a>
## [4.0.1](https://github.com/ionic-team/ionic-native/compare/v4.0.0...v4.0.1) (2017-07-15)
@@ -453,7 +496,6 @@
<a name="4.0.0"></a>
# [4.0.0](https://github.com/ionic-team/ionic-native/compare/v3.14.0...v4.0.0) (2017-07-11)
@@ -496,7 +538,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.14.0"></a>
# [3.14.0](https://github.com/ionic-team/ionic-native/compare/v3.13.1...v3.14.0) (2017-07-07)
@@ -506,7 +547,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.13.1"></a>
## [3.13.1](https://github.com/ionic-team/ionic-native/compare/v3.13.0...v3.13.1) (2017-07-05)
@@ -522,7 +562,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.13.0"></a>
# [3.13.0](https://github.com/ionic-team/ionic-native/compare/v3.12.2...v3.13.0) (2017-07-03)
@@ -533,7 +572,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.12.2"></a>
## [3.12.2](https://github.com/ionic-team/ionic-native/compare/v3.12.1...v3.12.2) (2017-07-03)
@@ -554,7 +592,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.12.1"></a>
## [3.12.1](https://github.com/ionic-team/ionic-native/compare/v3.12.0...v3.12.1) (2017-06-03)
@@ -569,7 +606,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.12.0"></a>
# [3.12.0](https://github.com/ionic-team/ionic-native/compare/v3.11.0...v3.12.0) (2017-06-03)
@@ -581,7 +617,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.11.0"></a>
# [3.11.0](https://github.com/ionic-team/ionic-native/compare/v3.10.2...v3.11.0) (2017-06-01)
@@ -598,7 +633,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.10.2"></a>
## [3.10.2](https://github.com/ionic-team/ionic-native/compare/v3.10.1...v3.10.2) (2017-05-20)
@@ -608,7 +642,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.10.0"></a>
# [3.10.0](https://github.com/ionic-team/ionic-native/compare/v3.9.2...v3.10.0) (2017-05-19)
@@ -624,7 +657,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.9.2"></a>
## [3.9.2](https://github.com/ionic-team/ionic-native/compare/v3.9.1...v3.9.2) (2017-05-17)
@@ -635,7 +667,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.9.1"></a>
## [3.9.1](https://github.com/ionic-team/ionic-native/compare/v3.9.0...v3.9.1) (2017-05-17)
@@ -645,7 +676,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.9.0"></a>
# [3.9.0](https://github.com/ionic-team/ionic-native/compare/v3.8.1...v3.9.0) (2017-05-17)
@@ -669,7 +699,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.8.1"></a>
## [3.8.1](https://github.com/ionic-team/ionic-native/compare/v3.8.0...v3.8.1) (2017-05-16)
@@ -688,7 +717,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.8.0"></a>
# [3.8.0](https://github.com/ionic-team/ionic-native/compare/v3.7.0...v3.8.0) (2017-05-14)
@@ -707,7 +735,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.7.0"></a>
# [3.7.0](https://github.com/ionic-team/ionic-native/compare/v3.6.0...v3.7.0) (2017-05-09)
@@ -752,7 +779,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.6.0"></a>
# [3.6.0](https://github.com/ionic-team/ionic-native/compare/v3.5.0...v3.6.0) (2017-04-27)
@@ -768,7 +794,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.5.0"></a>
# [3.5.0](https://github.com/ionic-team/ionic-native/compare/v3.4.4...v3.5.0) (2017-04-18)
@@ -786,7 +811,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.4.4"></a>
## [3.4.4](https://github.com/ionic-team/ionic-native/compare/v3.4.3...v3.4.4) (2017-03-30)
@@ -796,7 +820,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.4.3"></a>
## [3.4.3](https://github.com/ionic-team/ionic-native/compare/v3.4.2...v3.4.3) (2017-03-29)
@@ -814,7 +837,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.4.1"></a>
## [3.4.1](https://github.com/ionic-team/ionic-native/compare/v3.4.0...v3.4.1) (2017-03-28)
@@ -826,7 +848,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.4.0"></a>
# [3.4.0](https://github.com/ionic-team/ionic-native/compare/v3.3.1...v3.4.0) (2017-03-28)
@@ -844,7 +865,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.3.1"></a>
## [3.3.1](https://github.com/ionic-team/ionic-native/compare/v3.3.0...v3.3.1) (2017-03-28)
@@ -864,7 +884,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.3.0"></a>
# [3.3.0](https://github.com/ionic-team/ionic-native/compare/v3.2.3...v3.3.0) (2017-03-27)
@@ -875,7 +894,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.2.3"></a>
## [3.2.3](https://github.com/ionic-team/ionic-native/compare/v3.2.2...v3.2.3) (2017-03-24)
@@ -886,12 +904,10 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.2.2"></a>
## [3.2.2](https://github.com/ionic-team/ionic-native/compare/v3.2.1...v3.2.2) (2017-03-23)
<a name="3.2.1"></a>
## [3.2.1](https://github.com/ionic-team/ionic-native/compare/v3.2.0...v3.2.1) (2017-03-23)
@@ -901,7 +917,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.2.0"></a>
# [3.2.0](https://github.com/ionic-team/ionic-native/compare/v3.1.1...v3.2.0) (2017-03-22)
@@ -916,7 +931,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.1.1"></a>
## [3.1.1](https://github.com/ionic-team/ionic-native/compare/v3.1.0...v3.1.1) (2017-03-21)
@@ -926,7 +940,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="3.1.0"></a>
# [3.1.0](https://github.com/ionic-team/ionic-native/compare/v2.9.0...v3.1.0) (2017-03-20)
@@ -936,7 +949,7 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
* **music-controls:** fix return types for methods ([f3407e5](https://github.com/ionic-team/ionic-native/commit/f3407e5))
### Chores
### chore
* 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)
@@ -992,7 +1005,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.9.0"></a>
# [2.9.0](https://github.com/ionic-team/ionic-native/compare/v2.8.1...v2.9.0) (2017-03-18)
@@ -1007,7 +1019,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.8.1"></a>
## [2.8.1](https://github.com/ionic-team/ionic-native/compare/v2.8.0...v2.8.1) (2017-03-10)
@@ -1025,7 +1036,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.8.0"></a>
# [2.8.0](https://github.com/ionic-team/ionic-native/compare/v2.7.0...v2.8.0) (2017-03-04)
@@ -1042,7 +1052,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.7.0"></a>
# [2.7.0](https://github.com/ionic-team/ionic-native/compare/v2.6.0...v2.7.0) (2017-03-02)
@@ -1060,7 +1069,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.6.0"></a>
# [2.6.0](https://github.com/ionic-team/ionic-native/compare/v2.5.1...v2.6.0) (2017-03-02)
@@ -1100,7 +1108,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.5.1"></a>
## [2.5.1](https://github.com/ionic-team/ionic-native/compare/v2.5.0...v2.5.1) (2017-02-07)
@@ -1110,7 +1117,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.5.0"></a>
# [2.5.0](https://github.com/ionic-team/ionic-native/compare/v2.4.1...v2.5.0) (2017-02-07)
@@ -1129,7 +1135,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.4.1"></a>
## [2.4.1](https://github.com/ionic-team/ionic-native/compare/v2.4.0...v2.4.1) (2017-01-24)
@@ -1145,12 +1150,10 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.3.2"></a>
## [2.3.2](https://github.com/ionic-team/ionic-native/compare/v2.3.1...v2.3.2) (2017-01-24)
<a name="2.3.1"></a>
## [2.3.1](https://github.com/ionic-team/ionic-native/compare/v2.3.0...v2.3.1) (2017-01-24)
@@ -1171,7 +1174,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.3.0"></a>
# [2.3.0](https://github.com/ionic-team/ionic-native/compare/v2.2.17...v2.3.0) (2017-01-20)
@@ -1196,7 +1198,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.2.17"></a>
## [2.2.17](https://github.com/ionic-team/ionic-native/compare/v2.2.16...v2.2.17) (2017-01-20)
@@ -1207,7 +1208,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.2.16"></a>
## [2.2.16](https://github.com/ionic-team/ionic-native/compare/v2.2.15...v2.2.16) (2017-01-11)
@@ -1217,7 +1217,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.2.15"></a>
## [2.2.15](https://github.com/ionic-team/ionic-native/compare/v2.2.14...v2.2.15) (2017-01-11)
@@ -1229,7 +1228,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.2.14"></a>
## [2.2.14](https://github.com/ionic-team/ionic-native/compare/v2.2.13...v2.2.14) (2017-01-07)
@@ -1250,7 +1248,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.2.13"></a>
## [2.2.13](https://github.com/ionic-team/ionic-native/compare/v2.2.12...v2.2.13) (2016-12-27)
@@ -1271,7 +1268,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.2.12"></a>
## [2.2.12](https://github.com/ionic-team/ionic-native/compare/v2.2.11...v2.2.12) (2016-12-18)
@@ -1289,7 +1285,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.2.11"></a>
## [2.2.11](https://github.com/ionic-team/ionic-native/compare/v2.2.10...v2.2.11) (2016-12-06)
@@ -1305,7 +1300,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.2.10"></a>
## [2.2.10](https://github.com/ionic-team/ionic-native/compare/v2.2.8...v2.2.10) (2016-12-04)
@@ -1323,7 +1317,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.2.8"></a>
## [2.2.8](https://github.com/ionic-team/ionic-native/compare/v2.2.7...v2.2.8) (2016-12-01)
@@ -1341,7 +1334,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.2.7"></a>
## [2.2.7](https://github.com/ionic-team/ionic-native/compare/v2.2.5...v2.2.7) (2016-11-24)
@@ -1368,7 +1360,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.2.5"></a>
## [2.2.5](https://github.com/ionic-team/ionic-native/compare/v2.2.4...v2.2.5) (2016-10-27)
@@ -1391,7 +1382,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.2.4"></a>
## [2.2.4](https://github.com/ionic-team/ionic-native/compare/v2.2.3...v2.2.4) (2016-10-15)
@@ -1408,7 +1398,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.2.3"></a>
## [2.2.3](https://github.com/ionic-team/ionic-native/compare/v2.2.2...v2.2.3) (2016-10-14)
@@ -1419,7 +1408,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.2.2"></a>
## [2.2.2](https://github.com/ionic-team/ionic-native/compare/v2.2.1...v2.2.2) (2016-10-12)
@@ -1435,7 +1423,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.2.1"></a>
## [2.2.1](https://github.com/ionic-team/ionic-native/compare/v2.2.0...v2.2.1) (2016-10-12)
@@ -1455,7 +1442,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.2.0"></a>
# [2.2.0](https://github.com/ionic-team/ionic-native/compare/v2.1.9...v2.2.0) (2016-10-11)
@@ -1471,7 +1457,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.1.9"></a>
## [2.1.9](https://github.com/ionic-team/ionic-native/compare/v2.1.7...v2.1.9) (2016-10-09)
@@ -1484,7 +1469,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.1.7"></a>
## [2.1.7](https://github.com/ionic-team/ionic-native/compare/v2.1.6...v2.1.7) (2016-10-07)
@@ -1494,7 +1478,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.1.6"></a>
## [2.1.6](https://github.com/ionic-team/ionic-native/compare/v2.1.3...v2.1.6) (2016-10-06)
@@ -1505,7 +1488,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.1.3"></a>
## [2.1.3](https://github.com/ionic-team/ionic-native/compare/v2.1.2...v2.1.3) (2016-10-06)
@@ -1517,7 +1499,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.1.2"></a>
## [2.1.2](https://github.com/ionic-team/ionic-native/compare/v2.1.0...v2.1.2) (2016-10-06)
@@ -1532,7 +1513,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.1.0"></a>
# [2.1.0](https://github.com/ionic-team/ionic-native/compare/v2.0.3...v2.1.0) (2016-10-03)
@@ -1562,7 +1542,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="2.0.3"></a>
## [2.0.3](https://github.com/ionic-team/ionic-native/compare/v1.3.21...v2.0.3) (2016-09-24)
@@ -1592,7 +1571,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.3.21"></a>
## [1.3.21](https://github.com/ionic-team/ionic-native/compare/v1.3.20...v1.3.21) (2016-09-07)
@@ -1624,7 +1602,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.3.20"></a>
## [1.3.20](https://github.com/ionic-team/ionic-native/compare/v1.3.19...v1.3.20) (2016-08-27)
@@ -1643,7 +1620,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.3.19"></a>
## [1.3.19](https://github.com/ionic-team/ionic-native/compare/v1.3.18...v1.3.19) (2016-08-27)
@@ -1665,7 +1641,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.3.18"></a>
## [1.3.18](https://github.com/ionic-team/ionic-native/compare/v1.3.17...v1.3.18) (2016-08-26)
@@ -1686,7 +1661,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.3.17"></a>
## [1.3.17](https://github.com/ionic-team/ionic-native/compare/v1.3.16...v1.3.17) (2016-08-23)
@@ -1706,7 +1680,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.3.16"></a>
## [1.3.16](https://github.com/ionic-team/ionic-native/compare/v1.3.15...v1.3.16) (2016-08-15)
@@ -1716,7 +1689,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.3.15"></a>
## [1.3.15](https://github.com/ionic-team/ionic-native/compare/v1.3.14...v1.3.15) (2016-08-15)
@@ -1727,7 +1699,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.3.14"></a>
## [1.3.14](https://github.com/ionic-team/ionic-native/compare/v1.3.12...v1.3.14) (2016-08-15)
@@ -1745,7 +1716,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.3.12"></a>
## [1.3.12](https://github.com/ionic-team/ionic-native/compare/v1.3.11...v1.3.12) (2016-08-13)
@@ -1755,7 +1725,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.3.11"></a>
## [1.3.11](https://github.com/ionic-team/ionic-native/compare/v1.3.10...v1.3.11) (2016-08-11)
@@ -1780,7 +1749,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.3.10"></a>
## [1.3.10](https://github.com/ionic-team/ionic-native/compare/v1.3.9...v1.3.10) (2016-08-01)
@@ -1799,7 +1767,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.3.9"></a>
## [1.3.9](https://github.com/ionic-team/ionic-native/compare/v1.3.8...v1.3.9) (2016-07-23)
@@ -1815,7 +1782,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.3.8"></a>
## [1.3.8](https://github.com/ionic-team/ionic-native/compare/v1.3.7...v1.3.8) (2016-07-20)
@@ -1834,7 +1800,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.3.7"></a>
## [1.3.7](https://github.com/ionic-team/ionic-native/compare/v1.3.6...v1.3.7) (2016-07-18)
@@ -1850,7 +1815,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.3.6"></a>
## [1.3.6](https://github.com/ionic-team/ionic-native/compare/v1.3.5...v1.3.6) (2016-07-17)
@@ -1867,7 +1831,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.3.5"></a>
## [1.3.5](https://github.com/ionic-team/ionic-native/compare/v1.3.4...v1.3.5) (2016-07-17)
@@ -1887,7 +1850,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.3.4"></a>
## [1.3.4](https://github.com/ionic-team/ionic-native/compare/v1.3.3...v1.3.4) (2016-07-14)
@@ -1902,7 +1864,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.3.3"></a>
## [1.3.3](https://github.com/ionic-team/ionic-native/compare/v1.3.2...v1.3.3) (2016-07-11)
@@ -1924,7 +1885,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.3.2"></a>
## [1.3.2](https://github.com/ionic-team/ionic-native/compare/v1.3.1...v1.3.2) (2016-06-27)
@@ -1934,7 +1894,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.3.1"></a>
## [1.3.1](https://github.com/ionic-team/ionic-native/compare/v1.3.0...v1.3.1) (2016-06-26)
@@ -1951,7 +1910,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.3.0"></a>
# [1.3.0](https://github.com/ionic-team/ionic-native/compare/v1.2.3...v1.3.0) (2016-06-13)
@@ -1975,12 +1933,10 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.2.3"></a>
## [1.2.3](https://github.com/ionic-team/ionic-native/compare/v1.2.2...v1.2.3) (2016-06-01)
<a name="1.2.2"></a>
## [1.2.2](https://github.com/ionic-team/ionic-native/compare/v1.2.1...v1.2.2) (2016-05-20)
@@ -1992,7 +1948,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.2.1"></a>
## [1.2.1](https://github.com/ionic-team/ionic-native/compare/v1.2.0...v1.2.1) (2016-05-11)
@@ -2007,7 +1962,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.2.0"></a>
# [1.2.0](https://github.com/ionic-team/ionic-native/compare/v1.1.0...v1.2.0) (2016-04-30)
@@ -2049,7 +2003,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.1.0"></a>
# [1.1.0](https://github.com/ionic-team/ionic-native/compare/v1.0.9...v1.1.0) (2016-03-17)
@@ -2111,7 +2064,6 @@ renamed to `FileTransfer`. Also, `TransferObject` class has been renamed to `Fil
<a name="1.0.9"></a>
## [1.0.9](https://github.com/ionic-team/ionic-native/compare/8f27fc9...v1.0.9) (2016-02-18)
+879 -2377
View File
File diff suppressed because it is too large Load Diff
+23 -26
View File
@@ -1,6 +1,6 @@
{
"name": "ionic-native",
"version": "5.0.0-beta.19",
"version": "5.0.0-beta.24",
"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)",
@@ -22,25 +22,24 @@
"shipit": "npm run build && npm run readmes && npm run npmpub"
},
"devDependencies": {
"@angular/common": "^6.1.7",
"@angular/compiler": "^6.1.7",
"@angular/compiler-cli": "^6.1.7",
"@angular/core": "^6.1.7",
"@angular/common": "^7.2.1",
"@angular/compiler": "^7.2.1",
"@angular/compiler-cli": "^7.2.1",
"@angular/core": "^7.2.1",
"@types/cordova": "0.0.34",
"@types/fs-extra": "^5.0.4",
"@types/jest": "^23.3.2",
"@types/lodash": "^4.14.116",
"@types/node": "^9.6.31",
"@types/jest": "^23.3.13",
"@types/lodash": "^4.14.120",
"@types/node": "^10.12.18",
"@types/rimraf": "^2.0.2",
"@types/webpack": "^4.4.11",
"@types/webpack": "^4.4.23",
"ajv": "^6.7.0",
"async-promise-queue": "^1.0.4",
"canonical-path": "0.0.2",
"conventional-changelog-cli": "^2.0.5",
"cpr": "^3.0.1",
"conventional-changelog-cli": "^2.0.11",
"cz-conventional-changelog": "^2.1.0",
"dgeni": "^0.4.10",
"dgeni": "^0.4.11",
"dgeni-packages": "0.16.10",
"fs-extra": "^7.0.0",
"fs-extra": "^7.0.1",
"gulp": "3.9.1",
"gulp-rename": "^1.4.0",
"gulp-replace": "^1.0.0",
@@ -48,21 +47,19 @@
"jest": "^23.6.0",
"lodash": "^4.17.11",
"minimist": "1.2.0",
"nodemon": "^1.18.4",
"rimraf": "^2.6.2",
"rxjs": "^6.3.2",
"rxjs-tslint-rules": "^4.8.0",
"string-replace-webpack-plugin": "^0.1.3",
"ts-jest": "^23.1.4",
"natives": "^1.1.6",
"rimraf": "^2.6.3",
"rxjs": "^6.3.3",
"ts-jest": "^23.10.5",
"ts-node": "^7.0.1",
"tslint": "^5.11.0",
"tslint-ionic-rules": "0.0.19",
"typescript": "2.9.2",
"uglifyjs-webpack-plugin": "^2.0.1",
"tslint": "^5.12.1",
"tslint-ionic-rules": "0.0.21",
"typescript": "3.2.4",
"uglifyjs-webpack-plugin": "^2.1.1",
"unminified-webpack-plugin": "^2.0.0",
"webpack": "^4.19.1",
"webpack": "^4.28.4",
"winston": "^3.1.0",
"zone.js": "latest"
"zone.js": "^0.8.26"
},
"jest": {
"transform": {
+5 -1
View File
@@ -412,6 +412,10 @@ export function cordovaWarn(pluginName: string, method?: string): void {
}
}
// Fixes a bug in TypeScript 2.9.2 where the ...args is being converted into args: {} and
// causing compilation issues
export type WrapFn = (...args: any[]) => any;
/**
* @private
*/
@@ -419,7 +423,7 @@ export const wrap = (
pluginObj: any,
methodName: string,
opts: CordovaOptions = {}
) => {
): WrapFn => {
return (...args: any[]) => {
if (opts.sync) {
// Sync doesn't wrap the plugin with a promise or observable, it returns the result as-is
+1 -1
View File
@@ -268,7 +268,7 @@ export interface DataCaptureResult {
*
* @usage
* ```typescript
* import { AbbyyRTR } from '@ionic-native/abbyy-rtr';
* import { AbbyyRTR } from '@ionic-native/abbyy-rtr/ngx';
*
*
* constructor(private abbyyRTR: AbbyyRTR) { }
@@ -62,7 +62,7 @@ export interface ActionSheetOptions {
*
* @usage
* ```typescript
* import { ActionSheet, ActionSheetOptions } from '@ionic-native/action-sheet';
* import { ActionSheet, ActionSheetOptions } from '@ionic-native/action-sheet/ngx';
*
* constructor(private actionSheet: ActionSheet) { }
*
+461
View File
@@ -0,0 +1,461 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export class AdjustEvent {
private eventToken: string;
private revenue: number;
private currency: string;
private transactionId: string;
private callbackId: string;
private callbackParameters: string[] = [];
private partnerParameters: string[] = [];
constructor(eventToken: string) {
this.eventToken = eventToken;
}
setRevenue(revenue: number, currency: string): void {
this.revenue = revenue;
this.currency = currency;
}
addCallbackParameter(key: string, value: string): void {
this.callbackParameters.push(key);
this.callbackParameters.push(value);
}
addPartnerParameter(key: string, value: string): void {
this.partnerParameters.push(key);
this.partnerParameters.push(value);
}
setTransactionId(transactionId: string) {
this.transactionId = transactionId;
}
setCallbackId(callbackId: string) {
this.callbackId = callbackId;
}
}
export class AdjustConfig {
private appToken: string;
private environment: AdjustEnvironment;
private sdkPrefix: string;
private delayStart = 0.0;
private logLevel: AdjustLogLevel = null;
private defaultTracker: string = null;
private sendInBackground: boolean = null;
private shouldLaunchDeeplink: boolean = null;
private eventBufferingEnabled: boolean = null;
private userAgent: string = null;
private isDeviceKnown: boolean = null;
private secretId: number = null;
private info1: number = null;
private info2: number = null;
private info3: number = null;
private info4: number = null;
private processName: string = null; // Android only
private attributionCallback: (attribution: AdjustAttribution) => void = null;
private eventTrackingSucceededCallback: (event: AdjustEventSuccess) => void = null;
private eventTrackingFailedCallback: (event: AdjustEventFailure) => void = null;
private sessionTrackingSucceededCallback: (session: AdjustSessionSuccess) => void = null;
private sessionTrackingFailedCallback: (session: AdjustSessionFailure) => void = null;
private deferredDeeplinkCallback: (uri: string) => void = null;
constructor(appToken: string, environment: AdjustEnvironment) {
this.appToken = appToken;
this.environment = environment;
}
setAppSecret(secretId: number, info1: number, info2: number, info3: number, info4: number): void {
this.secretId = secretId;
this.info1 = info1;
this.info2 = info2;
this.info3 = info3;
this.info4 = info4;
}
setDelayStart(delayStart: number) {
this.delayStart = delayStart;
}
setLogLevel(logLevel: AdjustLogLevel) {
this.logLevel = logLevel;
}
setDefaultTracker(defaultTracker: string) {
this.defaultTracker = defaultTracker;
}
setSendInBackground(sendInBackground: boolean) {
this.sendInBackground = sendInBackground;
}
setShouldLaunchDeeplink(shouldLaunchDeeplink: boolean) {
this.shouldLaunchDeeplink = shouldLaunchDeeplink;
}
setEventBufferingEnabled(eventBufferingEnabled: boolean) {
this.eventBufferingEnabled = eventBufferingEnabled;
}
setUserAgent(userAgent: string) {
this.userAgent = userAgent;
}
setDeviceKnown(isDeviceKnown: boolean) {
this.isDeviceKnown = isDeviceKnown;
}
setProcessName(processName: string) {
this.processName = processName;
}
setAttributionCallbackListener(attributionCallback: (attribution: AdjustAttribution) => void) {
this.attributionCallback = attributionCallback;
}
setEventTrackingSucceededCallbackListener(
eventTrackingSucceededCallback: (event: AdjustEventSuccess) => void
) {
this.eventTrackingSucceededCallback = eventTrackingSucceededCallback;
}
setEventTrackingFailedCallbackListener(
eventTrackingFailedCallback: (event: AdjustEventFailure) => void
) {
this.eventTrackingFailedCallback = eventTrackingFailedCallback;
}
setSessionTrackingSucceededCallbackListener(
sessionTrackingSucceededCallback: (session: AdjustSessionSuccess) => void
) {
this.sessionTrackingSucceededCallback = sessionTrackingSucceededCallback;
}
setSessionTrackingFailedCallbackListener(
sessionTrackingFailedCallback: (session: AdjustSessionFailure) => void
) {
this.sessionTrackingFailedCallback = sessionTrackingFailedCallback;
}
setDeferredDeeplinkCallbackListener(deferredDeeplinkCallback: (uri: string) => void) {
this.deferredDeeplinkCallback = deferredDeeplinkCallback;
}
private getAttributionCallback() {
return this.attributionCallback;
}
private getEventTrackingSucceededCallback() {
return this.eventTrackingSucceededCallback;
}
private getEventTrackingFailedCallback() {
return this.eventTrackingFailedCallback;
}
private getSessionTrackingSucceededCallback() {
return this.sessionTrackingSucceededCallback;
}
private getSessionTrackingFailedCallback() {
return this.sessionTrackingFailedCallback;
}
private getDeferredDeeplinkCallback() {
return this.deferredDeeplinkCallback;
}
private hasAttributionListener() {
return this.attributionCallback !== null;
}
private hasEventTrackingSucceededListener() {
return this.eventTrackingSucceededCallback !== null;
}
private hasEventTrackingFailedListener() {
return this.eventTrackingFailedCallback !== null;
}
private hasSessionTrackingSucceededListener() {
return this.sessionTrackingSucceededCallback !== null;
}
private hasSessionTrackingFailedListener() {
return this.sessionTrackingFailedCallback !== null;
}
private hasDeferredDeeplinkCallbackListener() {
return this.deferredDeeplinkCallback !== null;
}
}
export interface AdjustAttribution {
trackerToken: string;
trackerName: string;
network: string;
campaign: string;
adgroup: string;
creative: string;
clickLabel: string;
adid: string;
}
export interface AdjustSessionSuccess {
message: string;
timestamp: string;
adid: string;
jsonResponse: string;
}
export interface AdjustSessionFailure {
message: string;
timestamp: string;
adid: string;
willRetry: boolean;
jsonResponse: string;
}
export interface AdjustEventSuccess {
message: string;
timestamp: string;
adid: string;
eventToken: string;
callbackId: string;
jsonResponse: string;
}
export interface AdjustEventFailure {
message: string;
timestamp: string;
adid: string;
eventToken: string;
willRetry: boolean;
callbackId: string;
jsonResponse: string;
}
export enum AdjustEnvironment {
Sandbox = 'sandbox',
Production = 'production'
}
export enum AdjustLogLevel {
Verbose = 'VERBOSE',
Debug = 'DEBUG',
Info = 'INFO',
Warn = 'WARN',
Error = 'ERROR',
Assert = 'ASSERT',
Suppress = 'SUPPRESS'
}
/**
* @name Adjust
* @description
* This is the Ionic Cordova SDK of Adjust. You can read more about Adjust at adjust.com.
*
* Requires Cordova plugin: `com.adjust.sdk`. For more info, please see the [Adjust Cordova SDK](https://github.com/adjust/cordova_sdk)
*
* @usage
* ```typescript
* import { Adjust, AdjustConfig, AdjustEnvironment } from '@ionic-native/adjust/ngx';
*
* constructor(private adjust: Adjust) { }
*
* ...
*
* const config = new AdjustConfig('APP-TOKEN-HERE', AdjustEnvironment.Sandbox);
* config.logLevel = AdjustLogLevel.Verbose;
* // Set other config properties.
* adjust.create(config);
*
* ```
* @interfaces
* AdjustAttribution
* AdjustSessionSuccess
* AdjustSessionFailure
* AdjustEventSuccess
* AdjustEventFailure
* @classes
* AdjustEvent
* AdjustConfig
* @enums
* AdjustEnvironment
* AdjustLogLevel
*/
@Plugin({
pluginName: 'Adjust',
plugin: 'com.adjust.sdk',
pluginRef: 'Adjust',
repo: 'https://github.com/adjust/cordova_sdk',
platforms: ['Android', 'iOS']
})
@Injectable()
export class Adjust extends IonicNativePlugin {
/**
* This method initializes Adjust SDK
* @param {AdjustConig} config Adjust config object used as starting options
*/
@Cordova({ sync: true })
create(config: AdjustConfig): void {}
/**
* This method tracks an event
* @param {AdjustEvent} event Adjust event object to be tracked
*/
@Cordova({ sync: true })
trackEvent(event: AdjustEvent): void {}
/**
* This method sets offline mode on or off
* @param {boolean} enabled set to true for offline mode on
*/
@Cordova({ sync: true })
setOfflineMode(enabled: boolean): void {}
/**
* By making this call, the Adjust SDK will try to find if there is any new attribution info inside of the deep link and if any, it will be sent to the Adjust backend.
* @param {string} url URL of the deeplink
*/
@Cordova({ sync: true })
appWillOpenUrl(url: string): void {}
/**
* You can disable/enable the Adjust SDK from tracking by invoking this method
* @param {boolean} enabled set to false to disable SDK
*/
@Cordova({ sync: true })
setEnabled(enabled: boolean): void {}
/**
* To send us the push notification token, add the following call to Adjust whenever you get your token in the app or when it gets updated.
* Push tokens are used for Audience Builder and client callbacks, and they are required for the upcoming uninstall tracking feature.
* @param {string} pushToken push token value
*/
@Cordova({ sync: true })
setPushToken(pushToken: string): void {}
/**
* Check if the Adjust SDK is currently enabled by calling this function
* @returns {Promise<boolean>}
*/
@Cordova()
isEnabled(): Promise<boolean> {
return;
}
/**
* In accordance with article 17 of the EU's General Data Protection Regulation (GDPR), you can notify Adjust when a user has exercised their right to be forgotten.
* Calling the following method will instruct the Adjust SDK to communicate the user's choice to be forgotten to the Adjust backend
*/
@Cordova({ sync: true })
gdprForgetMe(): void {}
/**
* Function used to get Google AdId
* @return {Promise<string>} Returns a promise with google AdId value
*/
@Cordova()
getGoogleAdId(): Promise<string> {
return;
}
/**
* If you need to obtain the Amazon Advertising ID, you can make a call to this function.
* @return {Promise<string>} Returns a promise with anazib adv. ID
*/
@Cordova()
getAmazonAdId(): Promise<string> {
return;
}
/**
* To obtain the IDFA, call this function
* @return {Promise<string>} Returns a promise with IDFA string value
*/
@Cordova()
getIdfa(): Promise<string> {
return;
}
/**
* For every device with your app installed on it, the Adjust backend generates a unique Adjust device identifier (adid).
* In order to obtain this identifier, call this function
* @return {Promise<string>} Returns a promise with adid value
*/
@Cordova()
getAdid(): Promise<string> {
return;
}
/**
* If you want to access information about a user's current attribution whenever you need it, you can make a call to this function
* @return {Promise<AdjustAttribution>} Returns a promise with AdjustAttribution object
*/
@Cordova()
getAttribution(): Promise<AdjustAttribution> {
return;
}
/**
* Get the information about version of the SDK used
* @return {Promise<string>} Returns a promise with sdk version information
*/
@Cordova()
getSdkVersion(): Promise<string> {
return;
}
/**
* Method used to add session callback parameters
* @param key key
* @param value value
*/
@Cordova({ sync: true })
addSessionCallbackParameter(key: string, value: string): void {}
/**
* Remove a specific session callback parameter by passing the desiring key to this method
* @param key key
*/
@Cordova({ sync: true })
removeSessionCallbackParameter(key: string): void {}
/**
* If all keys and values from the session callback parameters have to be removed, call this method
*/
@Cordova({ sync: true })
resetSessionCallbackParameters(): void {}
/**
* Method used to add session partner parameters
* @param key key
* @param value value
*/
@Cordova({ sync: true })
addSessionPartnerParameter(key: string, value: string): void {}
/**
* Remove a specific session partner parameter by passing the desiring key to this method
* @param key key
*/
@Cordova({ sync: true })
removeSessionPartnerParameter(key: string): void {}
/**
* If all keys and values from the session partner parameters have to be removed, call this method
*/
@Cordova({ sync: true })
resetSessionPartnerParameters(): void {}
/**
* This method call will make the Adjust SDK send the initial install session and any events created, if they were not sent after delay start was set and it's delay expired.
*/
@Cordova({ sync: true })
sendFirstPackages(): void {}
}
+1 -102
View File
@@ -72,7 +72,7 @@ export interface AdMobFreeRewardVideoConfig {
*
* @usage
* ```typescript
* import { AdMobFree, AdMobFreeBannerConfig } from '@ionic-native/admob-free';
* import { AdMobFree, AdMobFreeBannerConfig } from '@ionic-native/admob-free/ngx';
*
*
* constructor(private admobFree: AdMobFree) { }
@@ -319,104 +319,3 @@ export class AdMobFreeRewardVideo extends IonicNativePlugin {
return;
}
}
/**
* @name AdMob Free
* @description
*
* @usage
* ```typescript
* import { AdMobFree, AdMobFreeBannerConfig } from '@ionic-native/admob-free';
*
*
* constructor(private admobFree: AdMobFree) { }
*
*
* ...
*
*
* const bannerConfig: AdMobFreeBannerConfig = {
* // add your config here
* // for the sake of this example we will just use the test config
* isTesting: true,
* autoShow: true
* }
* this.admobFree.banner.config(bannerConfig);
*
* this.admobFree.banner.prepare()
* .then(() => {
* // banner Ad is ready
* // if we set autoShow to false, then we will need to call the show method here
* })
* .catch(e => console.log(e));
*
*
* ```
* @interfaces
* AdMobFreeBannerConfig
* AdMobFreeInterstitialConfig
* AdMobFreeRewardVideoConfig
* @classes
* AdMobFreeBanner
* AdMobFreeInterstitial
* AdMobFreeRewardVideo
*/
@Plugin({
pluginName: 'AdMobFree',
plugin: 'cordova-plugin-admob-free',
pluginRef: 'admob',
repo: 'https://github.com/ratson/cordova-plugin-admob-free',
platforms: ['Android', 'iOS']
})
@Injectable()
export class AdMobFree extends IonicNativePlugin {
/**
* Convenience object to get event names
* @type {Object}
*/
events: any = {
BANNER_LOAD: 'admob.banner.events.LOAD',
BANNER_LOAD_FAIL: 'admob.banner.events.LOAD_FAIL',
BANNER_OPEN: 'admob.banner.events.OPEN',
BANNER_CLOSE: 'admob.banner.events.CLOSE',
BANNER_EXIT_APP: 'admob.banner.events.EXIT_APP',
INTERSTITIAL_LOAD: 'admob.interstitial.events.LOAD',
INTERSTITIAL_LOAD_FAIL: 'admob.interstitial.events.LOAD_FAIL',
INTERSTITIAL_OPEN: 'admob.interstitial.events.OPEN',
INTERSTITIAL_CLOSE: 'admob.interstitial.events.CLOSE',
INTERSTITIAL_EXIT_APP: 'admob.interstitial.events.EXIT_APP',
REWARD_VIDEO_LOAD: 'admob.rewardvideo.events.LOAD',
REWARD_VIDEO_LOAD_FAIL: 'admob.rewardvideo.events.LOAD_FAIL',
REWARD_VIDEO_OPEN: 'admob.rewardvideo.events.OPEN',
REWARD_VIDEO_CLOSE: 'admob.rewardvideo.events.CLOSE',
REWARD_VIDEO_EXIT_APP: 'admob.rewardvideo.events.EXIT_APP',
REWARD_VIDEO_START: 'admob.rewardvideo.events.START',
REWARD_VIDEO_REWARD: 'admob.rewardvideo.events.REWARD'
};
/**
* Returns the AdMobFreeBanner object
* @type {AdMobFreeBanner}
*/
banner: AdMobFreeBanner = new AdMobFreeBanner();
/**
* Returns the AdMobFreeInterstitial object
* @type {AdMobFreeInterstitial}
*/
interstitial: AdMobFreeInterstitial = new AdMobFreeInterstitial();
/**
* Returns the AdMobFreeRewardVideo object
* @type {AdMobFreeRewardVideo}
*/
rewardVideo: AdMobFreeRewardVideo = new AdMobFreeRewardVideo();
/**
* Watch an event
* @param event {string} event name
* @return {Observable<any>}
*/
on(event: string): Observable<any> {
return fromEvent(document, event);
}
}
@@ -0,0 +1,94 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable, fromEvent } from 'rxjs';
export type AdUnitIDOption = string | {
android: string;
ios: string;
};
/**
* @name AdMob Plus
* @description
* AdMob Plus is the successor of cordova-plugin-admob-free, which provides a cleaner API and build with modern tools.
*/
@Plugin({
plugin: 'cordova-admob-plus',
pluginName: 'AdMob',
pluginRef: 'admob.banner',
repo: 'https://github.com/admob-plus/admob-plus',
platforms: ['Android', 'iOS']
})
export class Banner {
@Cordova({ otherPromise: true })
hide(): Promise<any> {
return Promise.resolve();
}
@Cordova({ otherPromise: true })
show(opts: { id?: AdUnitIDOption }): Promise<any> {
return Promise.resolve();
}
}
@Plugin({
plugin: 'cordova-admob-plus',
pluginName: 'AdMob',
pluginRef: 'admob.interstitial',
})
export class Interstitial {
@Cordova({ otherPromise: true })
load(opts: { id?: AdUnitIDOption }): Promise<any> {
return Promise.resolve();
}
@Cordova({ otherPromise: true })
show(): Promise<any> {
return Promise.resolve();
}
}
@Plugin({
plugin: 'cordova-admob-plus',
pluginName: 'AdMob',
pluginRef: 'admob.rewardVideo',
})
export class RewardVideo {
@Cordova({ otherPromise: true })
load(opts: { id?: AdUnitIDOption }): Promise<any> {
return Promise.resolve();
}
@Cordova({ otherPromise: true })
show(): Promise<any> {
return Promise.resolve();
}
}
@Plugin({
platforms: ['Android', 'iOS'],
plugin: 'cordova-admob-plus',
pluginName: 'AdMob',
pluginRef: 'admob',
repo: 'https://github.com/admob-plus/admob-plus',
})
@Injectable()
export class AdMob extends IonicNativePlugin {
banner = new Banner();
interstitial = new Interstitial();
rewardVideo = new RewardVideo();
@Cordova({ otherPromise: true })
setAppMuted(value: boolean): Promise<any> {
return Promise.resolve();
}
@Cordova({ otherPromise: true })
setAppVolume(value: number): Promise<any> {
return Promise.resolve();
}
on(event: string): Observable<any> {
return fromEvent(document, event);
}
}
+2 -2
View File
@@ -106,8 +106,8 @@ export interface AdExtras {
* IMPORTANT NOTICE: this plugin takes a percentage out of your earnings if you profit more than $1,000. Read more about this on the plugin's repo. For a completely free alternative, see [AdMobPro Free](../admob-free).
* @usage
* ```typescript
* import { AdMobPro } from '@ionic-native/admob-pro';
* import { Platform } from 'ionic-angular';
* import { AdMobPro } from '@ionic-native/admob-pro/ngx';
* import { Platform } from '@ionic/angular';
*
* constructor(private admob: AdMobPro, private platform: Platform ) { }
*
+456
View File
@@ -0,0 +1,456 @@
import { Injectable } from '@angular/core';
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs';
export interface AdmobOptions {
/**
* Your publisher id code from your AdMob account
*/
publisherId: string;
/**
* (Optional) Your interstitial id code from your AdMob account. Defaults to publisherId
*/
interstitialAdId?: string;
/**
* (Optional) Your rewarded id code from your AdMob account. Defaults to publisherId
*/
rewardedAdId?: string;
/**
* (Optional) Your tappx id for iOS apps. If Admob is configured, it is also used to backfill your lost inventory when there are no Admob ads available
*/
tappxIdiOS?: string;
/**
* (Optional) Your tappx id for Android apps. Admob is configured, it is also used to backfill your lost inventory when there are no Admob ads available
*/
tappxIdAndroid?: string;
/**
* (Optional) If any of tappxId is present, it tells the percentage of traffic diverted to tappx. Defaults to 0.5 (50% of the traffic will be requested to Tappx)
*/
tappxShare?: number;
/**
* (Optional) Indicates whether to put banner ads at top when set to true or at bottom when set to false. Defaults to false
*/
bannerAtTop?: boolean;
/**
* (Optional) Indicates the size of banner ads
*/
adSize?: string;
/**
* (Optional) Allow banner overlap webview. Default false
*/
overlap?: boolean;
/**
* (Optional) Set to true to avoid ios7 status bar overlap. Default false
*/
offsetStatusBar?: boolean;
/**
* (Optional) Set to true to receive test ads (do not test with real ads as your account may be banned). Defaults to false
*/
isTesting?: boolean;
/**
* (Options) A JSON object with additional {key: value} pairs
*/
adExtras?: any;
/**
* (Optional) Auto show banner ads when available (onAdLoaded event is called). Defaults to true
*/
autoShowBanner?: boolean;
/**
* (Optional) Auto show interstitial asd when available (onAdLoaded event is called). Defaults to true
*/
autoShowInterstitial?: boolean;
/**
* (Optional) Auto show rewarded ads when available (onAdLoaded event is called). Defaults to true
*/
autoShowRewarded?: boolean;
}
/**
* @name Admob
* @description
* Most complete Admob plugin with support for [Tappx](http://www.tappx.com/?h=dec334d63287772de859bdb4e977fce6) ads.
* Monetize your apps and games with AdMob ads, using latest Google AdMob SDK. With this plugin you can show AdMob ads easily!
*
* **Supports:**
* - Banner ads (top and bottom)
* - Interstitial ads
* - Rewarded ads
* - [Tappx](http://www.tappx.com/?h=dec334d63287772de859bdb4e977fce6) ads
*
* @usage
* ```typescript
* import { Admob, AdmobOptions } from '@ionic-native/admob/ngx';
*
*
* constructor(private admob: Admob) {
* // Admob options config
* const admobOptions: AdmobOptions = {
* publisherId: 'XXX-XXXX-XXXX',
* interstitialAdId: 'XXX-XXXX-XXXX',
* rewardedAdId: 'XXX-XXXX-XXXX',
* isTesting: true,
* autoShowBanner: false,
* autoShowInterstitial: false,
* autoShowRewarded: false,
* adSize: this.admob.AD_SIZE.BANNER
* };
*
* // Set admob options
* this.admob.setOptions(admobOptions)
* .then(() => console.log('Admob options have been successfully set'))
* .catch(err => console.error('Error setting admob options:', err));
* }
*
*
*
* // (Optionally) Load banner ad, in order to have it ready to show
* this.admob.createBannerView()
* .then(() => console.log('Banner ad loaded'))
* .catch(err => console.error('Error loading banner ad:', err));
*
*
* // Show banner ad (createBannerView must be called before and onAdLoaded() event raised)
* this.admob.onAdLoaded().subscribe((ad) => {
* if (ad.adType === this.admob.AD_TYPE.BANNER) {
* this.admob.showBannerAd()
* .then(() => console.log('Banner ad shown'))
* .catch(err => console.error('Error showing banner ad:', err));
* }
* });
*
*
* // Hide banner ad, but do not destroy it, so it can be shown later on
* // See destroyBannerView in order to hide and destroy banner ad
* this.admob.showBannerAd(false)
* .then(() => console.log('Banner ad hidden'))
* .catch(err => console.error('Error hiding banner ad:', err));
*
*
*
* // Request an interstitial ad, in order to be shown later on
* // It is possible to autoshow it via options parameter, see docs
* this.admob.requestInterstitialAd()
* .then(() => console.log('Interstitial ad loaded'))
* .catch(err => console.error('Error loading interstitial ad:', err));
*
*
* // Show an interstitial ad (requestInterstitialAd must be called before)
* this.admob.onAdLoaded().subscribe((ad) => {
* if (ad.adType === this.admob.AD_TYPE.INTERSTITIAL) {
* this.admob.showInterstitialAd()
* .then(() => console.log('Interstitial ad shown'))
* .catch(err => console.error('Error showing interstitial ad:', err));
* }
* });
*
*
* // Request a rewarded ad
* this.admob.requestRewardedAd()
* .then(() => console.log('Rewarded ad loaded'))
* .catch(err => console.error('Error loading rewarded ad:', err));
*
*
* // Show rewarded ad (requestRewardedAd must be called before)
* this.admob.onAdLoaded().subscribe((ad) => {
* if (ad.adType === this.admob.AD_TYPE.REWARDED) {
* this.admob.showRewardedAd()
* .then(() => console.log('Rewarded ad shown'))
* .catch(err => console.error('Error showing rewarded ad:', err));
* }
* });
*
*
* // Hide and destroy banner or interstitial ad
* this.admob.destroyBannerView()
* .then(() => console.log('Banner or interstitial ad destroyed'))
* .catch(err => console.error('Error destroying banner or interstitial ad:', err));
*
*
*
* // On Ad loaded event
* this.admob.onAdLoaded().subscribe((ad) => {
* if (ad.adType === this.admob.AD_TYPE.BANNER) {
* console.log('Banner ad is loaded');
* this.admob.showBannerAd();
* } else if (ad.adType === this.admob.AD_TYPE.INTERSTITIAL) {
* console.log('Interstitial ad is loaded');
* this.admob.showInterstitialAd();
* } else if (ad.adType === this.admob.AD_TYPE.REWARDED) {
* console.log('Rewarded ad is loaded');
* this.admob.showRewardedAd();
* }
* });
*
*
*
* // On ad failed to load
* this.admob.onAdFailedToLoad().subscribe(err => console.log('Error loading ad:', err));
*
*
*
* // On interstitial ad opened
* this.admob.onAdOpened().subscribe(() => console.log('Interstitial ad opened'));
*
*
*
* // On interstitial ad closed
* this.admob.onAdClosed().subscribe(() => console.log('Interstitial ad closed'));
*
*
*
* // On ad clicked and left application
* this.admob.onAdLeftApplication().subscribe(() => console.log('Ad lefted application'));
*
*
*
* // On user ad rewarded
* this.admob.onRewardedAd().subscribe(() => console.log('The user has been rewarded'));
*
*
*
* // On rewarded ad video started
* this.admob.onRewardedAdVideoStarted().subscribe(() => console.log('Rewarded ad vieo started'));
*
*
*
* // On rewarded ad video completed
* this.admob.onRewardedAdVideoCompleted().subscribe(() => console.log('Rewarded ad video completed'));
*
* ```
*/
@Plugin({
pluginName: 'Admob',
plugin: 'cordova-admob',
pluginRef: 'admob',
repo: 'https://github.com/appfeel/admob-google-cordova',
platforms: ['Android', 'iOS']
})
@Injectable()
export class Admob extends IonicNativePlugin {
/**
* This enum represents AdMob's supported ad sizes.
* Use one of these constants as adSize option when calling createBannerView
* @readonly
*/
@CordovaProperty()
readonly AD_SIZE: {
BANNER: string;
IAB_MRECT: string;
IAB_BANNER: string;
IAB_LEADERBOARD: string;
SMART_BANNER: string;
};
/**
* This enum represents AdMob's supported ad types
* @readonly
*/
@CordovaProperty()
readonly AD_TYPE: {
BANNER: string;
INTERSTITIAL: string;
REWARDED: string;
};
/**
* Set the options to start displaying ads.
* Although it is not required to call this method, as options can be specified in other methods, it is highly recommended
* @param options {AdmobOptions} Some param to configure something
* @return {Promise<any>} Returns a promise that resolves when the options are set
*/
@Cordova()
setOptions(options: AdmobOptions): Promise<any> {
return;
}
/**
* Creates a new banner ad view. Call this method in order to be able to start showing banners
* @param options {AdmobOptions} (Optional) Setup options
* @return {Promise<any>} Returns a promise that resolves when the banner view is created
*/
@Cordova()
createBannerView(options?: AdmobOptions): Promise<any> {
return;
}
/**
* Show banner ads. You must call createBannerView first, otherwise it will result in failure callback and no ads will be shown
* @param show {boolean} (Optional) Indicates whether to show or hide banner ads. Defaults to `true`
* @return {Promise<any>} Returns a promise that resolves when the banner shown or hidden
*/
@Cordova()
showBannerAd(show?: boolean): Promise<any> {
return;
}
/**
* Hide and destroy banner view. Call this method when you want to destroy banner view.
* It is not necessary to call this method when the app closed, as it will be automatically called by the plugin
*/
@Cordova()
destroyBannerView() {}
/**
* Request an interstitial ad
* If `options.autoShowInterstitial` is set to `true` (default), the ad will automatically be displayed.
* Otherwise you need to subscribe to `onAdLoaded()` event and call `showInterstitialAd()` after it will be raised specifying that an interstitial ad is available.
* If you already called `requestInterstitialAd()` but the interstitial has never been shown, the successive calls to `requestInterstitialAd()` will result in the ad being inmediately available (the one that was obtained on the first call)
* @param options {AdmobOptions} (Optional) Setup options
* @return {Promise<any>} Returns a promise that resolves when the interstitial ad is loaded
*/
@Cordova()
requestInterstitialAd(options?: AdmobOptions): Promise<any> {
return;
}
/**
* Show an interstitial ad. Call it after `requestInterstitialAd()` and `onAdLoaded()` event raised.
* @return {Promise<any>} Returns a promise that resolves when the interstitial ad is shown
*/
@Cordova()
showInterstitialAd(): Promise<any> {
return;
}
/**
* Request an rewarded ad
* If `options.autoShowRewarded` is set to `true` (default), the ad will automatically be displayed.
* Otherwise you need to subscribe to `onAdLoaded()` enent and call `showRewardedAd()` after it will be raised specifying that a rewarded ad is available.
* If you already called `requestRewardedAd()` but the rewarded has never been shown, the successive calls to `requestRewardedAd()` will result in the ad being inmediately available (the one that was obtained on the first call)
* @param options {AdmobOptions} (Optional) Setup options
* @return {Promise<any>} Returns a promise that resolves when the rewarded ad is loaded
*/
@Cordova()
requestRewardedAd(options?: AdmobOptions): Promise<any> {
return;
}
/**
* Show a rewarded ad
* @return {Promise<any>} Returns a promise that resolves when the rewarded ad is shown
*/
@Cordova()
showRewardedAd(): Promise<any> {
return;
}
/**
* Called when an ad is received
* @returns {Observable<any>} Returns an observable when an ad is received
*/
@Cordova({
eventObservable: true,
event: 'appfeel.cordova.admob.onAdLoaded',
element: document
})
onAdLoaded(): Observable<any> {
return;
}
/**
* Called when an ad request failed
* @returns {Observable<any>} Returns an observable when an ad request is failed
*/
@Cordova({
eventObservable: true,
event: 'appfeel.cordova.admob.onAdFailedToLoad',
element: document
})
onAdFailedToLoad(): Observable<any> {
return;
}
/**
* Called when an ad opens an overlay that covers the screen.
* Please note that onPause cordova event is raised when an interstitial is shown
* @returns {Observable<any>} Returns an observable when an ad is opened
*/
@Cordova({
eventObservable: true,
event: 'appfeel.cordova.admob.onAdOpened',
element: document
})
onAdOpened(): Observable<any> {
return;
}
/**
* Called when the user is about to return to the application after clicking on an ad.
* Please note that onResume cordova event is raised when an interstitial is closed
* @returns {Observable<any>} Returns an observable when an ad is closed
*/
@Cordova({
eventObservable: true,
event: 'appfeel.cordova.admob.onAdClosed',
element: document
})
onAdClosed(): Observable<any> {
return;
}
/**
* Called when the user leaves the application after clicking an ad (e.g., to go to the browser)
* @returns {Observable<any>} Returns an observable when an ad leaves the application
*/
@Cordova({
eventObservable: true,
event: 'appfeel.cordova.admob.onAdLeftApplication',
element: document
})
onAdLeftApplication(): Observable<any> {
return;
}
/**
* Called when the user has been rewarded by an ad
* @returns {Observable<any>} Returns an observable when the user rewards an ad
*/
@Cordova({
eventObservable: true,
event: 'appfeel.cordova.admob.onRewardedAd',
element: document
})
onRewardedAd(): Observable<any> {
return;
}
/**
* Called when the video of a rewarded ad started
* @returns {Observable<any>} Returns an observable when the video is started
*/
@Cordova({
eventObservable: true,
event: 'appfeel.cordova.admob.onRewardedAdVideoStarted',
element: document
})
onRewardedAdVideoStarted(): Observable<any> {
return;
}
/**
* Called when the video of a rewarded ad has completed
* @returns {Observable<any>} Returns an observable when the video is completed
*/
@Cordova({
eventObservable: true,
event: 'appfeel.cordova.admob.onRewardedAdVideoCompleted',
element: document
})
onRewardedAdVideoCompleted(): Observable<any> {
return;
}
}
+1 -1
View File
@@ -10,7 +10,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { AES256 } from '@ionic-native/aes-256';
* import { AES256 } from '@ionic-native/aes-256/ngx';
*
* private secureKey: string;
* private secureIV: string;
+1 -1
View File
@@ -10,7 +10,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { Alipay } from '@ionic-native/alipay';
* import { Alipay } from '@ionic-native/alipay/ngx';
*
* constructor(private alipay: Alipay) {
*
@@ -0,0 +1,248 @@
import { Injectable } from '@angular/core';
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Analytics Firebase
* @description
* Google Analytics Firebase plugin for Ionic Native apps.
*
* @usage
* ```typescript
* import { AnalyticsFirebase } from '@ionic-native/analytics-firebase';
*
*
* constructor(private analyticsFirebase: AnalyticsFirebase) { }
*
* // Track an event with default events and params
* const eventParams = {};
* eventParams[this.analyticsFirebase.DEFAULT_PARAMS.LEVEL] = 29;
* this.analyticsFirebase.logEvent(this.analyticsFirebase.DEFAULT_EVENTS.LEVEL_UP, eventParams)
* .then(() => console.log('Event successfully tracked'))
* .catch(err => console.log('Error tracking event:', err));
*
* // Track an event with custom events and params
* const eventParams = {};
* eventParams['my-prop'] = 29;
* this.analyticsFirebase.logEvent('my-event', eventParams)
* .then(() => console.log('Event successfully tracked'))
* .catch(err => console.log('Error tracking event:', err));
*
*
* // Reset analytics data
* this.analyticsFirebase.resetAnalyticsData()
* .then(() => console.log('Analytics data have been reset'))
* .catch(err => console.log('Error resetting analytics data:', err));
*
*
* // Track a screen view
* this.analyticsFirebase.setCurrentScreen('Home')
* .then(() => console.log('View successfully tracked'))
* .catch(err => console.log('Error tracking view:', err));
*
*
* // Set user id
* this.analyticsFirebase.setUserId('USER-ID')
* .then(() => console.log('User id successfully set'))
* .catch(err => console.log('Error setting user id:', err));
*
*
* // Set user property from default properties
* this.analyticsFirebase.setUserProperty('KEY', 'VALUE')
* .then(() => console.log('User property successfully set'))
* .catch(err => console.log('Error setting user property:', err));
*
* ```
*/
@Plugin({
pluginName: 'AnalyticsFirebase',
plugin: 'cordova-plugin-analytics',
pluginRef: 'analytics',
repo: 'https://github.com/appfeel/analytics-google',
platforms: ['Android', 'iOS']
})
@Injectable()
export class AnalyticsFirebase extends IonicNativePlugin {
/**
* This enum represents AnalyticsFirebase default events.
* Use one of these default events or a custom event
* @readonly
*/
@CordovaProperty()
readonly DEFAULT_EVENTS: {
ADD_PAYMENT_INFO: string;
ADD_TO_CART: string;
ADD_TO_WISHLIST: string;
APP_OPEN: string;
BEGIN_CHECKOUT: string;
CAMPAIGN_DETAILS: string;
CHECKOUT_PROGRESS: string;
EARN_VIRTUAL_CURRENCY: string;
ECOMMERCE_PURCHASE: string;
GENERATE_LEAD: string;
JOIN_GROUP: string;
LEVEL_END: string;
LEVEL_START: string;
LEVEL_UP: string;
LOGIN: string;
POST_SCORE: string;
PRESENT_OFFER: string;
PURCHASE_REFUND: string;
REMOVE_FROM_CART: string;
SEARCH: string;
SELECT_CONTENT: string;
SET_CHECKOUT_OPTION: string;
SHARE: string;
SIGN_UP: string;
SPEND_VIRTUAL_CURRENCY: string;
TUTORIAL_BEGIN: string;
TUTORIAL_COMPLETE: string;
UNLOCK_ACHIEVEMENT: string;
VIEW_ITEM: string;
VIEW_ITEM_LIST: string;
VIEW_SEARCH_RESULTS: string;
};
/**
* This enum represents AnalyticsFirebase default params.
* Use one of these default params or a custom param
* @readonly
*/
@CordovaProperty()
readonly DEFAULT_PARAMS: {
ACHIEVEMENT_ID: string;
ACLID: string;
AFFILIATION: string;
CAMPAIGN: string;
CHARACTER: string;
CHECKOUT_OPTION: string;
CHECKOUT_STEP: string;
CONTENT: string;
CONTENT_TYPE: string;
COUPON: string;
CP1: string;
CREATIVE_NAME: string;
CREATIVE_SLOT: string;
CURRENCY: string;
DESTINATION: string;
END_DATE: string;
FLIGHT_NUMBER: string;
GROUP_ID: string;
INDEX: string;
ITEM_BRAND: string;
ITEM_CATEGORY: string;
ITEM_ID: string;
ITEM_LIST: string;
ITEM_LOCATION_ID: string;
ITEM_NAME: string;
ITEM_VARIANT: string;
LEVEL: string;
LEVEL_NAME: string;
LOCATION: string;
MEDIUM: string;
METHOD: string;
NUMBER_OF_NIGHTS: string;
NUMBER_OF_PASSENGERS: string;
NUMBER_OF_ROOMS: string;
ORIGIN: string;
PRICE: string;
QUANTITY: string;
SCORE: string;
SEARCH_TERM: string;
SHIPPING: string;
SOURCE: string;
START_DATE: string;
SUCCESS: string;
TAX: string;
TERM: string;
TRANSACTION_ID: string;
TRAVEL_CLASS: string;
VALUE: string;
VIRTUAL_CURRENCY_NAME: string;
};
/**
* Logs an app event. The event can have up to 25 parameters.
* Events with the same name must have the same parameters.
* Up to 500 event names are supported.
* Using predefined [FirebaseAnalytics.Event](https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event.html) and/or [FirebaseAnalytics.Param](https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Param.html) is recommended for optimal reporting.
*
* @param eventName {string} The event name
* @param eventParams {object} (Optional) The event params
* @return {Promise<any>} Returns a promise that resolves when the event is logged
*/
@Cordova()
logEvent(eventName: string, eventParams?: object): Promise<any> {
return;
}
/**
* Clears all analytics data for this app from the device and resets the app instance id
* @return {Promise<any>} Returns a promise that resolves when the analytics data is cleared
*/
@Cordova()
resetAnalyticsData(): Promise<any> {
return;
}
/**
* Sets whether analytics collection is enabled for this app on this device. This setting is persisted across app sessions. By default it is enabled
* @param screenName {boolean} The value of the collection
* @return {Promise<any>} Returns a promise that resolves when the collection is enabled/disabled
*/
@Cordova()
setAnalyticsCollectionEnabled(enabled: boolean): Promise<any> {
return;
}
/**
* Sets the current screen name, which specifies the current visual context in your app.
* This helps identify the areas in your app where users spend their time and how they interact with your app
* @param screenName {string} The screen name
* @return {Promise<any>} Returns a promise that resolves when the current screen is setted
*/
@Cordova()
setCurrentScreen(screenName: string): Promise<any> {
return;
}
/**
* Sets the minimum engagement time required before starting a session. The default value is 10000 (10 seconds)
* @param screenName {number} The duration in milliseconds
* @return {Promise<any>} Returns a promise that resolves when the minimum session duration is set
*/
@Cordova()
setMinimumSessionDuration(milliseconds: number): Promise<any> {
return;
}
/**
* Sets the duration of inactivity that terminates the current session. The default value is 1800000 (30 minutes)
* @param screenName {number} The duration in milliseconds
* @return {Promise<any>} Returns a promise that resolves when the session timeout duration is set
*/
@Cordova()
setSessionTimeoutDuration(milliseconds: number): Promise<any> {
return;
}
/**
* Sets the user ID property. This feature must be used in accordance with Google's Privacy Policy
* @param userId {string} The user id
* @return {Promise<any>} Returns a promise that resolves when the user id is setted
*/
@Cordova()
setUserId(userId: string): Promise<any> {
return;
}
/**
* Sets a user property to a given value. Up to 25 user property names are supported. Once set, user property values persist throughout the app lifecycle and across sessions
* @param userPropertyName {string} The user property name
* @param userPropertyValue {string} The user property value
* @return {Promise<any>} Returns a promise that resolves when the user property setted
*/
@Cordova()
setUserProperty(userPropertyName: string, userPropertyValue: string): Promise<any> {
return;
}
}
@@ -158,7 +158,7 @@ export interface AndroidExoPlayerControllerConfig {
*
* @usage
* ```typescript
* import { AndroidExoPlayer } from '@ionic-native/android-exoplayer';
* import { AndroidExoPlayer } from '@ionic-native/android-exoplayer/ngx';
*
* constructor(private androidExoPlayer: AndroidExoPlayer) { }
*
@@ -110,7 +110,7 @@ export interface AFADeleteOptions {
* This plugin will open a native dialog fragment prompting the user to authenticate using their fingerprint. If the device has a secure lockscreen (pattern, PIN, or password), the user may opt to authenticate using that method as a backup.
* @usage
* ```typescript
* import { AndroidFingerprintAuth } from '@ionic-native/android-fingerprint-auth';
* import { AndroidFingerprintAuth } from '@ionic-native/android-fingerprint-auth/ngx';
*
* constructor(private androidFingerprintAuth: AndroidFingerprintAuth) { }
*
@@ -36,7 +36,7 @@ export enum AndroidSystemUiFlags {
* In Android 4.4+, however, you can now enter true full screen, fully interactive immersive mode. In this mode, your app will remain in true full screen until you choose otherwise; users can swipe down from the top of the screen to temporarily display the system UI.
* @usage
* ```typescript
* import { AndroidFullScreen } from '@ionic-native/android-full-screen';
* import { AndroidFullScreen } from '@ionic-native/android-full-screen/ngx';
*
* constructor(private androidFullScreen: AndroidFullScreen) { }
*
@@ -10,7 +10,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```
* import { AndroidPermissions } from '@ionic-native/android-permissions';
* import { AndroidPermissions } from '@ionic-native/android-permissions/ngx';
*
*
* constructor(private androidPermissions: AndroidPermissions) { }
@@ -10,7 +10,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { AppAvailability } from '@ionic-native/app-availability';
* import { AppAvailability } from '@ionic-native/app-availability/ngx';
* import { Platform } from 'ionic-angular';
*
* constructor(private appAvailability: AppAvailability, private platform: Platform) { }
@@ -17,7 +17,7 @@ export interface StringMap {
*
* @usage
* ```typescript
* import { AppCenterAnalytics } from '@ionic-native/app-center-analytics';
* import { AppCenterAnalytics } from '@ionic-native/app-center-analytics/ngx';
*
*
* constructor(private appCenterAnalytics: AppCenterAnalytics) { }
@@ -40,7 +40,7 @@ export interface AppCenterCrashReportDevice {
*
* @usage
* ```typescript
* import { AppCenterCrashes } from '@ionic-native/app-center-crashes';
* import { AppCenterCrashes } from '@ionic-native/app-center-crashes/ngx';
*
*
* constructor(private AppCenterCrashes: AppCenterCrashes) { }
@@ -10,7 +10,7 @@ import { Observable } from 'rxjs';
*
* @usage
* ```typescript
* import { AppCenterPush } from '@ionic-native/app-center-push';
* import { AppCenterPush } from '@ionic-native/app-center-push/ngx';
*
*
* constructor(private appCenterPush: AppCenterPush) { }
@@ -8,8 +8,8 @@ import { Injectable } from '@angular/core';
*
* @usage
* ```typescript
* import { Platfrom } from 'ionic-angular';
* import { AppMinimize } from '@ionic-native/app-minimize';
* import { Platfrom } from '@ionic/angular';
* import { AppMinimize } from '@ionic-native/app-minimize/ngx';
*
*
* constructor(private platform: Platform, private appMinimize: AppMinimize) { }
@@ -9,7 +9,7 @@ import { Injectable } from '@angular/core';
*
* @usage
* ```typescript
* import { AppPreferences } from '@ionic-native/app-preferences';
* import { AppPreferences } from '@ionic-native/app-preferences/ngx';
*
* constructor(private appPreferences: AppPreferences) { }
*
+1 -1
View File
@@ -134,7 +134,7 @@ export interface AppUrls {
*
* @usage
* ```typescript
* import { AppRate } from '@ionic-native/app-rate';
* import { AppRate } from '@ionic-native/app-rate/ngx';
*
* constructor(private appRate: AppRate) { }
*
@@ -26,7 +26,7 @@ export interface AppUpdateOptions {
* Then use the following code:
*
* ```typescript
* import { AppUpdate } from '@ionic-native/app-update';
* import { AppUpdate } from '@ionic-native/app-update/ngx';
*
* constructor(private appUpdate: AppUpdate) {
*
@@ -11,7 +11,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { AppVersion } from '@ionic-native/app-version';
* import { AppVersion } from '@ionic-native/app-version/ngx';
*
* constructor(private appVersion: AppVersion) { }
*
+1 -1
View File
@@ -100,7 +100,7 @@ export interface ISelectedShippingContact {
*
* @usage
* ```typescript
* import { ApplePay } from '@ionic-native/apple-pay';
* import { ApplePay } from '@ionic-native/apple-pay/ngx';
*
*
* constructor(private applePay: ApplePay) { }
@@ -0,0 +1,116 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface EncryptedCardData {
activationData: string;
encryptedPassData: string;
wrappedKey: string;
}
export interface CardData {
cardholderName: string;
primaryAccountNumberSuffix: string;
localizedDescription?: string;
paymentNetwork: string;
}
/**
* @name Apple Wallet
* @description
* A Cordova plugin that enables users from Add Payment Cards to their Apple Wallet.
*
* @usage
* ```typescript
* import { AppleWallet } from '@ionic-native/apple-wallet/ngx';
*
*
* constructor(private appleWallet: AppleWallet) { }
*
* ...
*
*
* this.appleWallet.available()
* .then((res) => {
* // res is a boolean value, either true or false
* console.log("Is Apple Wallet available? ", res);
* })
* .catch((message) => {
* console.error("ERROR AVAILBLE>> ", message);
* });
*
* ...
*
* let data: cardData = {
* cardholderName: 'Test User',
* primaryAccountNumberSuffix: '1234',
* localizedDescription: 'Description of payment card',
* paymentNetwork: 'VISA'
* }
*
* this.appleWallet.startAddPaymentPass(data: cardData)
* .then((res) => {
* console.log("startAddPaymentPass success response ", res);
* })
* .catch((err) => {
* console.error("startAddPaymentPass ERROR response", err);
* });
*
* ...
*
* let data: encryptedCardData = {
* activationData: 'encoded Base64 activationData from your server',
* encryptedPassData: 'encoded Base64 encryptedPassData from your server',
* wrappedKey: 'encoded Base64 wrappedKey from your server',
* }
*
* this.appleWallet.encryptedCardData(data: encryptedCardData)
* .then((res) => {
* console.log("completeAddCardToAppleWallet success response ", res);
* })
* .catch((err) => {
* console.error("completeAddCardToAppleWallet ERROR response", err);
* });
*
* ```
* @Interfaces
* EncryptedCardData
* CardData
*/
@Plugin({
pluginName: 'AppleWallet',
plugin: 'cordova-apple-wallet',
pluginRef: 'AppleWallet',
repo: 'https://github.com/tomavic/cordova-apple-wallet',
platforms: ['iOS']
})
@Injectable()
export class AppleWallet extends IonicNativePlugin {
/**
* Detects if the current device supports Apple Wallet
* @return {Promise<boolean>} Returns a promise
*/
@Cordova()
available(): Promise<boolean> {
return;
}
/**
* Simple call with the configuration data needed to instantiate a new PKAddPaymentPassViewController object.
* @param {cardData} data
* @return {Promise<any>} Returns a promise
*/
@Cordova()
startAddPaymentPass(data: CardData): Promise<any> {
return;
}
/**
* Simple call contains the card data needed to add a card to Apple Pay.
* @param {encryptedCardData} data
* @return {Promise<any>} Returns a promise
*/
@Cordova()
completeAddPaymentPass(data: EncryptedCardData): Promise<any> {
return;
}
}
+1 -1
View File
@@ -9,7 +9,7 @@ import { Observable } from 'rxjs';
*
* @usage
* ```typescript
* import { Appodeal } from '@ionic-native/appodeal';
* import { Appodeal } from '@ionic-native/appodeal/ngx';
*
* constructor(private appodeal: Appodeal) {
*
+1 -1
View File
@@ -52,7 +52,7 @@ export interface AppsflyerInviteOptions {
*
* @usage
* ```typescript
* import { Appsflyer } from '@ionic-native/appsflyer';
* import { Appsflyer } from '@ionic-native/appsflyer/ngx';
*
*
* constructor(private appsflyer: Appsflyer) { }
@@ -0,0 +1,141 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Audio Management
* @description
* A Cordova plugin to manage volume of audio streams for: ring, music, notification and system. Possible
* ringer values for those streams are: silent, vibrate and normal.
*
* @usage
* ```typescript
* import { AudioManagement } from '@ionic-native/audio-management/ngx';
*
*
* constructor(public audioman: AudioManagement) { }
*
* ...
*
* setAudioMode() {
* this.audioman.setAudioMode(AudioManagement.AudioMode.NORMAL)
* .then(() => {
* console.log('Device audio mode is now NORMAL');
* })
* .catch((reason) => {
* console.log(reason);
* });
* }
*
* getAudioMode() {
* this.audioman.getAudioMode()
* .then((value: AudioManagement.AudioModeReturn) => {
* console.log('Device audio mode is ' + value.label + ' (' + value.audioMode + ')');
* })
* .catch((reason) => {
* console.log(reason);
* });
* }
*
* ```
* @interfaces
* AudioModeReturn
*/
@Plugin({
pluginName: 'AudioManagement',
plugin: 'clovelced-plugin-audiomanagement',
pluginRef: 'AudioManagement',
repo: 'https://github.com/clovelCed/cordova-plugin-audiomanagement',
platforms: ['Android']
})
@Injectable()
export class AudioManagement extends IonicNativePlugin {
/**
* Sets the `AudioManagement.AudioMode` for the device.
*
* @param {AudioManagement.AudioMode} mode the device can be set to: Silent, Normal, Vibrate
* @returns {Promise<void>}
*/
@Cordova({
successIndex: 1,
errorIndex: 2
})
setAudioMode(mode: AudioManagement.AudioMode): Promise<void> {
return;
}
/**
* Gets the current `AudioManagement.AudioMode` of the device. Thenable returns an object with
* `label` and `audioMode` values.
*
* @returns {Promise<AudioManagement.AudioModeReturn>}
*/
@Cordova()
getAudioMode(): Promise<AudioManagement.AudioModeReturn> {
return;
}
/**
* Sets the specified `AudioManagement.VolumeType` for the device with the value from `volume`.
*
* @param {AudioManagement.VolumeType} type the `AudioManagement.VolumeType` to set
* @param {number} volume the volume value
* @returns {Promise<void>}
*/
@Cordova({
successIndex: 2,
errorIndex: 3
})
setVolume(type: AudioManagement.VolumeType, volume: number): Promise<void> {
return;
}
/**
* Gets the specified `AudioManagement.VolumeType`'s `volume`. Thenable returns an object with
* a numeric property for volume, `volume`.
*
* @param {AudioManagement.VolumeType} type the `AudioManagement.VolumeType` to get
* @returns {Promise<{volume: number}>}
*/
@Cordova({
successIndex: 1,
errorIndex: 2
})
getVolume(type: AudioManagement.VolumeType): Promise<{ volume: number }> {
return;
}
/**
* Gets the specified `AudioManagement.VolumeType`'s maximum `volume`. Thenable returns an
* object with a numeric property, `maxVolume`.
*
* @param {AudioManagement.VolumeType} type the `AudioManagement.VolumeType` to get
* @returns {Promise<{maxVolume: number}>}
*/
@Cordova({
successIndex: 1,
errorIndex: 2
})
getMaxVolume(type: AudioManagement.VolumeType): Promise<{ maxVolume: number }> {
return;
}
}
export namespace AudioManagement {
export enum AudioMode {
SILENT = 0,
VIBRATE,
NORMAL
}
export enum VolumeType {
RING = 0,
MUSIC,
NOTIFICATION,
SYSTEM
}
export interface AudioModeReturn {
audioMode: AudioManagement.AudioMode;
label: string;
}
}
+1 -1
View File
@@ -9,7 +9,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { Autostart } from '@ionic-native/autostart';
* import { Autostart } from '@ionic-native/autostart/ngx';
*
*
* constructor(private autostart: Autostart) { }
@@ -20,7 +20,7 @@ export interface BackgroundFetchConfig {
* @usage
*
* ```typescript
* import { BackgroundFetch, BackgroundFetchConfig } from '@ionic-native/background-fetch';
* import { BackgroundFetch, BackgroundFetchConfig } from '@ionic-native/background-fetch/ngx';
*
*
* constructor(private backgroundFetch: BackgroundFetch) {
@@ -2,253 +2,490 @@ import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs';
export enum BackgroundGeolocationLocationCode {
PERMISSION_DENIED = 1,
LOCATION_UNAVAILABLE = 2,
TIMEOUT = 3
}
export enum BackgroundGeolocationNativeProvider {
gps = 'gps',
network = 'network',
passive = 'passive',
fused = 'fused'
}
export enum BackgroundGeolocationLocationProvider {
DISTANCE_FILTER_PROVIDER = 0,
ACTIVITY_PROVIDER = 1,
RAW_PROVIDER = 2
}
export enum BackgroundGeolocationEvents {
http_authorization = 'http_authorization', // Triggered when server responded with "<code>401 Unauthorized</code>" to post/sync request.
abort_requested = 'abort_requested', // Triggered when server responded with "<code>285 Updates Not Required</code>" to post/sync request.
background = 'background', // Triggered when app entered background state and (not visible to the user).
foreground = 'foreground', // Triggered when app entered foreground state and (visible to the user).
authorization = 'authorization', // Triggered when user changes authorization/permissions for the app or toggles location services.
error = 'error', // Register error listener.
stop = 'stop', // Triggered when background service has been stopped succesfully.
start = 'start', // Event is triggered when background service has been started succesfully.
activity = 'activity', // Register activity monitoring listener.
stationary = 'stationary', // Register stationary location event listener.
location = 'location' // Register location event listener.
}
export enum BackgroundGeolocationAuthorizationStatus {
NOT_AUTHORIZED = 0,
AUTHORIZED = 1,
AUTHORIZED_FOREGROUND = 2
}
export enum BackgroundGeolocationLogLevel {
TRACE = 'TRACE',
DEBUG = 'DEBUG',
INFO = 'INFO',
WARN = 'WARN',
ERROR = 'ERROR'
}
export interface BackgroundGeolocationLogEntry {
/** ID of log entry as stored in db. */
id: number;
/** Timestamp in milliseconds since beginning of UNIX epoch. */
timestamp: number;
/** Log level */
level: BackgroundGeolocationLogLevel;
/** Log message */
message: string;
/** Recorded stacktrace. (Android only, on iOS part of message) */
stackTrace: string;
}
export interface ServiceStatus {
/** TRUE if service is running. */
isRunning: boolean;
/** TRUE if location services are enabled */
locationServicesEnabled: boolean;
/**
* Authorization status.
*
* Posible values:
* NOT_AUTHORIZED, AUTHORIZED, AUTHORIZED_FOREGROUND
*
* @example
* if (authorization == BackgroundGeolocation.NOT_AUTHORIZED) {...}
*/
authorization: BackgroundGeolocationAuthorizationStatus;
}
export interface BackgroundGeolocation {
code: BackgroundGeolocationLocationCode;
message: string;
}
export interface BackgroundGeolocationCurrentPositionConfig {
timeout: number;
maximumAge: number;
enableHighAccuracy: boolean;
}
export interface BackgroundGeolocationResponse {
/**
* ID of location as stored in DB (or null)
*/
locationId: number;
/** ID of location as stored in DB (or null) */
id: number;
/**
* Service provider
* Native provider reponsible for location.
*
* Possible values:
* "gps", "network", "passive" or "fused"
*/
serviceProvider: string;
provider: BackgroundGeolocationNativeProvider;
/**
* true if location recorded as part of debug
*/
debug: boolean;
/** Configured location provider. */
locationProvider: BackgroundGeolocationLocationProvider;
/**
* UTC time of this fix, in milliseconds since January 1, 1970.
*/
/** UTC time of this fix, in milliseconds since January 1, 1970. */
time: number;
/**
* latitude, in degrees.
*/
/** Latitude, in degrees. */
latitude: number;
/**
* longitude, in degrees.
*/
/** Longitude, in degrees. */
longitude: number;
/**
* estimated accuracy of this location, in meters.
*/
/** Estimated accuracy of this location, in meters. */
accuracy: number;
/**
* speed if it is available, in meters/second over ground.
* Speed if it is available, in meters/second over ground.
*
* Note: Not all providers are capable of providing speed.
* Typically network providers are not able to do so.
*/
speed: number;
/**
* altitude if available, in meters above the WGS 84 reference ellipsoid.
*/
/** Altitude if available, in meters above the WGS 84 reference ellipsoid. */
altitude: number;
/**
* accuracy of the altitude if available.
*/
altitudeAccuracy: number;
/**
* bearing, in degrees.
*/
/** Bearing, in degrees. */
bearing: number;
/**
* A Coordinates object defining the current location
* True if location was recorded by mock provider. (ANDROID ONLY)
*
* Note: this property is not enabled by default!
* You can enable it "postTemplate" configure option.
*/
coords: Coordinates;
isFromMockProvider?: boolean;
/**
* A timestamp representing the time at which the location was retrieved.
* True if device has mock locations enabled. (ANDROID ONLY)
*
* Note: this property is not enabled by default!
* You can enable it "postTemplate" configure option.
*/
timestamp: number;
mockLocationsEnabled?: boolean;
}
export interface BackgroundGeolocationConfig {
/**
* Desired accuracy in meters. Possible values [0, 10, 100, 1000]. The lower
* the number, the more power devoted to GeoLocation resulting in higher
* accuracy readings. 1000 results in lowest power drain and least accurate
* readings. @see Apple docs (https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocationManager_Class/index.html#//apple_ref/occ/instp/CLLocationManager/desiredAccuracy)
*/
desiredAccuracy: number;
/**
* Stationary radius in meters. When stopped, the minimum distance the device
* must move beyond the stationary location for aggressive background-tracking
* to engage.
*/
stationaryRadius: number;
/**
* When enabled, the plugin will emit sounds for life-cycle events of
* background-geolocation! See debugging sounds table.
*/
debug?: boolean;
/**
* The minimum distance (measured in meters) a device must move horizontally
* before an update event is generated. @see Apple docs. (https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html#//apple_ref/occ/instp/CLLocationManager/distanceFilter)
*/
distanceFilter: number;
/**
* IOS, ANDROID ONLY
* Enable this in order to force a stop() when the application terminated
* (e.g. on iOS, double-tap home button, swipe away the app).o
* Set location provider
*
* Defaults to true
*/
stopOnTerminate?: boolean;
/**
* ANDROID ONLY
* Start background service on device boot.
* Platform: all
* Available providers:
* DISTANCE_FILTER_PROVIDER,
* ACTIVITY_PROVIDER
* RAW_PROVIDER
*
* Defaults to false
*/
startOnBoot?: boolean;
/**
* ANDROID ONLY
* If false location service will not be started in foreground and no notification will be shown.
*
* Defaults to true
*/
startForeground?: boolean;
/**
* ANDROID ONLY
* When using BackgroundGeolocation.LocationProvider.ANDROID_DISTANCE_FILTER_PROVIDER:
* The minimum time interval between location updates in milliseconds.
* @see Android docs (http://developer.android.com/reference/android/location/LocationManager.html#requestLocationUpdates(long,%20float,%20android.location.Criteria,%20android.app.PendingIntent))
* and the MS doc (http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.geolocation.geolocator.reportinterval)
* for more information
* When using BackgroundGeolocation.LocationProvider.ANDROID_ACTIVITY_PROVIDER:
* Rate in milliseconds at which your app prefers to receive location updates.
* @see Android docs (https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html#getInterval())
*/
interval?: number;
/**
* ANDROID ONLY
* Custom notification title in the drawer.
*/
notificationTitle?: string;
/**
* ANDROID ONLY
* Custom notification text in the drawer.
*/
notificationText?: string;
/**
* ANDROID ONLY
* The accent color to use for notification. Eg. #4CAF50.
*/
notificationIconColor?: string;
/**
* ANDROID ONLY
* The filename of a custom notification icon. See android quirks.
* NOTE: Only available for API Level >=21.
*/
notificationIconLarge?: string;
/**
* ANDROID ONLY
* The filename of a custom notification icon. See android quirks.
* NOTE: Only available for API Level >=21.
*/
notificationIconSmall?: string;
/**
* ANDROID ONLY
* Set location service provider @see wiki (https://github.com/mauron85/cordova-plugin-background-geolocation/wiki/Android-providers)
* @default DISTANCE_FILTER_PROVIDER
* @example
* { locationProvider: LocationProvider.RAW_PROVIDER }
*/
locationProvider?: number;
/**
* IOS ONLY
* [AutomotiveNavigation, OtherNavigation, Fitness, Other] Presumably,
* this affects iOS GPS algorithm. @see Apple docs for more information
* (https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html#//apple_ref/occ/instp/CLLocationManager/activityType)
* Desired accuracy in meters.
*
* Platform: all
* Provider: all
* Possible values:
* HIGH_ACCURACY,
* MEDIUM_ACCURACY,
* LOW_ACCURACY,
* PASSIVE_ACCURACY
* Note: Accuracy has direct effect on power drain. Lower accuracy = lower power drain.
*
* @default MEDIUM_ACCURACY
* @example
* { desiredAccuracy: BackgroundGeolocationAccuracy.LOW }
*/
desiredAccuracy?: number;
/**
* Stationary radius in meters.
*
* When stopped, the minimum distance the device must move beyond the stationary location for aggressive background-tracking to engage.
* Platform: all
* Provider: DISTANCE_FILTER
*
* @default 50
*/
stationaryRadius?: number;
/**
* When enabled, the plugin will emit sounds for life-cycle events of background-geolocation! See debugging sounds table.
*
* Platform: all
* Provider: all
*
* @default false
*/
debug?: boolean;
/**
* The minimum distance (measured in meters) a device must move horizontally before an update event is generated.
*
* Platform: all
* Provider: DISTANCE_FILTER, RAW
*
* @default 500
* @see {@link https://apple.co/2oHo2CV|Apple docs}
*/
distanceFilter?: number;
/**
* Enable this in order to force a stop() when the application terminated.
* E.g. on iOS, double-tap home button, swipe away the app.
*
* Platform: all
* Provider: all
*
* @default true
*/
stopOnTerminate?: boolean;
/**
* Start background service on device boot.
*
* Platform: Android
* Provider: all
*
* @default false
*/
startOnBoot?: boolean;
/**
* The minimum time interval between location updates in milliseconds.
*
* Platform: Android
* Provider: all
*
* @default 60000
* @see {@link https://bit.ly/1x00RUu|Android docs}
*/
interval?: number;
/**
* Fastest rate in milliseconds at which your app can handle location updates.
*
* Platform: Android
* Provider: ACTIVITY
*
* @default 120000
* @see {@link https://bit.ly/1x00RUu|Android docs}
*/
fastestInterval?: number;
/**
* Rate in milliseconds at which activity recognition occurs.
* Larger values will result in fewer activity detections while improving battery life.
*
* Platform: Android
* Provider: ACTIVITY
*
* @default 10000
*/
activitiesInterval?: number;
/**
* @deprecated Stop location updates, when the STILL activity is detected.
*/
stopOnStillActivity?: boolean;
/**
* Enable/disable local notifications when tracking and syncing locations.
*
* Platform: Android
* Provider: all
*
* @default true
*/
notificationsEnabled?: boolean;
/**
* Allow location sync service to run in foreground state.
* Foreground state also requires a notification to be presented to the user.
*
* Platform: Android
* Provider: all
*
* @default false
*/
startForeground?: boolean;
/**
* Custom notification title in the drawer.
*
* Platform: Android
* Provider: all
* @default "Background tracking"
*/
notificationTitle?: string;
/**
* Custom notification text in the drawer.
*
* Platform: Android
* Provider: all
*
* @default "ENABLED"
*/
notificationText?: string;
/**
* The accent color (hex triplet) to use for notification.
* Eg. <code>#4CAF50</code>.
*
* Platform: Android
* Provider: all
*/
notificationIconColor?: string;
/**
* The filename of a custom notification icon.
*
* Platform: Android
* Provider: all
*/
notificationIconLarge?: string;
/**
* The filename of a custom notification icon.
*
* Platform: Android
* Provider: all
*/
notificationIconSmall?: string;
/**
* Activity type.
* Presumably, this affects iOS GPS algorithm.
*
* Possible values:
* "AutomotiveNavigation", "OtherNavigation", "Fitness", "Other"
*
* Platform: iOS
* Provider: all
*
* @default "OtherNavigation"
* @see {@link https://apple.co/2oHofpH|Apple docs}
*/
activityType?: string;
/**
* IOS ONLY
* Pauses location updates when app is paused
* Pauses location updates when app is paused.
*
* Defaults to true
* Platform: iOS
* Provider: all
*
* @default false
* @see {@link https://apple.co/2CbjEW2|Apple docs}
*/
pauseLocationUpdates?: boolean;
/**
* Switch to less accurate significant changes and region monitory when in background.
*
* Platform: iOS
* Provider: all
*
* @default false
*/
saveBatteryOnBackground?: boolean;
/**
* Server url where to send HTTP POST with recorded locations
* @see https://github.com/mauron85/cordova-plugin-background-geolocation#http-locations-posting
*
* Platform: all
* Provider: all
*/
url?: string;
/**
* Server url where to send fail to post locations
* @see https://github.com/mauron85/cordova-plugin-background-geolocation#http-locations-posting
*
* Platform: all
* Provider: all
*/
syncUrl?: string;
/**
* Specifies how many previously failed locations will be sent to server at once
* Specifies how many previously failed locations will be sent to server at once.
*
* Defaults to 100
* Platform: all
* Provider: all
*
* @default 100
*/
syncThreshold?: number;
syncThreshold?: string;
/**
* Optional HTTP headers sent along in HTTP request
* Optional HTTP headers sent along in HTTP request.
*
* Platform: all
* Provider: all
*/
httpHeaders?: any;
/**
* IOS ONLY
* Switch to less accurate significant changes and region monitory when in background (default)
* Limit maximum number of locations stored into db.
*
* Defaults to 100
*/
saveBatteryOnBackground?: boolean;
/**
* Limit maximum number of locations stored into db
* Platform: all
* Provider: all
*
* Defaults to 10000
* @default 10000
*/
maxLocations?: number;
/**
* ANDROID ONLY with BackgroundGeolocation.LocationProvider.ANDROID_ACTIVITY_PROVIDER
* Customization post template.
*
* Fastest rate in milliseconds at which your app can handle location updates.
* @see Android docs (https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html#getFastestInterval())
* Platform: all
* Provider: all
*/
fastestInterval?: number;
postTemplate?: any;
}
/**
* ANDROID ONLY with BackgroundGeolocation.LocationProvider.ANDROID_ACTIVITY_PROVIDER
*
* Rate in milliseconds at which activity recognition occurs. Larger values will result in fewer activity detections while improving battery life.
*/
activitiesInterval?: number;
/**
* Set location service provider @see https://github.com/mauron85/cordova-plugin-background-geolocation/wiki/Android-providers
*
* Possible values:
* ANDROID_DISTANCE_FILTER_PROVIDER: 0,
* ANDROID_ACTIVITY_PROVIDER: 1
*
* @enum {number}
*/
export declare enum BackgroundGeolocationProvider {
ANDROID_DISTANCE_FILTER_PROVIDER = 0,
ANDROID_ACTIVITY_PROVIDER = 1
}
/**
* ANDROID ONLY with BackgroundGeolocation.LocationProvider.ANDROID_ACTIVITY_PROVIDER
*
* stop() is forced, when the STILL activity is detected (default is true)
*/
stopOnStillActivity?: boolean;
/**
* Desired accuracy in meters. Possible values [0, 10, 100, 1000].
* The lower the number, the more power devoted to GeoLocation resulting in higher accuracy readings.
* 1000 results in lowest power drain and least accurate readings.
*
* Possible values:
* HIGH: 0
* MEDIUM: 10
* LOW: 100
* PASSIVE: 1000
*
* enum {number}
*/
export declare enum BackgroundGeolocationAccuracy {
HIGH = 0,
MEDIUM = 10,
LOW = 100,
PASSIVE = 1000
}
/**
* Used in the switchMode function
*
* Possible values:
* BACKGROUND: 0
* FOREGROUND: 1
*
* @enum {number}
*/
export declare enum BackgroundGeolocationMode {
BACKGROUND = 0,
FOREGROUND = 1
}
export declare enum BackgroundGeolocationIOSActivity {
AutomotiveNavigation = 'AutomotiveNavigation',
OtherNavigation = 'OtherNavigation',
Fitness = 'Fitness',
Other = 'Other'
}
/**
@@ -274,7 +511,7 @@ export interface BackgroundGeolocationConfig {
* distanceFilter: 30,
* debug: true, // enable this hear sounds for background-geolocation life-cycle.
* stopOnTerminate: false, // enable this to clear background location settings when the app terminates
* }
* };
*
* this.backgroundGeolocation.configure(config)
* .subscribe((location: BackgroundGeolocationResponse) => {
@@ -301,74 +538,21 @@ export interface BackgroundGeolocationConfig {
*/
@Plugin({
pluginName: 'BackgroundGeolocation',
plugin: 'cordova-plugin-mauron85-background-geolocation',
pluginRef: 'backgroundGeolocation',
plugin: 'cordova-plugin-mauron85-background-geolocation@alpha',
pluginRef: 'BackgroundGeolocation',
repo: 'https://github.com/mauron85/cordova-plugin-background-geolocation',
platforms: ['Android', 'iOS']
})
@Injectable()
export class BackgroundGeolocation extends IonicNativePlugin {
/**
* Set location service provider @see https://github.com/mauron85/cordova-plugin-background-geolocation/wiki/Android-providers
*
* Possible values:
* ANDROID_DISTANCE_FILTER_PROVIDER: 0,
* ANDROID_ACTIVITY_PROVIDER: 1
*
* @enum {number}
*/
LocationProvider: any = {
ANDROID_DISTANCE_FILTER_PROVIDER: 0,
ANDROID_ACTIVITY_PROVIDER: 1
};
/**
* Desired accuracy in meters. Possible values [0, 10, 100, 1000].
* The lower the number, the more power devoted to GeoLocation resulting in higher accuracy readings.
* 1000 results in lowest power drain and least accurate readings.
*
* Possible values:
* HIGH: 0
* MEDIUM: 10
* LOW: 100
* PASSIVE: 1000
*
* enum {number}
*/
Accuracy: any = {
HIGH: 0,
MEDIUM: 10,
LOW: 100,
PASSIVE: 1000
};
/**
* Used in the switchMode function
*
* Possible values:
* BACKGROUND: 0
* FOREGROUND: 1
*
* @enum {number}
*/
Mode: any = {
BACKGROUND: 0,
FOREGROUND: 1
};
/**
* Configure the plugin.
*
* @param options {BackgroundGeolocationConfig} options An object of type Config
* @return {Observable<BackgroundGeolocationResponse>}
*/
@Cordova({
callbackOrder: 'reverse',
observable: true
})
configure(
options: BackgroundGeolocationConfig
): Observable<BackgroundGeolocationResponse> {
@Cordova()
configure(options: BackgroundGeolocationConfig): Promise<any> {
return;
}
@@ -475,7 +659,7 @@ export class BackgroundGeolocation extends IonicNativePlugin {
/**
* Method can be used to detect user changes in location services settings.
* If user enable or disable location services then success callback will be executed.
* In case or error (SettingNotFoundException) fail callback will be executed.
* In case or (SettingNotFoundException) fail callback will be executed.
* @returns {Observable<number>}
*/
@Cordova({
@@ -573,7 +757,136 @@ export class BackgroundGeolocation extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
getLogEntries(limit: number): Promise<any> {
getLogEntries(
limit: number,
fromId: number,
minLevel: BackgroundGeolocationLogLevel
): Promise<BackgroundGeolocationLogEntry[]> {
return;
}
/**
* Return all logged events. Useful for plugin debugging. Parameter limit limits number of returned entries.
* @see https://github.com/mauron85/cordova-plugin-background-geolocation/tree/v2.2.1#debugging for more information.
*
* @returns {Promise<any>}
*/
@Cordova()
getConfig(): Promise<any> {
return;
}
/**
* One time location check to get current location of the device.
* {timeout: Maximum time in milliseconds device will wait for location,
* maximumAge: Maximum age in milliseconds of a possible cached location that is acceptable to return;
* enableHighAccuracy: if true and if the device is able to provide a more accurate position, it will do so}
*
* @param {BackgroundGeolocationCurrentPositionConfig} options
* @returns {Promise<any>}
*/
@Cordova({
callbackOrder: 'reverse'
})
getCurrentLocation(
options?: BackgroundGeolocationCurrentPositionConfig
): Promise<BackgroundGeolocationResponse> {
return;
}
/**
* Check status of the service
*/
@Cordova()
checkStatus(): Promise<ServiceStatus> {
return;
}
/**
* Start background task (iOS only)
*
* To perform any long running operation on iOS
* you need to create background task
* IMPORTANT: task has to be ended by endTask
*
* @returns {Promise<number>} taskKey
*/
@Cordova({
platforms: ['IOS']
})
startTask(): Promise<number> {
return;
}
/**
* End background task indentified by taskKey (iOS only)
*/
@Cordova({
platforms: ['IOS']
})
endTask(taskKey: number): Promise<any> {
return;
}
/**
* A special task that gets executed when the app is terminated, but
* the plugin was configured to continue running in the background
* (option <code>stopOnTerminate: false</code>).
*
* In this scenario the Activity was killed by the system and all registered
* event listeners will not be triggered until the app is relaunched.
*
* @example
* BackgroundGeolocation.headlessTask(function(event) {
*
* if (event.name === 'location' || event.name === 'stationary') {
* var xhr = new XMLHttpRequest();
* xhr.open('POST', 'http://192.168.81.14:3000/headless');
* xhr.setRequestHeader('Content-Type', 'application/json');
* xhr.send(JSON.stringify(event.params));
* }
*
* return 'Processing event: ' + event.name; // will be logged
* });
* @param func
*/
@Cordova()
headlessTask(func: any): Promise<any> {
return;
}
/**
* Force sync of pending locations.
* Option <code>syncThreshold</code> will be ignored and all pending locations will be immediately posted to <code>syncUrl</code> in single batch.
*
* Platform: Android, iOS
*/
@Cordova()
forceSync(): Promise<any> {
return;
}
/**
* Register event listener.
*
* Triggered when server responded with "<code>285 Updates Not Required</code>" to post/sync request.
* @param event
* @param callbackFn
*/
@Cordova({
observable: true
})
on(event: BackgroundGeolocationEvents): Observable<BackgroundGeolocationResponse> {
return;
}
/**
* Unregister all event listeners for given event.
*
* If parameter <code>event</code> is not provided then all event listeners will be removed.
*/
@Cordova()
removeAllListeners(event?: BackgroundGeolocationEvents): Promise<any> {
return;
}
}
@@ -57,7 +57,7 @@ export interface BackgroundModeConfiguration {
* Requires Cordova plugin: cordova-plugin-background-mode. For more info about plugin, visit: https://github.com/katzer/cordova-plugin-background-mode
* @usage
* ```typescript
* import { BackgroundMode } from '@ionic-native/background-mode';
* import { BackgroundMode } from '@ionic-native/background-mode/ngx';
*
* constructor(private backgroundMode: BackgroundMode) { }
*
+1 -1
View File
@@ -10,7 +10,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { Backlight } from '@ionic-native/backlight';
* import { Backlight } from '@ionic-native/backlight/ngx';
*
* constructor(private backlight: Backlight) { }
*
+1 -1
View File
@@ -10,7 +10,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { Badge } from '@ionic-native/badge';
* import { Badge } from '@ionic-native/badge/ngx';
*
* constructor(private badge: Badge) { }
*
@@ -0,0 +1,187 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs';
declare const baiduPush: any;
export interface BaiduResponse<T> {
/**
* The corresponding Baidu SDK method called.
*/
type: string;
/**
* The error code corresponding to Baidu's request.
*/
errorCode?: string;
/**
* Registration data revelvant to subsequent actions.
*/
data: T;
}
export interface RegistrationData {
/**
* The ID registered to Baidu for the app.
*/
appId: string;
/**
* The ID registered to Baidu for the device.
*/
userId: string;
/**
* The channel ID registered to Baidu for the app.
*/
channelId: string;
}
export interface UnregistrationData {
/**
* The ID corresponding to the Baidu request.
*/
requestId: string;
}
export interface TagData {
/**
* The ID corresponding to the Baidu request.
*/
requestId: string;
/**
* The channel ID registered to Baidu for the app.
*/
channelId: string;
/**
* The list of successfully set/deleted tags.
*/
sucessTags: string[];
/**
* The list of unsuccessfully set/deleted tags.
*/
failTags: string[];
}
export interface NotificationData {
/**
* The title of the notification.
*/
title: string;
/**
* The description of the notification.
*/
description: string;
/**
* Custom content for the notification.
*/
customContentString?: string;
}
/**
* @name Baidu Push
* @description
* This plugin faciliates the use of Baidu Push notifications.
*
* @usage
* ```typescript
* import { BaiduPush } from '@ionic-native/baidu-push/ngx';
*
*
* constructor(private baiduPush: BaiduPush) { }
*
* ...
*
* this.baiduPush.startWork('xxxxxx')
* .then((res: any) => console.log(res))
* .catch((error: any) => console.error(error));
*
* ```
* @interfaces
* BaiduResponse
* RegistrationData
* UnregistrationData
* TagData
* NotificationData
*/
@Plugin({
pluginName: 'BaiduPush',
plugin: 'cordova-plugin-push-baidu',
pluginRef: 'baiduPush',
repo: 'https://github.com/Ti-webdev/cordova-plugin-push-baidu.git',
platforms: ['Android', 'iOS']
})
@Injectable()
export class BaiduPush extends IonicNativePlugin {
/**
* This method registers the device to Baidu Cloud Push services.
* @param {string} apiKey Baidu Cloud Push API key.
* @return {Promise<BaiduResponse<RegistrationData>>} Returns a Promise that resolves with a BaiduResponse.
*/
@Cordova()
startWork(apiKey: string): Promise<BaiduResponse<RegistrationData>> {
return;
}
/**
* This method unregisters the device to Baidu Cloud Push services.
* @return {Promise<BaiduResponse<UnregistrationData>>} Returns a Promise that resolves with a BaiduResponse.
*/
@Cordova()
stopWork(): Promise<BaiduResponse<UnregistrationData>> {
return;
}
/**
* This method re-binds the device to Baidu Cloud Push services.
* @return {Promise<BaiduResponse<RegistrationData>>} Returns a Promise that resolves with a BaiduResponse.
*/
@Cordova()
resumeWork(): Promise<BaiduResponse<RegistrationData>> {
return;
}
/**
* This sets tags in the Baidu Cloud Push services.
* @param tags {any} tags The tags to set.
* @return {Promise<BaiduResponse<TagData>>} Returns a Promise that resolves with a BaiduResponse.
*/
@Cordova()
setTags(tags: any): Promise<BaiduResponse<TagData>> {
return;
}
/**
* This sets tags in the Baidu Cloud Push services.
* @param tags {any} tags The tags to set.
* @return {Promise<BaiduResponse<TagData>>} Returns a Promise that resolves with a BaiduResponse.
*/
@Cordova()
delTags(tags: any): Promise<BaiduResponse<TagData>> {
return;
}
/**
* This method is called when a notification is recieved on the foreground.
* @return {Promise<BaiduResponse<NotificationData>>} Returns a Promise that resolves with a BaiduResponse.
*/
@Cordova({ observable: true })
onMessage(): Observable<BaiduResponse<NotificationData>> {
return;
}
/**
* This method is called when the user taps a notification.
* @return {Promise<BaiduResponse<NotificationData>>} Returns a Promise that resolves with a BaiduResponse.
*/
@Cordova({ observable: true })
onNotificationClicked(): Observable<BaiduResponse<NotificationData>> {
return;
}
/**
* This method is called when a notification is recieved.
* @return {Promise<BaiduResponse<NotificationData>>} Returns a Promise that resolves with a BaiduResponse.
*/
@Cordova({ observable: true })
onNotificationArrived(): Observable<BaiduResponse<NotificationData>> {
return;
}
}
@@ -84,7 +84,7 @@ export interface BarcodeScanResult {
*
* @usage
* ```typescript
* import { BarcodeScanner } from '@ionic-native/barcode-scanner';
* import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
*
* constructor(private barcodeScanner: BarcodeScanner) { }
*
@@ -16,7 +16,7 @@ export interface Base64ToGalleryOptions {
* @description This plugin allows you to save base64 data as a png image into the device
* @usage
* ```typescript
* import { Base64ToGallery } from '@ionic-native/base64-to-gallery';
* import { Base64ToGallery } from '@ionic-native/base64-to-gallery/ngx';
*
* constructor(private base64ToGallery: Base64ToGallery) { }
*
+1 -1
View File
@@ -9,7 +9,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { Base64 } from '@ionic-native/base64';
* import { Base64 } from '@ionic-native/base64/ngx';
*
* constructor(private base64: Base64) { }
*
@@ -21,7 +21,7 @@ export interface BatteryStatusResponse {
*
* @usage
* ```typescript
* import { BatteryStatus } from '@ionic-native/battery-status';
* import { BatteryStatus } from '@ionic-native/battery-status/ngx';
*
* constructor(private batteryStatus: BatteryStatus) { }
*
+1 -1
View File
@@ -28,7 +28,7 @@ export interface BLEScanOptions {
*
* ```typescript
*
* import { BLE } from '@ionic-native/ble';
* import { BLE } from '@ionic-native/ble/ngx';
*
* constructor(private ble: BLE) { }
*
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -38,7 +38,7 @@ export interface BlinkUpWPSOptions {
*
* @usage
* ```typescript
* import { BlinkUp } from '@ionic-native/blinkup';
* import { BlinkUp } from '@ionic-native/blinkup/ngx';
*
* const options = <BlinkUpWifiOptions>{
* apiKey: 'API_KEY',
@@ -397,7 +397,7 @@ export interface AdapterInfo {
*
* @usage
* ```typescript
* import { BluetoothLE } from '@ionic-native/bluetooth-le';
* import { BluetoothLE } from '@ionic-native/bluetooth-le/ngx';
*
*
* constructor(public bluetoothle: BluetoothLE, public plt: Platform) {
@@ -466,7 +466,7 @@ export class BluetoothLE extends IonicNativePlugin {
* Currently the discoverable state does not have any relevance because there is no "setDiscoverable" functionality in place. That may change in the future.
* @returns {Promise<AdapterInfo>}
*/
@Cordova({ callbackOrder: 'reverse', observable: true })
@Cordova({ callbackOrder: 'reverse' })
getAdapterInfo(): Promise<AdapterInfo> {
return;
}
@@ -668,7 +668,7 @@ export class BluetoothLE extends IonicNativePlugin {
* @returns {Promise<OperationResult>}
*/
@Cordova({ callbackOrder: 'reverse' })
read(params: DescriptorParams): Promise<{ result: OperationResult }> {
read(params: DescriptorParams): Promise<OperationResult> {
return;
}
@@ -678,10 +678,10 @@ export class BluetoothLE extends IonicNativePlugin {
* Once a subscription is no longer needed, execute unsubscribe in a similar fashion.
* The Client Configuration descriptor will automatically be written to enable notification/indication based on the characteristic's properties.
* @param {DescriptorParams} params
* @returns {(Observable<{ result: OperationResult }>)}
* @returns {Observable<OperationResult>}
*/
@Cordova({ callbackOrder: 'reverse', observable: true })
subscribe(params: DescriptorParams): Observable<{ result: OperationResult }> {
subscribe(params: DescriptorParams): Observable<OperationResult> {
return;
}
@@ -7,7 +7,7 @@ import { Observable } from 'rxjs';
* @description This plugin enables serial communication over Bluetooth. It was written for communicating between Android or iOS and an Arduino (not Android to Android or iOS to iOS).
* @usage
* ```typescript
* import { BluetoothSerial } from '@ionic-native/bluetooth-serial';
* import { BluetoothSerial } from '@ionic-native/bluetooth-serial/ngx';
*
* constructor(private bluetoothSerial: BluetoothSerial) { }
*
+1 -1
View File
@@ -148,7 +148,7 @@ export interface PaymentUIResult {
*
* @usage
* ```typescript
* import { Braintree, ApplePayOptions, PaymentUIOptions } from '@ionic-native/braintree';
* import { Braintree, ApplePayOptions, PaymentUIOptions } from '@ionic-native/braintree/ngx';
*
* constructor(private braintree: Braintree) { }
*
+1 -1
View File
@@ -60,7 +60,7 @@ export interface BranchUniversalObject {
*
* @usage
* ```
* import { BranchIo } from '@ionic-native/branch-io';
* import { BranchIo } from '@ionic-native/branch-io/ngx';
*
*
* constructor(private branch: BranchIo) { }
@@ -10,7 +10,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { Brightness } from '@ionic-native/brightness';
* import { Brightness } from '@ionic-native/brightness/ngx';
*
* constructor(private brightness: Brightness) { }
*
@@ -9,7 +9,7 @@ import { Observable } from 'rxjs';
*
* @usage
* ```typescript
* import { Broadcaster } from '@ionic-native/broadcaster';
* import { Broadcaster } from '@ionic-native/broadcaster/ngx';
*
* constructor(private broadcaster: Broadcaster) { }
*
@@ -8,7 +8,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { BrowserTab } from '@ionic-native/browser-tab';
* import { BrowserTab } from '@ionic-native/browser-tab/ngx';
*
* constructor(private browserTab: BrowserTab) {
*
+1 -1
View File
@@ -66,7 +66,7 @@ export interface NameOrOptions {
*
* @usage
* ```typescript
* import { Calendar } from '@ionic-native/calendar';
* import { Calendar } from '@ionic-native/calendar/ngx';
*
* constructor(private calendar: Calendar) { }
*
@@ -19,7 +19,7 @@ export interface CallDirectoryLog {
*
* @usage
* ```typescript
* import { CallDirectory } from '@ionic-native/call-directory';
* import { CallDirectory } from '@ionic-native/call-directory/ngx';
*
*
* constructor(private callDirectory: CallDirectory) { }
+1 -1
View File
@@ -14,7 +14,7 @@ export interface CallLogObject {
*
* @usage
* ```typescript
* import { CallLog } from '@ionic-native/call-log';
* import { CallLog } from '@ionic-native/call-log/ngx';
*
*
* constructor(private callLog: CallLog) { }
@@ -9,7 +9,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { CallNumber } from '@ionic-native/call-number';
* import { CallNumber } from '@ionic-native/call-number/ngx';
*
* constructor(private callNumber: CallNumber) { }
*
@@ -63,7 +63,7 @@ export interface CameraPreviewPictureOptions {
*
* @usage
* ```typescript
* import { CameraPreview, CameraPreviewPictureOptions, CameraPreviewOptions, CameraPreviewDimensions } from '@ionic-native/camera-preview';
* import { CameraPreview, CameraPreviewPictureOptions, CameraPreviewOptions, CameraPreviewDimensions } from '@ionic-native/camera-preview/ngx';
*
* constructor(private cameraPreview: CameraPreview) { }
*
+9 -1
View File
@@ -128,9 +128,17 @@ export enum Direction {
*
* Requires the Cordova plugin: `cordova-plugin-camera`. For more info, please see the [Cordova Camera Plugin Docs](https://github.com/apache/cordova-plugin-camera).
*
* [Warning] Since IOS 10 the camera requires permissions to be placed in your config.xml add
* ```xml
* <config-file parent="NSCameraUsageDescription" platform="ios" target="*-Info.plist">
* <string>You can take photos</string>
* </config-file>
* ```
* inside of the <platform name='ios> section
*
* @usage
* ```typescript
* import { Camera, CameraOptions } from '@ionic-native/camera';
* import { Camera, CameraOptions } from '@ionic-native/camera/ngx';
*
* constructor(private camera: Camera) { }
*
+2 -2
View File
@@ -60,7 +60,7 @@ export interface CardIOOptions {
/**
* Changes the color of the guide overlay on the camera. The color is provided in hexadecimal format (e.g. `#FFFFFF`)
*/
guideColor?: string;
guideColor?: string | number;
/**
* The user will not be prompted to confirm their card number after processing.
@@ -141,7 +141,7 @@ export interface CardIOResponse {
* <string>To scan credit cards.</string>
* ```
* ```typescript
* import { CardIO } from '@ionic-native/card-io';
* import { CardIO } from '@ionic-native/card-io/ngx';
*
* constructor(private cardIO: CardIO) { }
*
+1 -1
View File
@@ -28,7 +28,7 @@ export interface ChooserResult {
*
* @usage
* ```typescript
* import { Chooser } from '@ionic-native/chooser';
* import { Chooser } from '@ionic-native/chooser/ngx';
*
*
* constructor(private chooser: Chooser) { }
+1 -1
View File
@@ -136,7 +136,7 @@ export interface CCKQuantityItem {
*
* @usage
* ```typescript
* import { ClassKit, CCKContext, CCKBinaryItem, CCKQuantityItem, CCKScoreItem, CCKContextTopic, CCKContextType, CCKBinaryType } from '@ionic-native/class-kit';
* import { ClassKit, CCKContext, CCKBinaryItem, CCKQuantityItem, CCKScoreItem, CCKContextTopic, CCKContextType, CCKBinaryType } from '@ionic-native/class-kit/ngx';
*
* // Init contexts defined in XML file 'CCK-contexts.xml'
* constructor( ..., private classKit: ClassKit) {
+1 -1
View File
@@ -10,7 +10,7 @@ declare var clevertap: any;
*
* @usage
* ```typescript
* import { CleverTap } from '@ionic-native/clevertap';
* import { CleverTap } from '@ionic-native/clevertap/ngx';
*
* constructor(private clevertap: CleverTap) { }
*
+1 -1
View File
@@ -8,7 +8,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { Clipboard } from '@ionic-native/clipboard';
* import { Clipboard } from '@ionic-native/clipboard/ngx';
*
* constructor(private clipboard: Clipboard) { }
*
@@ -8,7 +8,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { CloudSettings } from '@ionic-native/cloud-settings';
* import { CloudSettings } from '@ionic-native/cloud-settings/ngx';
*
*
* constructor(private cloudSettings: CloudSettings) { }
+1 -1
View File
@@ -464,7 +464,7 @@ export interface DownloadProgress {
*
* @usage
* ```typescript
* import { CodePush } from '@ionic-native/code-push';
* import { CodePush } from '@ionic-native/code-push/ngx';
*
* constructor(private codePush: CodePush) { }
*
@@ -0,0 +1,59 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs';
/**
* @name Colored Browser Tabs
* @description
* This plugin opens Chrome Custom Tabs on Android or SafariViewController on iOS
*
* @usage
* ```typescript
* import { ColoredBrowserTabs } from '@ionic-native/colored-browser-tabs/ngx';
*
*
* constructor(private browserTabs: ColoredBrowserTabs) { }
*
* ...
*
*
* this.browserTabs.openTab('www.example.url', '#ffffff')
* .subscribe()
*
* this.browserTabs.openTabWithAnimation('www.example.url', 'slide_x', '#ffffff')
* .subscribe()
*
* ```
*/
@Plugin({
pluginName: 'ColoredBrowserTabs',
plugin: 'cordova-plugin-colored-browser-tabs',
pluginRef: 'ColoredBrowserTabs',
repo: 'https://github.com/TobyEb/cordova-plugin-colored-browser-tabs',
platforms: ['Android', 'iOS']
})
@Injectable()
export class ColoredBrowserTabs extends IonicNativePlugin {
/**
* Call this method to open the tab
* @param url - the url you want to open
* @param color - the color with which you want to define the toolbar color
* @return {Observable<any>} Returns a Observable that resolves when something happens
*/
@Cordova({ observable: true, successIndex: 2, errorIndex: 3 })
openTab(url: string, color?: string): Observable<any> {
return;
}
/**
* Call this method to open the tab
* @param url - the url you want to open
* @param anim - the animation you want for enter and exit, you can choose between slide_x / slide_y and fade
* only works in Android, iOS just shows the default animation
* @param color - the color with which you want to define the toolbar color
* @return {Observable<any>} Returns a Observable that resolves when something happens
*/
@Cordova({ observable: true, successIndex: 3, errorIndex: 4 })
openTabWithAnimation(url: string, anim: string, color?: string): Observable<any> {
return;
}
}
+4 -1
View File
@@ -45,6 +45,9 @@ export interface IContactProperties {
/** A globally unique identifier. */
id?: string;
/** A globally unique identifier on Android. */
rawId?: string;
/** The name of this Contact, suitable for display to end users. */
displayName?: string;
@@ -310,7 +313,7 @@ export class ContactFindOptions implements IContactFindOptions {
* @usage
*
* ```typescript
* import { Contacts, Contact, ContactField, ContactName } from '@ionic-native/contacts';
* import { Contacts, Contact, ContactField, ContactName } from '@ionic-native/contacts/ngx';
*
* constructor(private contacts: Contacts) { }
*
@@ -8,7 +8,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { CouchbaseLite } from '@ionic-native/couchbase-lite';
* import { CouchbaseLite } from '@ionic-native/couchbase-lite/ngx';
* import { Http } from '@angular/http';
* import { Observable } from 'rxjs'
* constructor(private couchbase: CouchbaseLite, private platform:Platform,private _http:Http) {
+1 -1
View File
@@ -12,7 +12,7 @@ export interface CropOptions {
* @description Crops images
* @usage
* ```typescript
* import { Crop } from '@ionic-native/crop';
* import { Crop } from '@ionic-native/crop/ngx';
*
* constructor(private crop: Crop) { }
*
@@ -125,7 +125,7 @@ export interface DatePickerOptions {
*
* @usage
* ```typescript
* import { DatePicker } from '@ionic-native/date-picker';
* import { DatePicker } from '@ionic-native/date-picker/ngx';
*
* constructor(private datePicker: DatePicker) { }
*
+1 -1
View File
@@ -7,7 +7,7 @@ import { Observable } from 'rxjs';
* @description This plugin defines a global DBMeter object, which permits to get the decibel values from the microphone.
* @usage
* ```typescript
* import { DBMeter } from '@ionic-native/db-meter';
* import { DBMeter } from '@ionic-native/db-meter/ngx';
*
* constructor(private dbMeter: DBMeter) { }
*
+1 -1
View File
@@ -35,7 +35,7 @@ export interface DeeplinkOptions {
*
* @usage
* ```typescript
* import { Deeplinks } from '@ionic-native/deeplinks';
* import { Deeplinks } from '@ionic-native/deeplinks/ngx';
*
* constructor(private deeplinks: Deeplinks) { }
*
@@ -19,7 +19,7 @@ export interface AndroidAccount {
*
* @usage
* ```typescript
* import { DeviceAccounts } from '@ionic-native/device-accounts';
* import { DeviceAccounts } from '@ionic-native/device-accounts/ngx';
*
* constructor(private deviceAccounts: DeviceAccounts) { }
*
@@ -17,7 +17,7 @@ export interface DeviceFeedbackStatus {
*
* @usage
* ```typescript
* import { DeviceFeedback } from '@ionic-native/device-feedback';
* import { DeviceFeedback } from '@ionic-native/device-feedback/ngx';
*
* constructor(private deviceFeedback: DeviceFeedback) { }
*
@@ -38,7 +38,7 @@ export interface DeviceMotionAccelerometerOptions {
*
* @usage
* ```typescript
* import { DeviceMotion, DeviceMotionAccelerationData } from '@ionic-native/device-motion';
* import { DeviceMotion, DeviceMotionAccelerationData } from '@ionic-native/device-motion/ngx';
*
* constructor(private deviceMotion: DeviceMotion) { }
*
@@ -44,7 +44,7 @@ export interface DeviceOrientationCompassOptions {
* @usage
* ```typescript
* // DeviceOrientationCompassHeading is an interface for compass
* import { DeviceOrientation, DeviceOrientationCompassHeading } from '@ionic-native/device-orientation';
* import { DeviceOrientation, DeviceOrientationCompassHeading } from '@ionic-native/device-orientation/ngx';
*
* constructor(private deviceOrientation: DeviceOrientation) { }
*
+1 -1
View File
@@ -10,7 +10,7 @@ declare const window: any;
*
* @usage
* ```typescript
* import { Device } from '@ionic-native/device';
* import { Device } from '@ionic-native/device/ngx';
*
* constructor(private device: Device) { }
*
@@ -8,7 +8,7 @@ import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-nati
*
* @usage
* ```typescript
* import { Diagnostic } from '@ionic-native/diagnostic';
* import { Diagnostic } from '@ionic-native/diagnostic/ngx';
*
* constructor(private diagnostic: Diagnostic) { }
*
+1 -1
View File
@@ -22,7 +22,7 @@ export interface DialogsPromptCallback {
*
* @usage
* ```typescript
* import { Dialogs } from '@ionic-native/dialogs';
* import { Dialogs } from '@ionic-native/dialogs/ngx';
*
* constructor(private dialogs: Dialogs) { }
*
+1 -1
View File
@@ -7,7 +7,7 @@ import { Injectable } from '@angular/core';
*
* @usage
* ```typescript
* import { DNS } from '@ionic-native/dns';
* import { DNS } from '@ionic-native/dns/ngx';
*
*
* constructor(private dns: DNS) { }
@@ -10,7 +10,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { DocumentPicker } from '@ionic-native/document-picker';
* import { DocumentPicker } from '@ionic-native/document-picker/ngx';
*
* constructor(private docPicker: DocumentPicker) { }
*
@@ -36,7 +36,7 @@ export interface DocumentViewerOptions {
*
* @usage
* ```typescript
* import { DocumentViewer } from '@ionic-native/document-viewer';
* import { DocumentViewer } from '@ionic-native/document-viewer/ngx';
*
*
* constructor(private document: DocumentViewer) { }
@@ -0,0 +1,124 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export enum NotificationVisibility {
Visible = 0,
VisibleNotifyCompleted = 1,
VisibilityHidden = 2,
VisibleNotifyOnlyCompletion = 3
}
export interface DownloadHttpHeader {
header: string;
value: string;
}
export interface DestinationDirectory {
dirType: string;
subPath: string;
}
export interface DownloadRequest {
/**
* Location of the resource to download
*/
uri: string;
/**
* Set the title of this download, to be displayed in notifications (if enabled).
* If no title is given, a default one will be assigned based on the download filename, once the download starts.
*/
title?: string;
/**
* Set a description of this download, to be displayed in notifications (if enabled)
*/
description?: string;
/**
* Set the MIME content type of this download. This will override the content type declared in the server's response.
*/
mimeType?: string;
/**
* Set whether this download should be displayed in the system's Downloads UI. True by default.
*/
visibleInDownloadsUi?: boolean;
/**
* Control whether a system notification is posted by the download manager while this download is running or when it is completed.
*/
notificationVisibility?: NotificationVisibility;
/**
* Set the local destination for the downloaded file to a path within the application's external files directory
*/
destinationInExternalFilesDir?: DestinationDirectory;
/**
* Set the local destination for the downloaded file to a path within the public external storage directory
*/
destinationInExternalPublicDir?: DestinationDirectory;
/**
* Set the local destination for the downloaded file.
* Must be a file URI to a path on external storage, and the calling application must have the WRITE_EXTERNAL_STORAGE permission.
*/
destinationUri?: string;
/**
* Add an HTTP header to be included with the download request. The header will be added to the end of the list.
*/
headers?: DownloadHttpHeader[];
}
/**
* @name Downloader
* @description
* This plugin is designed to support downloading files using Android DownloadManager.
*
*
* @usage
* ```typescript
* import { Downloader } from '@ionic-native/downloader/ngx';
*
*
* constructor(private downloader: Downloader) { }
*
* ...
*
* var request: DownloadRequest = {
* uri: YOUR_URI,
* title: 'MyDownload',
* description: '',
* mimeType: '',
* visibleInDownloadsUi: true,
* notificationVisibility: NotificationVisibility.VisibleNotifyCompleted,
* destinationInExternalFilesDir: {
* dirType: 'Downloads',
* subPath: 'MyFile.apk'
* }
* };
*
*
* this.downloader.download(request)
* .then((location: string) => console.log('File downloaded at:'+location))
* .catch((error: any) => console.error(error));
*
* ```
* @interfaces
* NotificationVisibility
* Header
* DestinationDirectory
* DownloadHttpHeader
*/
@Plugin({
pluginName: 'Downloader',
plugin: 'integrator-cordova-plugin-downloader',
pluginRef: 'cordova.plugins.Downloader',
repo: 'https://github.com/Luka313/integrator-cordova-plugin-downloader.git',
platforms: ['Android']
})
@Injectable()
export class Downloader extends IonicNativePlugin {
/**
* Starts a new download and returns location of the downloaded file on completion
* @param request {DownloadRequest}
*/
@Cordova()
download(request: DownloadRequest): Promise<string> {
return;
}
}
@@ -63,7 +63,7 @@ export interface EmailComposerOptions {
*
* @usage
* ```typescript
* import { EmailComposer } from '@ionic-native/email-composer';
* import { EmailComposer } from '@ionic-native/email-composer/ngx';
*
* constructor(private emailComposer: EmailComposer) { }
*
@@ -22,7 +22,7 @@ export interface EstimoteBeaconRegion {
*
* @usage
* ```typescript
* import { EstimoteBeacons } from '@ionic-native/estimote-beacons';
* import { EstimoteBeacons } from '@ionic-native/estimote-beacons/ngx';
*
* constructor(private eb: EstimoteBeacons) { }
*
@@ -12,7 +12,7 @@ import { CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { ExtendedDeviceInformation } from '@ionic-native/extended-device-information';
* import { ExtendedDeviceInformation } from '@ionic-native/extended-device-information/ngx';
*
*
* constructor(private extendedDeviceInformation: ExtendedDeviceInformation) { }
+2 -2
View File
@@ -14,7 +14,7 @@ export interface Attributes {
*
* @usage
* ```typescript
* import { Crashlytics } from '@ionic-native/fabric';
* import { Crashlytics } from '@ionic-native/fabric/ngx';
*
*
* constructor(private crashlytics: Crashlytics) { }
@@ -142,7 +142,7 @@ export class Crashlytics extends IonicNativePlugin {
*
* @usage
* ```typescript
* import { Answers } from '@ionic-native/fabric';
* import { Answers } from '@ionic-native/fabric/ngx';
*
*
* constructor(private answers: Answers) { }
+1 -1
View File
@@ -89,7 +89,7 @@ export interface FacebookLoginResponse {
*
* @usage
* ```typescript
* import { Facebook, FacebookLoginResponse } from '@ionic-native/facebook';
* import { Facebook, FacebookLoginResponse } from '@ionic-native/facebook/ngx';
*
* constructor(private fb: Facebook) { }
*
+1 -1
View File
@@ -23,7 +23,7 @@ export interface NotificationData {
*
* @usage
* ```typescript
* import { FCM } from '@ionic-native/fcm';
* import { FCM } from '@ionic-native/fcm/ngx';
*
* constructor(private fcm: FCM) {}
*
@@ -9,7 +9,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { FileChooser } from '@ionic-native/file-chooser';
* import { FileChooser } from '@ionic-native/file-chooser/ngx';
*
* constructor(private fileChooser: FileChooser) { }
*
@@ -8,7 +8,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { FileEncryption } from '@ionic-native/file-encryption';
* import { FileEncryption } from '@ionic-native/file-encryption/ngx';
*
*
* constructor(private fileEncryption: FileEncryption) { }
@@ -8,7 +8,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { FileOpener } from '@ionic-native/file-opener';
* import { FileOpener } from '@ionic-native/file-opener/ngx';
*
* constructor(private fileOpener: FileOpener) { }
*
+1 -1
View File
@@ -11,7 +11,7 @@ declare const window: any;
*
* @usage
* ```typescript
* import { FilePath } from '@ionic-native/file-path';
* import { FilePath } from '@ionic-native/file-path/ngx';
*
* constructor(private filePath: FilePath) { }
*
@@ -16,7 +16,7 @@ export interface IOSFilePickerPosition {
*
* @usage
* ```typescript
* import { IOSFilePicker } from '@ionic-native/file-picker';
* import { IOSFilePicker } from '@ionic-native/file-picker/ngx';
*
* constructor(private filePicker: IOSFilePicker) { }
*
@@ -118,7 +118,7 @@ export interface FileTransferError {
*
* @usage
* ```typescript
* import { FileTransfer, FileUploadOptions, FileTransferObject } from '@ionic-native/file-transfer';
* import { FileTransfer, FileUploadOptions, FileTransferObject } from '@ionic-native/file-transfer/ngx';
* import { File } from '@ionic-native/file';
*
* constructor(private transfer: FileTransfer, private file: File) { }
+2 -42
View File
@@ -678,7 +678,7 @@ declare const window: Window;
*
* Example:
* ```
* import { File } from '@ionic-native/file';
* import { File } from '@ionic-native/file/ngx';
*
* constructor(private file: File) { }
*
@@ -1091,7 +1091,7 @@ export class File extends IonicNativePlugin {
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
* @param {string} fileName path relative to base path
* @param {string | Blob | ArrayBuffer} text content, blob or ArrayBuffer to write
* @param {IWriteOptions} options replace file if set to true. See WriteOptions for more information.
* @param {IWriteOptions} whether to replace/append to an existing file. See IWriteOptions for more information.
* @returns {Promise<any>} Returns a Promise that resolves to updated file entry or rejects with an error.
*/
@CordovaCheck()
@@ -1217,46 +1217,6 @@ export class File extends IonicNativePlugin {
return this.readFile<ArrayBuffer>(path, file, 'ArrayBuffer');
}
private readFile<T>(
path: string,
file: string,
readAs: 'ArrayBuffer' | 'BinaryString' | 'DataURL' | 'Text'
): Promise<T> {
if (/^\//.test(file)) {
const err = new FileError(5);
err.message = 'file-name cannot start with /';
return Promise.reject<any>(err);
}
return this.resolveDirectoryUrl(path)
.then((directoryEntry: DirectoryEntry) => {
return this.getFile(directoryEntry, file, { create: false });
})
.then((fileEntry: FileEntry) => {
const reader = new FileReader();
return new Promise<T>((resolve, reject) => {
reader.onloadend = () => {
if (reader.result !== undefined || reader.result !== null) {
resolve((reader.result as any) as T);
} else if (reader.error !== undefined || reader.error !== null) {
reject(reader.error);
} else {
reject({ code: null, message: 'READER_ONLOADEND_ERR' });
}
};
fileEntry.file(
file => {
reader[`readAs${readAs}`].call(reader, file);
},
error => {
reject(error);
}
);
});
});
}
/**
* Move a file to a given path.
*
@@ -36,7 +36,7 @@ export interface FingerprintOptions {
*
* @usage
* ```typescript
* import { FingerprintAIO } from '@ionic-native/fingerprint-aio';
* import { FingerprintAIO } from '@ionic-native/fingerprint-aio/ngx';
*
* constructor(private faio: FingerprintAIO) { }
*
@@ -13,7 +13,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { FirebaseAnalytics } from '@ionic-native/firebase-analytics';
* import { FirebaseAnalytics } from '@ionic-native/firebase-analytics/ngx';
*
*
* constructor(private firebaseAnalytics: FirebaseAnalytics) { }
@@ -0,0 +1,189 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs';
/**
* @name Firebase Authentication
* @description
* Cordova plugin for Firebase Authentication
*
* @usage
* ```typescript
* import { FirebaseAuthentication } from '@ionic-native/firebase-authentication/ngx';
*
*
* constructor(private firebaseAuthentication: FirebaseAuthentication) { }
*
* ...
*
*
* this.firebaseAuthentication.createUserWithEmailAndPassword('test@gmail.com', '123')
* .then((res: any) => console.log(res))
* .catch((error: any) => console.error(error));
*
* ```
*/
@Plugin({
pluginName: 'FirebaseAuthentication',
plugin: 'cordova-plugin-firebase-authentication',
pluginRef: 'cordova.plugins.firebase.auth',
repo: 'https://github.com/chemerisuk/cordova-plugin-firebase-authentication',
install: 'ionic cordova plugin add cordova-plugin-firebase-authentication --variable FIREBASE_AUTH_VERSION=version',
installVariables: ['FIREBASE_AUTH_VERSION'],
platforms: ['Android', 'iOS']
})
@Injectable()
export class FirebaseAuthentication extends IonicNativePlugin {
/**
* Returns a JWT token used to identify the user to a Firebase service.
* @param forceRefresh {boolean} Force Refresh
* @return {Promise<any>} Returns the id token
*/
@Cordova({ sync: true })
getIdToken(forceRefresh: boolean): Promise<any> {
return;
}
/**
* Tries to create a new user account with the given email address and password.
* @param email Email
* @param password Password
*/
@Cordova({ sync: true })
createUserWithEmailAndPassword(
email: string,
password: string
): Promise<any> {
return;
}
/**
* Initiates email verification for the current user.
*/
@Cordova({ sync: true })
sendEmailVerification(): Promise<any> {
return;
}
/**
* Triggers the Firebase Authentication backend to send a password-reset email to the given email address,
* which must correspond to an existing user of your app.
* @param email Email
*/
@Cordova({ sync: true })
sendPasswordResetEmail(email: string): Promise<any> {
return;
}
/**
* Asynchronously signs in using an email and password.
* @param email Email
* @param password Password
*/
@Cordova({ sync: true })
signInWithEmailAndPassword(email: string, password: string): Promise<any> {
return;
}
/**
* Starts the phone number verification process for the given phone number.
* NOTE: Android supports auto-verify and instant device verification.
* Therefore in that cases it doesn't make sense to ask for sms code.
* It's recommended to register onAuthStateChanged callback to be notified on auto sign-in.
* timeout [milliseconds] is the maximum amount of time you are willing to wait for SMS auto-retrieval
* to be completed by the library. Maximum allowed value is 2 minutes. Use 0 to disable SMS-auto-retrieval.
* If you specify a positive value less than 30 seconds, library will default to 30 seconds.
* @param phoneNumber Phone number
* @param timeout {number} Timeout
*/
@Cordova({ sync: true })
verifyPhoneNumber(phoneNumber: string, timeout: number): Promise<any> {
return;
}
/**
* Asynchronously signs in using verificationId and 6-digit SMS code.
* @param verificationId Verification ID
* @param smsCode SMS code
*/
@Cordova({ sync: true })
signInWithVerificationId(
verificationId: string,
smsCode: number
): Promise<any> {
return;
}
/**
* Create and use temporary anonymous account to authenticate with Firebase.
*/
@Cordova({ sync: true })
signInAnonymously(): Promise<any> {
return;
}
/**
* Uses Google's idToken and accessToken to sign-in into firebase account. In order to retrieve those tokens follow instructions for Android and iOS
* @param idToken ID Token
* @param accessToken Access Token
*/
@Cordova({ sync: true })
signInWithGoogle(idToken: string, accessToken: string): Promise<any> {
return;
}
/**
* Uses Facebook's accessToken to sign-in into firebase account. In order to retrieve those tokens follow instructions for Android and iOS.
* @param accessToken Access Token
*/
@Cordova({ sync: true })
signInWithFacebook(accessToken: string): Promise<any> {
return;
}
/**
* Uses Twitter's token and secret to sign-in into firebase account. In order to retrieve those tokens follow instructions for Android and iOS.
* @param token Token
* @param secret Secret
*/
@Cordova({ sync: true })
signInWithTwitter(token: string, secret: string): Promise<any> {
return;
}
/**
* Registers a block as an auth state did change listener. To be invoked when:
* - The block is registered as a listener,
* - A user with a different UID from the current user has signed in, or
* - The current user has signed out.
*/
@Cordova({ observable: true, callbackOrder: 'reverse' })
onAuthStateChanged(): Observable<any> {
return;
}
/**
* Set's the current user language code. The string used to set this property must be a language code that follows BCP 47.
* @param languageCode Language Code
*/
@Cordova({ sync: true })
setLanguageCode(languageCode: string): Promise<any> {
return;
}
/**
* Sets languageCode to the apps current language.
*/
@Cordova({ sync: true })
useAppLanguage(): Promise<any> {
return;
}
/**
* Signs out the current user and clears it from the disk cache.
*/
@Cordova({ sync: true })
signOut(): Promise<any> {
return;
}
}

Some files were not shown because too many files have changed in this diff Show More