mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-02-16 00:00:02 +08:00
Compare commits
158 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02219c07c6 | ||
|
|
1f1c35a39f | ||
|
|
0cf84a68ed | ||
|
|
73bcc4053d | ||
|
|
e4af3a0390 | ||
|
|
68105e14fc | ||
|
|
094cfd4c8f | ||
|
|
4e747b8e2c | ||
|
|
d9eb83431d | ||
|
|
2dde2de42d | ||
|
|
e579eb58e2 | ||
|
|
bddafc779a | ||
|
|
a7d5e28671 | ||
|
|
d8e1cbd06e | ||
|
|
f533c5990c | ||
|
|
3ba983aa7f | ||
|
|
805a2737da | ||
|
|
b7dc7ffea7 | ||
|
|
0c2dca633a | ||
|
|
3c893d7119 | ||
|
|
61289bbbba | ||
|
|
dd2dc1b05f | ||
|
|
cef6c8f896 | ||
|
|
e3d3ee2b01 | ||
|
|
ecff55ceba | ||
|
|
1c4cbffe1d | ||
|
|
5355e922ac | ||
|
|
5750f305bf | ||
|
|
f09471207d | ||
|
|
c021fc79e6 | ||
|
|
d616ed5133 | ||
|
|
7865e279c5 | ||
|
|
ff6a69af97 | ||
|
|
9c2b70771d | ||
|
|
ae0d5dbac0 | ||
|
|
9b7148a8a9 | ||
|
|
d30052d8cf | ||
|
|
56126dd6a9 | ||
|
|
8fa353c1b8 | ||
|
|
55826b691f | ||
|
|
d7f4347f39 | ||
|
|
06247530a8 | ||
|
|
4d45e82e0e | ||
|
|
df36932de7 | ||
|
|
ce3a3c8b76 | ||
|
|
0f6d1c8354 | ||
|
|
72da25ff29 | ||
|
|
96cc995333 | ||
|
|
b600651f02 | ||
|
|
81987ebce4 | ||
|
|
555bb83916 | ||
|
|
b18a2c874e | ||
|
|
d92c4cf70a | ||
|
|
0d5991c604 | ||
|
|
1fbd4c763c | ||
|
|
f82f350613 | ||
|
|
5f30a88304 | ||
|
|
4372ff160a | ||
|
|
02be833b85 | ||
|
|
6d1d9f480d | ||
|
|
a151860df9 | ||
|
|
c9acedae52 | ||
|
|
ece66eeb7f | ||
|
|
2b6c297da8 | ||
|
|
126d44faf3 | ||
|
|
8047c9ad52 | ||
|
|
178f56625e | ||
|
|
fbd523f36a | ||
|
|
0527afe935 | ||
|
|
e3af183e0c | ||
|
|
f9110cb429 | ||
|
|
bb1164f4fc | ||
|
|
4cd48b4d0e | ||
|
|
baa207b724 | ||
|
|
213a26730e | ||
|
|
611374066e | ||
|
|
f609b9332b | ||
|
|
a236719a71 | ||
|
|
d726bac60e | ||
|
|
7e533f48b9 | ||
|
|
d6827531ee | ||
|
|
e96885c6b0 | ||
|
|
6b827ffe95 | ||
|
|
90e5028547 | ||
|
|
b2b3e3a6e3 | ||
|
|
06018b2cc7 | ||
|
|
f5c3307969 | ||
|
|
4435e7a3e0 | ||
|
|
7a0a73db3b | ||
|
|
7fe38aa378 | ||
|
|
bd0f4b07b4 | ||
|
|
402f4b7987 | ||
|
|
6c9bd07361 | ||
|
|
7f0077979c | ||
|
|
da2ec29c05 | ||
|
|
26bd115891 | ||
|
|
f92c99bfbf | ||
|
|
9031371721 | ||
|
|
2d836d3cd0 | ||
|
|
ae8221001e | ||
|
|
277d696a02 | ||
|
|
5b768854da | ||
|
|
a589dac215 | ||
|
|
950a1bb4ff | ||
|
|
1b15bf4557 | ||
|
|
bfd111e9d6 | ||
|
|
9715ef8755 | ||
|
|
e21bd1a50e | ||
|
|
99ec80e2e7 | ||
|
|
91da2e5020 | ||
|
|
e1ff6de9ef | ||
|
|
d9b3638f3d | ||
|
|
82f7fd9e0a | ||
|
|
0579e67e96 | ||
|
|
2d55ad694c | ||
|
|
5ae27d8ad4 | ||
|
|
0ec396b25c | ||
|
|
a095422889 | ||
|
|
a924fb519f | ||
|
|
63cfd4488d | ||
|
|
9b4502f929 | ||
|
|
ba37646fc4 | ||
|
|
3b1d0593da | ||
|
|
ff78ca7fb4 | ||
|
|
b283dc2e76 | ||
|
|
cc2a78c858 | ||
|
|
65d3053a53 | ||
|
|
f02bc78ec2 | ||
|
|
7fe3ad1daa | ||
|
|
e51a1a79ef | ||
|
|
74a80c0953 | ||
|
|
e32ac8c6c9 | ||
|
|
cf23a52ea2 | ||
|
|
e7aab1d814 | ||
|
|
34afbd1c53 | ||
|
|
56054d036e | ||
|
|
c654ea5925 | ||
|
|
70d7acc113 | ||
|
|
60aa74baed | ||
|
|
af55cb25fa | ||
|
|
2b8992faf3 | ||
|
|
e90a6a306c | ||
|
|
97f566170e | ||
|
|
d2e92f5589 | ||
|
|
c544b43a51 | ||
|
|
755b28e325 | ||
|
|
6a97dc5e07 | ||
|
|
2d347e46ed | ||
|
|
ef499ed290 | ||
|
|
1e258adeb5 | ||
|
|
5c0b31faa7 | ||
|
|
d00d54f507 | ||
|
|
2e5e43fa7b | ||
|
|
8eddcb0d45 | ||
|
|
4716a9db68 | ||
|
|
7eb57cdde8 | ||
|
|
6f38115ce2 | ||
|
|
d76dfae916 |
6
.github/ISSUE_TEMPLATE.md
vendored
6
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,7 +1,7 @@
|
||||
**I'm submitting a ...** (check one with "x")
|
||||
[ ] bug report
|
||||
[ ] feature request
|
||||
[ ] support request => Please do not submit support requests here, use the discussions section https://github.com/danielsogl/awesome-cordova-plugins/discussions
|
||||
- [ ] bug report
|
||||
- [ ] feature request
|
||||
- [ ] support request => Please do not submit support requests here, use the discussions section https://github.com/danielsogl/awesome-cordova-plugins/discussions
|
||||
|
||||
**Current behavior:**
|
||||
<!-- Describe how the bug manifests. -->
|
||||
|
||||
4
.github/workflows/nodejs.yml
vendored
4
.github/workflows/nodejs.yml
vendored
@@ -11,9 +11,9 @@ jobs:
|
||||
node-version: [16.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3.1.0
|
||||
- uses: actions/checkout@v4.1.1
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3.5.1
|
||||
uses: actions/setup-node@v4.0.1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
|
||||
8
.github/workflows/npmpublish.yml
vendored
8
.github/workflows/npmpublish.yml
vendored
@@ -9,8 +9,8 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3.1.0
|
||||
- uses: actions/setup-node@v3.5.1
|
||||
- uses: actions/checkout@v4.1.1
|
||||
- uses: actions/setup-node@v4.0.1
|
||||
with:
|
||||
node-version: 16
|
||||
- name: Install dependencies
|
||||
@@ -24,8 +24,8 @@ jobs:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3.1.0
|
||||
- uses: actions/setup-node@v3.5.1
|
||||
- uses: actions/checkout@v4.1.1
|
||||
- uses: actions/setup-node@v4.0.1
|
||||
with:
|
||||
node-version: 16
|
||||
registry-url: https://registry.npmjs.org/
|
||||
|
||||
2
.github/workflows/stale.yml
vendored
2
.github/workflows/stale.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v6
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: 'There has been no recent activity and this issue has been marked inactive.'
|
||||
|
||||
86
CHANGELOG.md
86
CHANGELOG.md
@@ -1,3 +1,89 @@
|
||||
# [6.5.0](https://github.com/danielsogl/awesome-cordova-plugins/compare/v6.4.0...v6.5.0) (2023-12-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** update dependency tslib to v2.6.1 ([#4610](https://github.com/danielsogl/awesome-cordova-plugins/issues/4610)) [skip ci] ([d30052d](https://github.com/danielsogl/awesome-cordova-plugins/commit/d30052d8cfadcbae95a5437dc8692c87b39c5294))
|
||||
* **deps:** update dependency tslib to v2.6.2 ([#4669](https://github.com/danielsogl/awesome-cordova-plugins/issues/4669)) [skip ci] ([5355e92](https://github.com/danielsogl/awesome-cordova-plugins/commit/5355e922acd5ea6c09a94bd82064eeae52926c06))
|
||||
* **diagnostic:** add LIMITED permissionStatus ([#4645](https://github.com/danielsogl/awesome-cordova-plugins/issues/4645)) ([3ba983a](https://github.com/danielsogl/awesome-cordova-plugins/commit/3ba983aa7f8a3ce382c164929cda37921056cfcc)), closes [#4600](https://github.com/danielsogl/awesome-cordova-plugins/issues/4600) [#4608](https://github.com/danielsogl/awesome-cordova-plugins/issues/4608) [#4617](https://github.com/danielsogl/awesome-cordova-plugins/issues/4617) [#3491](https://github.com/danielsogl/awesome-cordova-plugins/issues/3491)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **clevertap:** support clevertap-cordova 2.7.2 ([#4683](https://github.com/danielsogl/awesome-cordova-plugins/issues/4683)) [skip ci] ([bddafc7](https://github.com/danielsogl/awesome-cordova-plugins/commit/bddafc779a65379c5d09fa74418830b81e2525a7)), closes [#3491](https://github.com/danielsogl/awesome-cordova-plugins/issues/3491)
|
||||
|
||||
|
||||
|
||||
# [6.4.0](https://github.com/danielsogl/awesome-cordova-plugins/compare/v6.3.0...v6.4.0) (2023-07-11)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** update dependency tslib to v2.5.0 ([#4552](https://github.com/danielsogl/awesome-cordova-plugins/issues/4552)) [skip ci] ([7e533f4](https://github.com/danielsogl/awesome-cordova-plugins/commit/7e533f48b9112fd4f8c6807d86362526985b395b))
|
||||
* **deps:** update dependency tslib to v2.6.0 ([#4595](https://github.com/danielsogl/awesome-cordova-plugins/issues/4595)) ([b600651](https://github.com/danielsogl/awesome-cordova-plugins/commit/b600651f02e56e446e49b2ae40418d46e0dca09b))
|
||||
* **mobile-messaging:** correct return type of submitEvent ([#4564](https://github.com/danielsogl/awesome-cordova-plugins/issues/4564)) ([0527afe](https://github.com/danielsogl/awesome-cordova-plugins/commit/0527afe93578810b4084e0da330574f956b0a7b5))
|
||||
* **mobile-messaging:** fix event (un)register and saveUser ([#4569](https://github.com/danielsogl/awesome-cordova-plugins/issues/4569)) ([fbd523f](https://github.com/danielsogl/awesome-cordova-plugins/commit/fbd523f36a7214b1e933cca8765fece744ea8192))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **cashfree-pg:** support cordova-plugin-cashfree-pg 1.0.2 ([#4572](https://github.com/danielsogl/awesome-cordova-plugins/issues/4572)) ([8047c9a](https://github.com/danielsogl/awesome-cordova-plugins/commit/8047c9ad5203f9d6b53a663907c5f07c24fe565b))
|
||||
* **http:** onProgress param to sendRequest method ([#4512](https://github.com/danielsogl/awesome-cordova-plugins/issues/4512)) ([4cd48b4](https://github.com/danielsogl/awesome-cordova-plugins/commit/4cd48b4d0e72770962857c96c001c5597b504772))
|
||||
* **newrelic:** add shutdown method ([#4571](https://github.com/danielsogl/awesome-cordova-plugins/issues/4571)) ([178f566](https://github.com/danielsogl/awesome-cordova-plugins/commit/178f56625e63aa679b592995750d109e05f421c1))
|
||||
* **smartlook:** rewrite smartlook ionic plugin ([#4510](https://github.com/danielsogl/awesome-cordova-plugins/issues/4510)) ([baa207b](https://github.com/danielsogl/awesome-cordova-plugins/commit/baa207b724b78ed1d40abec6bada933dab829f96))
|
||||
* **sms-retriever-api:** add plugin ([#4528](https://github.com/danielsogl/awesome-cordova-plugins/issues/4528)) ([e3af183](https://github.com/danielsogl/awesome-cordova-plugins/commit/e3af183e0c3d51292e14f4285dd8c71e4c564b39))
|
||||
* **smtp-client:** add plugin ([#4585](https://github.com/danielsogl/awesome-cordova-plugins/issues/4585)) ([2b6c297](https://github.com/danielsogl/awesome-cordova-plugins/commit/2b6c297da81958f9f1b3fa58c1a6ddfb3520d220))
|
||||
* **urbanairship:** Add locale override methods ([#4579](https://github.com/danielsogl/awesome-cordova-plugins/issues/4579)) ([126d44f](https://github.com/danielsogl/awesome-cordova-plugins/commit/126d44faf37b341ad05a4ecf4146c5c4e5d1ccdf))
|
||||
* **zip:** add callback param so the progress function can be calleds ([#4519](https://github.com/danielsogl/awesome-cordova-plugins/issues/4519)) ([f9110cb](https://github.com/danielsogl/awesome-cordova-plugins/commit/f9110cb4295b964ce89aef8fe3c56e71a09bb320))
|
||||
|
||||
|
||||
|
||||
# [6.3.0](https://github.com/danielsogl/awesome-cordova-plugins/compare/v6.2.0...v6.3.0) (2022-12-31)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **chooser:** Update for support android 11+ ([#4436](https://github.com/danielsogl/awesome-cordova-plugins/issues/4436)) ([ba37646](https://github.com/danielsogl/awesome-cordova-plugins/commit/ba37646fc4b7cc86b497affa0ef932ad374b9080))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **advanced-image-picker:** add plugin ([#4434](https://github.com/danielsogl/awesome-cordova-plugins/issues/4434)) ([63cfd44](https://github.com/danielsogl/awesome-cordova-plugins/commit/63cfd4488d17b5cdac8a8302b310acc6c308c5a2))
|
||||
* **brightness:** add brightness plugin ([#4454](https://github.com/danielsogl/awesome-cordova-plugins/issues/4454)) ([f02bc78](https://github.com/danielsogl/awesome-cordova-plugins/commit/f02bc78ec253f6388750e662571300c82e990b51))
|
||||
* **clevertap:** support clevertap-cordova 2.6.0 ([#4458](https://github.com/danielsogl/awesome-cordova-plugins/issues/4458)) ([74a80c0](https://github.com/danielsogl/awesome-cordova-plugins/commit/74a80c0953577478bd15fe16ab9edf28dcb27280)), closes [#3491](https://github.com/danielsogl/awesome-cordova-plugins/issues/3491)
|
||||
* **diagnostics:** add getBluetoothAuthorizationStatuses function ([#4442](https://github.com/danielsogl/awesome-cordova-plugins/issues/4442)) ([ff78ca7](https://github.com/danielsogl/awesome-cordova-plugins/commit/ff78ca7fb4335698076282ec9da99433939f276a))
|
||||
* **fbsdk:** add plugin ([#4431](https://github.com/danielsogl/awesome-cordova-plugins/issues/4431)) ([a095422](https://github.com/danielsogl/awesome-cordova-plugins/commit/a0954228896b53dc42db3cbf6d6e89764d83646d))
|
||||
* **ffmpeg:** add plugin ([#4435](https://github.com/danielsogl/awesome-cordova-plugins/issues/4435)) ([9b4502f](https://github.com/danielsogl/awesome-cordova-plugins/commit/9b4502f9297d1a0a579db3fd0165c98e0897625e))
|
||||
* **fingerprint-aio:** update plugin ([#4423](https://github.com/danielsogl/awesome-cordova-plugins/issues/4423)) ([0579e67](https://github.com/danielsogl/awesome-cordova-plugins/commit/0579e67e966eb0469bccd22ee88d0c4c9c375838))
|
||||
* **mobile-accessibility:** add mobile-accessibility plugin ([#4456](https://github.com/danielsogl/awesome-cordova-plugins/issues/4456)) ([e51a1a7](https://github.com/danielsogl/awesome-cordova-plugins/commit/e51a1a79efcfd99e05783d567472251277f1bf93))
|
||||
* **power-management:** add power management support ([#4443](https://github.com/danielsogl/awesome-cordova-plugins/issues/4443)) ([b283dc2](https://github.com/danielsogl/awesome-cordova-plugins/commit/b283dc2e761dd897556a8ed955a312b663ca9c5e))
|
||||
* **unique-device-id:** add unique-device-id plugin ([#4455](https://github.com/danielsogl/awesome-cordova-plugins/issues/4455)) ([7fe3ad1](https://github.com/danielsogl/awesome-cordova-plugins/commit/7fe3ad1daabeac6c8365ddfce4d2b44df94ed00b))
|
||||
* **wonderpush:** expose getters and setters ([#4441](https://github.com/danielsogl/awesome-cordova-plugins/issues/4441)) ([3b1d059](https://github.com/danielsogl/awesome-cordova-plugins/commit/3b1d0593daf5732ea9f6268af84a612a575a3941))
|
||||
|
||||
|
||||
|
||||
# [6.2.0](https://github.com/danielsogl/awesome-cordova-plugins/compare/v6.1.0...v6.2.0) (2022-11-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **bluetooth-le:** use correct return types ([#4411](https://github.com/danielsogl/awesome-cordova-plugins/issues/4411)) ([2d347e4](https://github.com/danielsogl/awesome-cordova-plugins/commit/2d347e46edb47a13e662e55ae8c126021a54ea85))
|
||||
* **deps:** update dependency tslib to v2.4.1 ([#4413](https://github.com/danielsogl/awesome-cordova-plugins/issues/4413)) ([e90a6a3](https://github.com/danielsogl/awesome-cordova-plugins/commit/e90a6a306c24bf5b58ff2419fe1e8fea73c62472))
|
||||
* **diagnostic:** add getBluetoothAuthorizationStatus function ([#4398](https://github.com/danielsogl/awesome-cordova-plugins/issues/4398)) ([c544b43](https://github.com/danielsogl/awesome-cordova-plugins/commit/c544b43a5198566b2e56a0c3e0bbeb74e5527f0e))
|
||||
* **diagnostic:** add new Android runtime permissions for Bluetooth ([#4402](https://github.com/danielsogl/awesome-cordova-plugins/issues/4402)) ([6a97dc5](https://github.com/danielsogl/awesome-cordova-plugins/commit/6a97dc5e07ace559b766482ca1ee1a187ffb5d0c))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **ble:** add wrapper for starting location notifications ([#4399](https://github.com/danielsogl/awesome-cordova-plugins/issues/4399)) ([755b28e](https://github.com/danielsogl/awesome-cordova-plugins/commit/755b28e32534d75a6f8079b9be5a8e1b81aef636))
|
||||
* **crop-privacy:** add plugin ([#4408](https://github.com/danielsogl/awesome-cordova-plugins/issues/4408)) ([1e258ad](https://github.com/danielsogl/awesome-cordova-plugins/commit/1e258adeb5506d3bfa3eff755a710fa6373f6dcc))
|
||||
* **device:** detect if app is running on a macOS desktop with Apple Silicon ([#4299](https://github.com/danielsogl/awesome-cordova-plugins/issues/4299)) ([af55cb2](https://github.com/danielsogl/awesome-cordova-plugins/commit/af55cb25fa39146c0ed79d94e3805a401b881cc2))
|
||||
* **file-chooser:** add plugin ([#4396](https://github.com/danielsogl/awesome-cordova-plugins/issues/4396)) ([97f5661](https://github.com/danielsogl/awesome-cordova-plugins/commit/97f566170efdc90f48a4f7b4aef292dccfb0165c))
|
||||
* **image-resizer:** add plugin ([#4397](https://github.com/danielsogl/awesome-cordova-plugins/issues/4397)) ([d2e92f5](https://github.com/danielsogl/awesome-cordova-plugins/commit/d2e92f558972d62e6061494bee3562c70dfe7de1))
|
||||
* **newrelic:** add plugin ([#4409](https://github.com/danielsogl/awesome-cordova-plugins/issues/4409)) ([ef499ed](https://github.com/danielsogl/awesome-cordova-plugins/commit/ef499ed290d399a76ff3428b2dca63bd7ae0977f))
|
||||
|
||||
|
||||
|
||||
# [6.1.0](https://github.com/danielsogl/awesome-cordova-plugins/compare/v6.0.1...v6.1.0) (2022-10-22)
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ To learn more about the reasons why Ionic Native was renamed to Awesome Cordova
|
||||
|
||||
## Capacitor Support
|
||||
|
||||
In addition to Cordova, Awesome Cordova Plugins also works with [Capacitor](https://capacitor.ionicframework.com), Ionic's official native runtime. Basic usage below. For complete details, [see the Capacitor documentation](https://capacitor.ionicframework.com/docs/cordova/using-cordova-plugins).
|
||||
In addition to Cordova, Awesome Cordova Plugins also works with [Capacitor](https://capacitorjs.com), Ionic's official native runtime. Basic usage below. For complete details, [see the Capacitor documentation](https://capacitorjs.com/docs/v2/cordova/using-cordova-plugins).
|
||||
|
||||
## Installation
|
||||
|
||||
|
||||
@@ -217,6 +217,9 @@
|
||||
* [Browser Tab](plugins/browser-tab.md)
|
||||
* [Dynamsoft Barcode Scanner](plugins/dynamsoft-barcode-scanner.md)
|
||||
* [GCDWebServer](plugins/gcdwebserver.md)
|
||||
* [Smtp Client](plugins/smtp-client.md)
|
||||
* [Cashfree PG](plugins/cashfree-pg/README.md)
|
||||
* [Save Dialog](plugins/save-dialog/README.md)
|
||||
* [Installation](installation.md)
|
||||
* [FAQ](faq.md)
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# Adjust
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add com.adjust.sdk
|
||||
# AdjustThirdPartySharing
|
||||
ova plugin add com.adjust.sdk
|
||||
$ npm install @awesome-cordova-plugins/adjust
|
||||
```
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# AdMob
|
||||
# RewardVideo
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-admob-plus
|
||||
@@ -7,18 +7,13 @@ $ npm install @awesome-cordova-plugins/admob-plus
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/admob-plus/)
|
||||
|
||||
Plugin Repo: [https://github.com/admob-plus/admob-plus](https://github.com/admob-plus/admob-plus)
|
||||
Plugin Repo: []()
|
||||
|
||||
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
|
||||
|
||||
|
||||
n-admob-free, which provides a cleaner API and build with modern tools.
|
||||
|
||||
github.com/admob-plus/admob-plus](https://github.com/admob-plus/admob-plus)
|
||||
|
||||
AdMob Plus is the successor of cordova-plugin-admob-free, which provides a cleaner API and build with modern tools.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
|
||||
20
docs/plugins/advanced-image-picker/README.md
Normal file
20
docs/plugins/advanced-image-picker/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# AdvancedImagePicker
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-advanced-imagepicker
|
||||
$ npm install @awesome-cordova-plugins/advanced-image-picker
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/advanced-image-picker/)
|
||||
|
||||
Plugin Repo: [https://github.com/EinfachHans/cordova-plugin-advanced-imagepicker](https://github.com/EinfachHans/cordova-plugin-advanced-imagepicker)
|
||||
|
||||
This Cordova Plugin is for a better (multiple) ImagePicker with more options.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
|
||||
|
||||
|
||||
20
docs/plugins/app-review/README.md
Normal file
20
docs/plugins/app-review/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# App Review
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-app-review
|
||||
$ npm install @awesome-cordova-plugins/app-review
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/app-review/)
|
||||
|
||||
Plugin Repo: [https://github.com/chemerisuk/cordova-plugin-app-review](https://github.com/chemerisuk/cordova-plugin-app-review)
|
||||
|
||||
Cordova plugin to review app
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# BackgroundUpload
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-background-upload
|
||||
$ ionic cordova plugin add @spoonconsulting/cordova-plugin-background-upload
|
||||
$ npm install @awesome-cordova-plugins/background-upload
|
||||
```
|
||||
|
||||
|
||||
22
docs/plugins/brightness/README.md
Normal file
22
docs/plugins/brightness/README.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Brightness
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-brightness
|
||||
$ npm install @awesome-cordova-plugins/brightness
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/brightness/)
|
||||
|
||||
Plugin Repo: [https://github.com/mgcrea/cordova-plugin-brightness](https://github.com/mgcrea/cordova-plugin-brightness)
|
||||
|
||||
The Brightness plugin let you control the display brightness of your device.
|
||||
|
||||
Requires Cordova plugin: `cordova-plugin-brightness`. For more info, please see the [Brightness plugin docs](https://github.com/mgcrea/cordova-plugin-brightness).
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
|
||||
|
||||
|
||||
@@ -14,4 +14,7 @@ This plugin provides an interface to in-app browser tabs that exist on some mobi
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
- iOS
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@ Requires the Cordova plugin: `cordova-plugin-camera`. For more info, please see
|
||||
[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>
|
||||
<string>You can take photos</string>
|
||||
</config-file>
|
||||
```
|
||||
inside of the <platform name='ios> section
|
||||
inside of the `<platform name='ios>` section
|
||||
|
||||
## Supported platforms
|
||||
|
||||
|
||||
18
docs/plugins/cashfree-pg/README.md
Normal file
18
docs/plugins/cashfree-pg/README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# CFPaymentComponentBuilder
|
||||
nic cordova plugin add cordova-plugin-cashfree-pg
|
||||
$ npm install @awesome-cordova-plugins/cashfree-pg
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/cashfree-pg/)
|
||||
|
||||
Plugin Repo: [https://github.com/cashfree/cordova-plugin-cashfree](https://github.com/cashfree/cordova-plugin-cashfree)
|
||||
|
||||
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# Chooser
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-chooser
|
||||
$ ionic cordova plugin add http://github.com/MaximBelov/cordova-plugin-chooser.git
|
||||
$ npm install @awesome-cordova-plugins/chooser
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/chooser/)
|
||||
|
||||
Plugin Repo: [https://github.com/cyph/cordova-plugin-chooser](https://github.com/cyph/cordova-plugin-chooser)
|
||||
Plugin Repo: [https://github.com/MaximBelov/cordova-plugin-chooser](https://github.com/MaximBelov/cordova-plugin-chooser)
|
||||
|
||||
File chooser plugin for Cordova.
|
||||
|
||||
|
||||
19
docs/plugins/crop-plugin-privacy/README.md
Normal file
19
docs/plugins/crop-plugin-privacy/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Crop Plugin Privacy
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-crop-privacy
|
||||
$ npm install @awesome-cordova-plugins/crop-plugin-privacy
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/crop-plugin-privacy/)
|
||||
|
||||
Plugin Repo: [https://github.com/BaraAksayeth25/cordova-plugin-crop-privacy](https://github.com/BaraAksayeth25/cordova-plugin-crop-privacy)
|
||||
|
||||
This plugin does something
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Answers
|
||||
# Crashlytics
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-fabric-plugin --variable FABRIC_API_KEY=XXX --variable FABRIC_API_SECRET=xxx
|
||||
@@ -9,7 +9,7 @@ $ npm install @awesome-cordova-plugins/fabric
|
||||
|
||||
Plugin Repo: [https://www.npmjs.com/package/cordova-fabric-plugin](https://www.npmjs.com/package/cordova-fabric-plugin)
|
||||
|
||||
API for interacting with the Answers kit.
|
||||
API for interacting with the Crashlytics kit.
|
||||
|
||||
https://docs.fabric.io/crashlytics/index.html
|
||||
|
||||
@@ -20,7 +20,3 @@ https://docs.fabric.io/crashlytics/index.html
|
||||
|
||||
|
||||
|
||||
OS
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ Click `'Add Platform'`.
|
||||
At this point you'll need to open your project's [`config.xml`](https://cordova.apache.org/docs/en/latest/config_ref/index.html) file, found in the root directory of your project.
|
||||
|
||||
Take note of the `id` for the next step:
|
||||
```
|
||||
```xml
|
||||
<widget id="com.mycompany.testapp" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
```
|
||||
|
||||
|
||||
89
docs/plugins/fbsdk/README.md
Normal file
89
docs/plugins/fbsdk/README.md
Normal file
@@ -0,0 +1,89 @@
|
||||
# FbSdk
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-fbsdk --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable CLIENT_TOKEN="abcd1234"
|
||||
$ npm install @awesome-cordova-plugins/fbsdk
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/fbsdk/)
|
||||
|
||||
Plugin Repo: [https://github.com/MaximBelov/cordova-plugin-fbsdk](https://github.com/MaximBelov/cordova-plugin-fbsdk)
|
||||
|
||||
Use the Facebook SDK plugin to obtain access to the native FB application on iOS and Android.
|
||||
|
||||
Requires Cordova plugin: `cordova-plugin-fbsdk`. For more info, please see the [Facebook SDK](https://github.com/MaximBelov/cordova-plugin-fbsdk).
|
||||
|
||||
#### Installation
|
||||
|
||||
To use the FB plugin, you first have to create a new Facebook App inside of the Facebook developer portal at [https://developers.facebook.com/apps](https://developers.facebook.com/apps).
|
||||
|
||||
[](https://developers.facebook.com/apps/)
|
||||
|
||||
Retrieve the `App ID` and `App Name`.
|
||||
|
||||
[](https://developers.facebook.com/apps/)
|
||||
|
||||
Then type in the following command in your Terminal, where APP_ID and APP_NAME are the values from the Facebook Developer portal.
|
||||
|
||||
```bash
|
||||
ionic cordova plugin add cordova-plugin-fbsdk --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable CLIENT_TOKEN="abcd1234"
|
||||
```
|
||||
|
||||
After, you'll need to add the native platforms you'll be using to your app in the Facebook Developer portal under your app's Settings:
|
||||
|
||||
[](https://developers.facebook.com/apps/)
|
||||
|
||||
Click `'Add Platform'`.
|
||||
|
||||
[](https://developers.facebook.com/apps/)
|
||||
|
||||
At this point you'll need to open your project's [`config.xml`](https://cordova.apache.org/docs/en/latest/config_ref/index.html) file, found in the root directory of your project.
|
||||
|
||||
Take note of the `id` for the next step:
|
||||
```
|
||||
<widget id="com.mycompany.testapp" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
```
|
||||
|
||||
You can also edit the `id` to whatever you'd like it to be.
|
||||
|
||||
#### Client Access Tokens
|
||||
|
||||
[](https://developers.facebook.com/docs/facebook-login/guides/access-tokens#clienttokens)
|
||||
|
||||
|
||||
#### iOS Install
|
||||
Under 'Bundle ID', add the `id` from your `config.xml` file:
|
||||
|
||||
[](https://developers.facebook.com/apps/)
|
||||
|
||||
|
||||
#### Android Install
|
||||
Under 'Google Play Package Name', add the `id` from your `config.xml` file:
|
||||
|
||||
[](https://developers.facebook.com/apps/)
|
||||
|
||||
|
||||
And that's it! You can now make calls to Facebook using the plugin.
|
||||
|
||||
## Events
|
||||
|
||||
App events allow you to understand the makeup of users engaging with your app, measure the performance of your Facebook mobile app ads, and reach specific sets of your users with Facebook mobile app ads.
|
||||
|
||||
- [iOS] [https://developers.facebook.com/docs/ios/app-events](https://developers.facebook.com/docs/ios/app-events)
|
||||
- [Android] [https://developers.facebook.com/docs/android/app-events](https://developers.facebook.com/docs/android/app-events)
|
||||
- [JS] Does not have an Events API, so the plugin functions are empty and will return an automatic success
|
||||
|
||||
Activation events are automatically tracked for you in the plugin.
|
||||
|
||||
Events are listed on the [insights page](https://www.facebook.com/insights/).
|
||||
|
||||
For tracking events, see `logEvent` and `logPurchase`.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
- Browser
|
||||
|
||||
|
||||
|
||||
20
docs/plugins/ffmpeg/README.md
Normal file
20
docs/plugins/ffmpeg/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# FFMpeg
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-ffmpeg
|
||||
$ npm install @awesome-cordova-plugins/ffmpeg
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/ffmpeg/)
|
||||
|
||||
Plugin Repo: [https://github.com/MaximBelov/cordova-plugin-ffmpeg](https://github.com/MaximBelov/cordova-plugin-ffmpeg)
|
||||
|
||||
Simple plugin that binds mobile ffmpeg to execute ffmpeg commands
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
|
||||
|
||||
|
||||
19
docs/plugins/file-chooser/README.md
Normal file
19
docs/plugins/file-chooser/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# FileChooser Plugin
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-filechooser
|
||||
$ npm install @awesome-cordova-plugins/file-chooser
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/file-chooser/)
|
||||
|
||||
Plugin Repo: [https://github.com/ihadeed/cordova-filechooser](https://github.com/ihadeed/cordova-filechooser)
|
||||
|
||||
Cordova FileChooser Plugin
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
|
||||
|
||||
|
||||
45
docs/plugins/firebase-model/README.md
Normal file
45
docs/plugins/firebase-model/README.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# FirebaseModelInput
|
||||
Result
|
||||
t
|
||||
cordova plugin add cordova-plugin-firebase-model
|
||||
$ npm install @awesome-cordova-plugins/firebase-model
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/firebase-model/)
|
||||
|
||||
Plugin Repo: ['']('')
|
||||
|
||||
This plugin downloads the TensorFlow model from firebase and classify the images.
|
||||
|
||||
```typescript
|
||||
import { FirebaseModel } from '@ionic-native/ionic-native-firebase-model';
|
||||
|
||||
|
||||
constructor(private firebaseModel: FirebaseModel) { }
|
||||
|
||||
...
|
||||
|
||||
|
||||
this.firebaseModel.configure('Sample_Model')
|
||||
.subscribe((res: FirebaseModelConfigResult) => console.log(res.status + " - " + res.progress))
|
||||
.catch((error: any) => console.error(error));
|
||||
|
||||
|
||||
try {
|
||||
var result:FirebaseModelClassifyResult = await this.firebaseModel.classify("/Documents/input_image.png")
|
||||
console.log(result.label + " - " + result.score)
|
||||
|
||||
}
|
||||
catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
|
||||
|
||||
```
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- iOS
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# GCDWebServer
|
||||
# gcdwebserver
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-gcdwebserver
|
||||
$ ''
|
||||
$ npm install @awesome-cordova-plugins/gcdwebserver
|
||||
```
|
||||
|
||||
@@ -9,11 +9,11 @@ $ npm install @awesome-cordova-plugins/gcdwebserver
|
||||
|
||||
Plugin Repo: [https://github.com/xulihang/cordova-plugin-gcdwebserver](https://github.com/xulihang/cordova-plugin-gcdwebserver)
|
||||
|
||||
The [GCDWebServer](https://github.com/swisspol/GCDWebServer/) Plugin can start an HTTP server to serve static files.
|
||||
This plugin can start an HTTP server using GCDWebServer
|
||||
|
||||
## Supported platforms
|
||||
|
||||
iOS
|
||||
- iOS
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# HyperTrack
|
||||
|
||||
# Coordinates
|
||||
alidationError
|
||||
ic cordova plugin add cordova-plugin-hypertrack-v3
|
||||
$ npm install @awesome-cordova-plugins/hyper-track
|
||||
|
||||
20
docs/plugins/image-resizer/README.md
Normal file
20
docs/plugins/image-resizer/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# ImageResizer
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-image-resizer
|
||||
$ npm install @awesome-cordova-plugins/image-resizer
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/image-resizer/)
|
||||
|
||||
Plugin Repo: [https://github.com/JoschkaSchulz/cordova-plugin-image-resizer](https://github.com/JoschkaSchulz/cordova-plugin-image-resizer)
|
||||
|
||||
Cordova Plugin For Image Resize
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
|
||||
|
||||
|
||||
22
docs/plugins/mobile-accessibility/README.md
Normal file
22
docs/plugins/mobile-accessibility/README.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Mobile Accessibility
|
||||
|
||||
```
|
||||
$ ''
|
||||
$ npm install @awesome-cordova-plugins/mobile-accessibility
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/mobile-accessibility/)
|
||||
|
||||
Plugin Repo: [https://github.com/phonegap/phonegap-mobile-accessibility](https://github.com/phonegap/phonegap-mobile-accessibility)
|
||||
|
||||
This plugin exposes information on the status of various accessibility features of mobile operating systems, including, for example, whether a screen reader is running, invert colors is enabled, and the preferred scaling for text.
|
||||
It also allows an application to send a string to be spoken by the screen reader, or a command to stop the screen reader from speaking.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
- Amazon Fire OS
|
||||
|
||||
|
||||
|
||||
20
docs/plugins/newrelic/README.md
Normal file
20
docs/plugins/newrelic/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# newrelic mobile
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add https://github.com/newrelic/newrelic-cordova-plugin.git --variable IOS_APP_TOKEN="{ios-app-token}" --variable ANDROID_APP_TOKEN="{android-app-token}"
|
||||
$ npm install @awesome-cordova-plugins/newrelic
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/newrelic/)
|
||||
|
||||
Plugin Repo: [https://github.com/newrelic/newrelic-cordova-plugin](https://github.com/newrelic/newrelic-cordova-plugin)
|
||||
|
||||
This NewRelic plugin collect crashes, network traffic, and other information for hybrid apps using native components.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# UriHelper
|
||||
# NFC
|
||||
|
||||
ionic cordova plugin add phonegap-nfc
|
||||
```
|
||||
$ ionic cordova plugin add phonegap-nfc
|
||||
$ npm install @awesome-cordova-plugins/nfc
|
||||
```
|
||||
|
||||
|
||||
19
docs/plugins/power-management.md
Normal file
19
docs/plugins/power-management.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Power Management
|
||||
|
||||
```text
|
||||
$ ionic cordova plugin add cordova-plugin-powermanagement
|
||||
$ npm install @awesome-cordova-plugins/power-management
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://github.com/Viras-/cordova-plugin-powermanagement/)
|
||||
|
||||
Plugin Repo: [https://github.com/Viras-/cordova-plugin-powermanagement](https://github.com/Viras-/cordova-plugin-powermanagement)
|
||||
|
||||
A Cordova plugin that offers access to the devices power-management functionality.
|
||||
It should be used for applications which keep running for a long time without any user interaction.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
* Android
|
||||
* iOS
|
||||
|
||||
21
docs/plugins/power-management/README.md
Normal file
21
docs/plugins/power-management/README.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Power Management
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-powermanagement-orig
|
||||
$ npm install @awesome-cordova-plugins/power-management
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/power-management/)
|
||||
|
||||
Plugin Repo: [https://github.com/Viras-/cordova-plugin-powermanagement](https://github.com/Viras-/cordova-plugin-powermanagement)
|
||||
|
||||
The PowerManagement plugin offers access to the devices power-management functionality.
|
||||
It should be used for applications which keep running for a long time without any user interaction.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
|
||||
|
||||
|
||||
19
docs/plugins/power-management/power-management.md
Normal file
19
docs/plugins/power-management/power-management.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Power Management
|
||||
|
||||
```text
|
||||
$ ionic cordova plugin add cordova-plugin-powermanagement
|
||||
$ npm install @awesome-cordova-plugins/power-management
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://github.com/Viras-/cordova-plugin-powermanagement/)
|
||||
|
||||
Plugin Repo: [https://github.com/Viras-/cordova-plugin-powermanagement](https://github.com/Viras-/cordova-plugin-powermanagement)
|
||||
|
||||
A Cordova plugin that offers access to the devices power-management functionality.
|
||||
It should be used for applications which keep running for a long time without any user interaction.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
* Android
|
||||
* iOS
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Purchases
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-purchases@2.4.0
|
||||
$ ionic cordova plugin add cordova-plugin-purchases@5.0.0
|
||||
$ npm install @awesome-cordova-plugins/purchases
|
||||
```
|
||||
|
||||
@@ -9,7 +9,9 @@ $ npm install @awesome-cordova-plugins/purchases
|
||||
|
||||
Plugin Repo: [https://github.com/RevenueCat/cordova-plugin-purchases](https://github.com/RevenueCat/cordova-plugin-purchases)
|
||||
|
||||
Purchases is a cross platform solution for managing in-app subscriptions. A backend is also provided via [RevenueCat](https://www.revenuecat.com)
|
||||
*Purchases* is a client for the [RevenueCat](https://www.revenuecat.com/) subscription and purchase tracking system.
|
||||
It is an open source framework that provides a wrapper around `BillingClient`, `StoreKit` and the RevenueCat backend
|
||||
to make implementing in-app subscriptions easy - receipt validation and status tracking included!
|
||||
|
||||
## Features
|
||||
| | RevenueCat |
|
||||
@@ -24,9 +26,24 @@ Purchases is a cross platform solution for managing in-app subscriptions. A back
|
||||
| 📮 | Great support - [Help Center](https://revenuecat.zendesk.com) |
|
||||
| 🤩 | Awesome [new features](https://trello.com/b/RZRnWRbI/revenuecat-product-roadmap) |
|
||||
|
||||
## Capacitor
|
||||
|
||||
The Cordova plugin is not guaranteed to be up to date and we are moving our efforts to the Capacitor plugin.
|
||||
Please consider using our [Capacitor plugin](https://docs.revenuecat.com/docs/capacitor) instead of the Cordova plugin and this wrapper.
|
||||
|
||||
## Getting Started
|
||||
|
||||
For more detailed information, you can view our complete documentation at [docs.revenuecat.com](https://docs.revenuecat.com/docs).
|
||||
Please follow the [Quickstart Guide](https://docs.revenuecat.com/docs/) for more information on how to use the SDK
|
||||
|
||||
## Latest changes to this plugin
|
||||
|
||||
This latest release updates the plugin to use BillingClient 6 in Android. If you come from an older version of the
|
||||
RevenueCat SDK, see [Android Native - 5.x to 6.x Migration](https://www.revenuecat.com/docs/android-native-5x-to-6x-migration)
|
||||
for a more thorough explanation of the new Google subscription model announced with BillingClient 5 and how to take advantage of it.
|
||||
|
||||
If your app supports product changes using [DEFERRED replacement mode](https://www.revenuecat.com/docs/managing-subscriptions#google-play),
|
||||
then you can either stick with the previous major version until support for DEFERRED is re-introduced in this major version,
|
||||
or you can remove DEFERRED replacement options from your app.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
|
||||
18
docs/plugins/save-dialog.md
Normal file
18
docs/plugins/save-dialog.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Save Dialog
|
||||
|
||||
```text
|
||||
$ ionic cordova plugin add cordova-plugin-save-dialog
|
||||
$ npm install @awesome-cordova-plugins/save-dialog
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/save-dialog/)
|
||||
|
||||
Plugin Repo: [https://github.com/Amphiluke/cordova-plugin-save-dialog](https://github.com/Amphiluke/cordova-plugin-save-dialog)
|
||||
|
||||
This Cordova plugin displays the native Save dialog which allows users to store a file in the selected location.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
* Android
|
||||
* iOS
|
||||
|
||||
20
docs/plugins/save-dialog/README.md
Normal file
20
docs/plugins/save-dialog/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Save Dialog
|
||||
|
||||
```text
|
||||
$ ionic cordova plugin add cordova-plugin-save-dialog
|
||||
$ npm install @awesome-cordova-plugins/save-dialog
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/save-dialog/)
|
||||
|
||||
Plugin Repo: [https://github.com/Amphiluke/cordova-plugin-save-dialog](https://github.com/Amphiluke/cordova-plugin-save-dialog)
|
||||
|
||||
This Cordova plugin displays the native Save dialog which allows users to store a file in the selected location.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
* Android
|
||||
* iOS
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# Sign In With Apple
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-sign-in-with-apple
|
||||
# ASAuthorizationAppleIDRequest
|
||||
c cordova plugin add cordova-plugin-sign-in-with-apple
|
||||
$ npm install @awesome-cordova-plugins/sign-in-with-apple
|
||||
```
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# SmartlookEventTrackingMode
|
||||
ova plugin add https://github.com/smartlook/cordova-smartlook.git
|
||||
# Smartlook
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add https://github.com/smartlook/cordova-smartlook.git
|
||||
$ npm install @awesome-cordova-plugins/smartlook
|
||||
```
|
||||
|
||||
@@ -8,7 +10,7 @@ $ npm install @awesome-cordova-plugins/smartlook
|
||||
Plugin Repo: [https://github.com/smartlook/cordova-smartlook.git](https://github.com/smartlook/cordova-smartlook.git)
|
||||
|
||||
Official Smartlook SDK plugin.
|
||||
Full documentation can be found here: https://smartlook.github.io/docs/sdk/ionic/
|
||||
Full documentation can be found here: https://mobile.developer.smartlook.com/reference/ionic-sdk-installation
|
||||
|
||||
## Supported platforms
|
||||
|
||||
|
||||
19
docs/plugins/sms-retriever-api/README.md
Normal file
19
docs/plugins/sms-retriever-api/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# SmsRetrieverApi
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-sms-retriever --variable PLAY_SERVICES_VERSION="18.0.1"
|
||||
$ npm install @awesome-cordova-plugins/sms-retriever-api
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/sms-retriever-api/)
|
||||
|
||||
Plugin Repo: [https://github.com/andreszs/cordova-plugin-sms-retriever](https://github.com/andreszs/cordova-plugin-sms-retriever)
|
||||
|
||||
This plugin retries the SMS which arrive without requiring READ permissions.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
|
||||
|
||||
|
||||
16
docs/plugins/smtp-client.md
Normal file
16
docs/plugins/smtp-client.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Smtp Client
|
||||
|
||||
```text
|
||||
$ ionic cordova plugin add cordova-plugin-smtp-client
|
||||
$ npm install @awesome-cordova-plugins/smtp-client
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/smtp-client/)
|
||||
|
||||
Plugin Repo: [https://github.com/CWBudde/cordova-plugin-smtp-client](https://github.com/CWBudde/cordova-plugin-smtp-client)
|
||||
|
||||
## Supported platforms
|
||||
|
||||
* Android
|
||||
* iOS
|
||||
|
||||
17
docs/plugins/smtp-client/README.md
Normal file
17
docs/plugins/smtp-client/README.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Smtp Client
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-smtp-client
|
||||
$ npm install @awesome-cordova-plugins/smtp-client
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/smtp-client/)
|
||||
|
||||
Plugin Repo: [https://github.com/CWBudde/cordova-plugin-smtp-client](https://github.com/CWBudde/cordova-plugin-smtp-client)
|
||||
|
||||
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
@@ -1,7 +1,5 @@
|
||||
# Tealium
|
||||
|
||||
```
|
||||
$ ''
|
||||
# ConsentExpiry
|
||||
''
|
||||
$ npm install @awesome-cordova-plugins/tealium
|
||||
```
|
||||
|
||||
|
||||
21
docs/plugins/unique-device-id/README.md
Normal file
21
docs/plugins/unique-device-id/README.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Unique Device ID
|
||||
|
||||
```
|
||||
$ ''
|
||||
$ npm install @awesome-cordova-plugins/unique-device-id
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/unique-device-id/)
|
||||
|
||||
Plugin Repo: [https://github.com/Paldom/UniqueDeviceID](https://github.com/Paldom/UniqueDeviceID)
|
||||
|
||||
This plugin produces a unique, cross-install, app-specific device id.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
- Windows Phone 8
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
# UnviredResult
|
||||
a SDK
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add @awesome-cordova-plugins/unvired-cordova-sdk
|
||||
# SyncResult
|
||||
ult
|
||||
ivateResult
|
||||
ionic cordova plugin add @awesome-cordova-plugins/unvired-cordova-sdk
|
||||
$ npm install @awesome-cordova-plugins/unvired-cordova-sdk
|
||||
```
|
||||
|
||||
|
||||
21
docs/plugins/webim/README.md
Normal file
21
docs/plugins/webim/README.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Webim
|
||||
|
||||
```
|
||||
$ cordova plugin add https://github.com/webim/webim-cordova-plugin.git
|
||||
$ npm install @awesome-cordova-plugins/webim
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/webim/)
|
||||
|
||||
Plugin Repo: [https://github.com/webim/webim-cordova-plugin.git](https://github.com/webim/webim-cordova-plugin.git)
|
||||
|
||||
A cordova plugin, a JS version of Webim SDK
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
- Browser
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# Push Notifications - WonderPush
|
||||
# UserPreferencesMethods
|
||||
nderPush
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add wonderpush-cordova-sdk --variable CLIENT_ID=YOUR_CLIENT_ID --variable CLIENT_SECRET=YOUR_CLIENT_SECRET
|
||||
|
||||
5948
package-lock.json
generated
5948
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
56
package.json
56
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "awesome-cordova-plugins",
|
||||
"version": "6.1.0",
|
||||
"version": "6.5.0",
|
||||
"description": "Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support",
|
||||
"homepage": "https://awesome-cordova-plugins.com",
|
||||
"author": "Daniel Sogl <me@danielsogl.com> (https://danielsogl.com)",
|
||||
@@ -24,51 +24,51 @@
|
||||
"prettier": "prettier --write --ignore-unknown \"**/*\""
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "2.4.0"
|
||||
"tslib": "2.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/common": "12.2.16",
|
||||
"@angular/compiler": "12.2.16",
|
||||
"@angular/compiler-cli": "12.2.16",
|
||||
"@angular/core": "12.2.16",
|
||||
"@types/cordova": "0.0.34",
|
||||
"@types/fs-extra": "9.0.13",
|
||||
"@angular/common": "12.2.17",
|
||||
"@angular/compiler": "12.2.17",
|
||||
"@angular/compiler-cli": "12.2.17",
|
||||
"@angular/core": "12.2.17",
|
||||
"@types/cordova": "11.0.3",
|
||||
"@types/fs-extra": "11.0.4",
|
||||
"@types/jest": "27.5.2",
|
||||
"@types/lodash": "4.14.186",
|
||||
"@types/node": "16.11.68",
|
||||
"@types/lodash": "4.14.202",
|
||||
"@types/node": "20.10.5",
|
||||
"@types/rimraf": "3.0.2",
|
||||
"@types/webpack": "5.28.0",
|
||||
"@typescript-eslint/eslint-plugin": "5.40.1",
|
||||
"@typescript-eslint/parser": "5.40.1",
|
||||
"@types/webpack": "5.28.5",
|
||||
"@typescript-eslint/eslint-plugin": "5.62.0",
|
||||
"@typescript-eslint/parser": "5.62.0",
|
||||
"async-promise-queue": "1.0.5",
|
||||
"conventional-changelog-cli": "2.2.2",
|
||||
"conventional-changelog-cli": "4.1.0",
|
||||
"cz-conventional-changelog": "3.3.0",
|
||||
"dgeni": "0.4.14",
|
||||
"dgeni-packages": "0.16.10",
|
||||
"eslint": "8.26.0",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
"eslint-plugin-jsdoc": "39.3.15",
|
||||
"fs-extra": "10.1.0",
|
||||
"eslint": "8.56.0",
|
||||
"eslint-config-prettier": "8.10.0",
|
||||
"eslint-plugin-jsdoc": "46.9.1",
|
||||
"fs-extra": "11.2.0",
|
||||
"gulp": "4.0.2",
|
||||
"gulp-rename": "2.0.0",
|
||||
"gulp-replace": "1.1.3",
|
||||
"husky": "8.0.1",
|
||||
"gulp-replace": "1.1.4",
|
||||
"husky": "8.0.3",
|
||||
"is-ci": "3.0.1",
|
||||
"jest": "27.5.1",
|
||||
"lint-staged": "13.0.3",
|
||||
"lint-staged": "15.2.0",
|
||||
"lodash": "4.17.21",
|
||||
"minimist": "1.2.7",
|
||||
"prettier": "2.7.1",
|
||||
"rimraf": "3.0.2",
|
||||
"rollup": "3.2.3",
|
||||
"minimist": "1.2.8",
|
||||
"prettier": "2.8.8",
|
||||
"rimraf": "5.0.5",
|
||||
"rollup": "4.9.1",
|
||||
"rxjs": "6.6.7",
|
||||
"terser-webpack-plugin": "5.3.6",
|
||||
"terser-webpack-plugin": "5.3.9",
|
||||
"ts-jest": "27.1.5",
|
||||
"ts-node": "10.9.1",
|
||||
"ts-node": "10.9.2",
|
||||
"typescript": "4.2.4",
|
||||
"unminified-webpack-plugin": "3.0.0",
|
||||
"webpack": "5.74.0",
|
||||
"winston": "3.8.2",
|
||||
"winston": "3.11.0",
|
||||
"zone.js": "0.11.8"
|
||||
},
|
||||
"jest": {
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
{
|
||||
"extends": [
|
||||
"config:base"
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["config:base", ":dependencyDashboard"],
|
||||
"packageRules": [
|
||||
{
|
||||
"groupName": "Angular",
|
||||
"packagePatterns": ["^@angular/", "^@angular-devkit/", "@schematics/angular"],
|
||||
"allowedVersions": "<=12"
|
||||
},
|
||||
{
|
||||
"matchPackageNames": ["zone.js"],
|
||||
"allowedVersions": "<=11"
|
||||
},
|
||||
{
|
||||
"matchPackageNames": ["typescript"],
|
||||
"allowedVersions": "<=4"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
interface PresentOptions {
|
||||
/**
|
||||
* Which Media Types are allowed to be selected
|
||||
* default: "IMAGE"
|
||||
*/
|
||||
mediaType?: 'IMAGE' | 'VIDEO' | 'ALL';
|
||||
/**
|
||||
* Show possibility to take via Camera
|
||||
* default: true
|
||||
*/
|
||||
showCameraTile?: boolean;
|
||||
/**
|
||||
* On which Screen the Picker should be started (iOS only)
|
||||
* default: "LIBRARY"
|
||||
*/
|
||||
startOnScreen?: 'LIBRARY' | 'IMAGE' | 'VIDEO';
|
||||
/**
|
||||
* Date format of the Scroll Indicator (Android only)
|
||||
* default: "YYYY.MM"
|
||||
*/
|
||||
scrollIndicatorDateFormat?: string;
|
||||
/**
|
||||
* Show Title (Android only)
|
||||
* default: true
|
||||
*/
|
||||
showTitle?: boolean;
|
||||
/**
|
||||
* Customize the Title (Android only)
|
||||
* default: "Select Image"
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* Show the zoomIndicator at the Images (Android only)
|
||||
* default: true
|
||||
*/
|
||||
zoomIndicator?: boolean;
|
||||
/**
|
||||
* Min Count of files to be selected
|
||||
* default: 0 (android), 1 (iOS)
|
||||
*/
|
||||
min?: number;
|
||||
/**
|
||||
* Message to be shown if min Count not reached (Android only)
|
||||
* default: "You need to select a minimum of ... pictures")"
|
||||
*/
|
||||
minCountMessage?: string;
|
||||
/**
|
||||
* Max Count of files can selected
|
||||
* default: 0 (android), 1 (iOS)
|
||||
*/
|
||||
max?: number;
|
||||
/**
|
||||
* Message to be shown if max Count is reached
|
||||
* default: "You can select a maximum of ... pictures"
|
||||
*/
|
||||
maxCountMessage?: string;
|
||||
/**
|
||||
* Change Done Button Text
|
||||
*/
|
||||
buttonText?: string;
|
||||
/**
|
||||
* Show Library as Dropdown (Android only)
|
||||
* default: false
|
||||
*/
|
||||
asDropdown?: boolean;
|
||||
/**
|
||||
* Return the Result as base64
|
||||
* default: false
|
||||
*/
|
||||
asBase64?: boolean;
|
||||
/**
|
||||
* Return the Image as JPEG
|
||||
* default: false
|
||||
*/
|
||||
asJpeg?: boolean;
|
||||
/**
|
||||
* Video Compression Option (iOS only)
|
||||
* available options: https://github.com/Yummypets/YPImagePicker/blob/23158e138bd649b40762bf2e4aa4beb0d463a121/Source/Configuration/YPImagePickerConfiguration.swift#L226-L240
|
||||
* default: AVAssetExportPresetHighestQuality
|
||||
*/
|
||||
videoCompression?: string;
|
||||
}
|
||||
|
||||
interface Result {
|
||||
type: 'image' | 'video';
|
||||
isBase64: boolean;
|
||||
src: string;
|
||||
}
|
||||
|
||||
export enum ErrorCodes {
|
||||
UnsupportedAction = 1,
|
||||
WrongJsonObject = 2,
|
||||
PickerCanceled = 3,
|
||||
UnknownError = 10,
|
||||
}
|
||||
|
||||
/**
|
||||
* Used for every Plugin Error Callback
|
||||
*/
|
||||
interface AdvancedImagePickerError {
|
||||
/**
|
||||
* One of the AdvancedImagePickerErrorCodes
|
||||
*/
|
||||
code: ErrorCodes;
|
||||
|
||||
/**
|
||||
* If available some more info (mostly exception message)
|
||||
*/
|
||||
message: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name AdvancedImagePicker
|
||||
* @description
|
||||
* This Cordova Plugin is for a better (multiple) ImagePicker with more options.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { AdvancedImagePicker } from '@awesome-cordova-plugins/advanced-image-picker/npx';
|
||||
*
|
||||
*
|
||||
* constructor(private advancedImagePicker: AdvancedImagePicker) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.advancedImagePicker.present{
|
||||
* // config here
|
||||
* })
|
||||
* .then((res: Result[]) => console.log(res))
|
||||
* .catch((error: AdvancedImagePickerError) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'AdvancedImagePicker',
|
||||
plugin: 'cordova-plugin-advanced-imagepicker',
|
||||
pluginRef: 'AdvancedImagePicker',
|
||||
repo: 'https://github.com/EinfachHans/cordova-plugin-advanced-imagepicker',
|
||||
install: 'ionic cordova plugin add cordova-plugin-advanced-imagepicker',
|
||||
installVariables: ['ANDROID_IMAGE_PICKER_VERSION'],
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class AdvancedImagePicker extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Present the ImagePicker
|
||||
* @param options {PresentOptions} https://github.com/EinfachHans/cordova-plugin-advanced-imagepicker/tree/master#parameters
|
||||
* @return {Promise<Result[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
present(options: PresentOptions): Promise<Result[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleans all temp stored Files that was created by this Plugin (iOS only)
|
||||
*/
|
||||
@Cordova({ platforms: ['iOS'] })
|
||||
cleanup(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,8 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
export interface AnylineOptions {
|
||||
// Valid License Key
|
||||
licenseKey: string;
|
||||
|
||||
// Scanning options
|
||||
config: any;
|
||||
export interface AnylineConfig {
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -38,14 +34,29 @@ export interface AnylineOptions {
|
||||
})
|
||||
@Injectable()
|
||||
export class Anyline extends AwesomeCordovaNativePlugin {
|
||||
@Cordova()
|
||||
checkLicense(licenseKey: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
initAnylineSDK(licenseKey: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getSDKVersion(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Scan
|
||||
*
|
||||
* @param options {AnylineOptions} Scanning options
|
||||
* @param config {AnylineConfig} Scanning options
|
||||
* @returns {Promise<any>} Returns a promise that resolves when Code is captured
|
||||
*/
|
||||
@Cordova()
|
||||
scan(options: AnylineOptions): Promise<any> {
|
||||
scan(config: AnylineConfig): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -564,6 +564,37 @@ export class BLE extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers to be notified when Location service state changes on the device.
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* ble.startLocationStateNotifications(success, failure);
|
||||
* // Or using await with promises
|
||||
* // Note, initial promise resolves or rejects depending on whether the subscribe was successful
|
||||
* await ble.withPromises.startLocationStateNotifications(success, failure)
|
||||
* ```
|
||||
* @returns {Observable<any>} Returns an Observable that notifies when Location is enabled or disabled on the device.
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
clearFunction: 'stopLocationStateNotifications',
|
||||
clearWithArgs: false,
|
||||
})
|
||||
startLocationStateNotifications(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop location state notifications.
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
stopLocationStateNotifications(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Open System Bluetooth settings (Android only).
|
||||
*
|
||||
|
||||
@@ -535,10 +535,10 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
||||
* Retrieved paired Bluetooth LE devices. In iOS, devices that are "paired" to will not return during a normal scan.
|
||||
* Callback is "instant" compared to a scan.
|
||||
* @param {{ services: string[] }} An array of service IDs to filter the retrieval by. If no service IDs are specified, no devices will be returned.
|
||||
* @returns {Promise<{ devices: DeviceInfo[] }>}
|
||||
* @returns {Promise<DeviceInfo[]>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
retrieveConnected(params?: { services?: string[] }): Promise<{ devices: DeviceInfo[] }> {
|
||||
retrieveConnected(params?: { services?: string[] }): Promise<DeviceInfo[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -548,7 +548,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
||||
* Bond with a device.
|
||||
* The device doesn't need to be connected to initiate bonding. Android support only.
|
||||
* @param {{ address: string }} params The address/identifier provided by the scan's return object
|
||||
* @returns {(Observable<{ status: DeviceInfo }>)}
|
||||
* @returns {(Observable<DeviceInfo>)}
|
||||
* success:
|
||||
* The first success callback should always return with status == bonding.
|
||||
* If the bond is created, the callback will return again with status == bonded.
|
||||
@@ -557,7 +557,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
||||
* The callback that will be triggered when the bond operation fails
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse', observable: true })
|
||||
bond(params: { address: string }): Observable<{ status: DeviceInfo }> {
|
||||
bond(params: { address: string }): Observable<DeviceInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -566,12 +566,12 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
||||
* @param params.address
|
||||
* Unbond with a device. The device doesn't need to be connected to initiate bonding. Android support only.
|
||||
* @param {{address: string}} params The address/identifier
|
||||
* @returns {Promise<{ status: DeviceInfo }>}
|
||||
* @returns {Promise<DeviceInfo>}
|
||||
* success: The success callback should always return with status == unbonded, that is passed with device object
|
||||
* error: The callback that will be triggered when the unbond operation fails
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
unbond(params: { address: string }): Promise<{ status: DeviceInfo }> {
|
||||
unbond(params: { address: string }): Promise<DeviceInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -582,7 +582,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
||||
* @param connectError The callback that will be triggered when the connect operation fails
|
||||
* @param params The connection params
|
||||
* @param {ConnectionParams} params
|
||||
* @returns {(Observable<{ status: DeviceInfo }>)}
|
||||
* @returns {(Observable<DeviceInfo>)}
|
||||
* success: device object with status
|
||||
* error: The callback that will be triggered when the unbond operation fails
|
||||
*/
|
||||
@@ -670,10 +670,10 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
||||
* Discover the service's characteristics.
|
||||
* Not providing an array of characteristics will return all characteristics and take longer to discover. iOS support only.
|
||||
* @param {CharacteristicParams} params Characteristic params
|
||||
* @returns {Promise<{ characteristics: Characteristics }>} The service id and an Array of characteristics
|
||||
* @returns {Promise<Characteristics>} The service id and an Array of characteristics
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
characteristics(params: CharacteristicParams): Promise<{ characteristics: Characteristics }> {
|
||||
characteristics(params: CharacteristicParams): Promise<Characteristics> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -681,10 +681,10 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
||||
* @name descriptors (iOS)
|
||||
* Discover the characteristic's descriptors. iOS support only.
|
||||
* @param {DescriptorParams} params
|
||||
* @returns {Promise<{ descriptors: Descriptors }>}
|
||||
* @returns {Promise<Descriptors>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
descriptors(params: DescriptorParams): Promise<{ descriptors: Descriptors }> {
|
||||
descriptors(params: DescriptorParams): Promise<Descriptors> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
62
src/@awesome-cordova-plugins/plugins/brightness/index.ts
Normal file
62
src/@awesome-cordova-plugins/plugins/brightness/index.ts
Normal file
@@ -0,0 +1,62 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
/**
|
||||
* @name Brightness
|
||||
* @description
|
||||
* The Brightness plugin let you control the display brightness of your device.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-brightness`. For more info, please see the [Brightness plugin docs](https://github.com/mgcrea/cordova-plugin-brightness).
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Brightness } from '@awesome-cordova-plugins/brightness/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private brightness: Brightness) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* let brightnessValue = 0.8;
|
||||
* this.brightness.setBrightness(brightnessValue);
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Brightness',
|
||||
plugin: 'cordova-plugin-brightness',
|
||||
pluginRef: 'cordova.plugins.brightness',
|
||||
repo: 'https://github.com/mgcrea/cordova-plugin-brightness',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class Brightness extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Sets the brightness of the display.
|
||||
* @param value {number} Floating number between 0 and 1 in which case 1 means 100% brightness and 0 means 0% brightness.
|
||||
* @returns {Promise<any>} Returns a Promise that resolves if setting brightness was successful.
|
||||
*/
|
||||
@Cordova()
|
||||
setBrightness(value: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads the current brightness of the device display.
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the
|
||||
* brightness value of the device display (floating number between 0 and 1).
|
||||
*/
|
||||
@Cordova()
|
||||
getBrightness(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Keeps the screen on. Prevents the device from setting the screen to sleep.
|
||||
* @param {boolean} value
|
||||
*/
|
||||
@Cordova()
|
||||
setKeepScreenOn(value: boolean): void {
|
||||
return;
|
||||
}
|
||||
}
|
||||
276
src/@awesome-cordova-plugins/plugins/cashfree-pg/index.ts
Normal file
276
src/@awesome-cordova-plugins/plugins/cashfree-pg/index.ts
Normal file
@@ -0,0 +1,276 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
|
||||
export enum CFEnvironment {
|
||||
PRODUCTION = 'PRODUCTION',
|
||||
SANDBOX = 'SANDBOX',
|
||||
}
|
||||
|
||||
export class CFSession {
|
||||
payment_session_id: string;
|
||||
orderID: string;
|
||||
environment: string;
|
||||
|
||||
constructor(sessionID: string, orderID: string, environment: CFEnvironment) {
|
||||
if (sessionID === null || sessionID.trim() === '') {
|
||||
throw new Error('sessionID cannot be empty');
|
||||
}
|
||||
if (orderID === null || orderID.trim() === '') {
|
||||
throw new Error('orderID cannot be empty');
|
||||
}
|
||||
if (environment === null || environment.trim() === '') {
|
||||
throw new Error('environment cannot be empty');
|
||||
}
|
||||
this.payment_session_id = sessionID;
|
||||
this.orderID = orderID;
|
||||
this.environment = CFEnvironment[environment];
|
||||
}
|
||||
}
|
||||
|
||||
export enum CFPaymentModes {
|
||||
CARD = 'CARD',
|
||||
UPI = 'UPI',
|
||||
NB = 'NB',
|
||||
WALLET = 'WALLET',
|
||||
EMI = 'EMI',
|
||||
PAY_LATER = 'PAY_LATER',
|
||||
PAYPAL = 'PAYPAL',
|
||||
}
|
||||
|
||||
export interface CFPaymentComponent {
|
||||
hashset: Set<CFPaymentModes>;
|
||||
}
|
||||
|
||||
export class CFPaymentComponentBuilder {
|
||||
private hashset: Set<CFPaymentModes> = new Set<CFPaymentModes>();
|
||||
|
||||
private enableAllModes() {
|
||||
this.hashset.add(CFPaymentModes.CARD);
|
||||
this.hashset.add(CFPaymentModes.UPI);
|
||||
this.hashset.add(CFPaymentModes.NB);
|
||||
this.hashset.add(CFPaymentModes.WALLET);
|
||||
this.hashset.add(CFPaymentModes.EMI);
|
||||
this.hashset.add(CFPaymentModes.PAY_LATER);
|
||||
this.hashset.add(CFPaymentModes.PAYPAL);
|
||||
}
|
||||
|
||||
build(): CFPaymentComponent {
|
||||
if (this.hashset.size === 0) {
|
||||
this.enableAllModes();
|
||||
}
|
||||
return {
|
||||
hashset: this.hashset,
|
||||
};
|
||||
}
|
||||
|
||||
add(cfPaymentModes: CFPaymentModes) {
|
||||
this.hashset.add(cfPaymentModes);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
export interface CFTheme {
|
||||
navigationBarBackgroundColor: string;
|
||||
navigationBarTextColor: string;
|
||||
buttonBackgroundColor: string;
|
||||
buttonTextColor: string;
|
||||
backgroundColor: string;
|
||||
primaryTextColor: string;
|
||||
secondaryTextColor: string;
|
||||
}
|
||||
|
||||
export class CFThemeBuilder {
|
||||
private navigationBarBackgroundColor = '#6A3FD3';
|
||||
private navigationBarTextColor = '#FFFFFF';
|
||||
private buttonBackgroundColor = '#6A3FD3';
|
||||
private buttonTextColor = '#FFFFFF';
|
||||
private backgroundColor = '#FFFFFF';
|
||||
private primaryTextColor = '#11385b';
|
||||
private secondaryTextColor = '#808080';
|
||||
|
||||
setNavigationBarBackgroundColor(value: string) {
|
||||
this.navigationBarBackgroundColor = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
setNavigationBarTextColor(value: string) {
|
||||
this.navigationBarTextColor = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
setButtonBackgroundColor(value: string) {
|
||||
this.buttonBackgroundColor = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
setButtonTextColor(value: string) {
|
||||
this.buttonTextColor = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
setPrimaryTextColor(value: string) {
|
||||
this.primaryTextColor = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
setSecondaryTextColor(value: string) {
|
||||
this.secondaryTextColor = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
setBackgroundColor(value: string) {
|
||||
this.backgroundColor = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
build(): CFTheme {
|
||||
return {
|
||||
navigationBarBackgroundColor: this.navigationBarBackgroundColor,
|
||||
navigationBarTextColor: this.navigationBarTextColor,
|
||||
buttonBackgroundColor: this.buttonBackgroundColor,
|
||||
backgroundColor: this.backgroundColor,
|
||||
buttonTextColor: this.buttonTextColor,
|
||||
primaryTextColor: this.primaryTextColor,
|
||||
secondaryTextColor: this.secondaryTextColor,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export type CFWebTheme = CFTheme;
|
||||
|
||||
export class CFWebThemeBuilder {
|
||||
private navigationBarBackgroundColor = '#6A3FD3';
|
||||
private navigationBarTextColor = '#FFFFFF';
|
||||
|
||||
setNavigationBarBackgroundColor(value: string) {
|
||||
this.navigationBarBackgroundColor = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
setNavigationBarTextColor(value: string) {
|
||||
this.navigationBarTextColor = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
build(): CFWebTheme {
|
||||
const cfTheme = new CFThemeBuilder().build();
|
||||
return {
|
||||
buttonBackgroundColor: cfTheme.buttonBackgroundColor,
|
||||
buttonTextColor: cfTheme.buttonTextColor,
|
||||
navigationBarBackgroundColor: this.navigationBarBackgroundColor,
|
||||
navigationBarTextColor: this.navigationBarBackgroundColor,
|
||||
secondaryTextColor: cfTheme.secondaryTextColor,
|
||||
backgroundColor: cfTheme.backgroundColor,
|
||||
primaryTextColor: cfTheme.buttonTextColor,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export interface CheckoutPayment {
|
||||
version: string;
|
||||
}
|
||||
|
||||
export class CFDropCheckoutPayment implements CheckoutPayment {
|
||||
private readonly session: CFSession;
|
||||
private readonly components: string[] = Array.from(new CFPaymentComponentBuilder().build().hashset);
|
||||
private readonly theme: CFTheme = new CFThemeBuilder().build();
|
||||
version: string;
|
||||
|
||||
constructor(session: CFSession, components: CFPaymentComponent | null, theme: CFTheme | null) {
|
||||
this.session = session;
|
||||
if (components !== null) {
|
||||
this.components = Array.from(components.hashset);
|
||||
}
|
||||
if (theme !== null) {
|
||||
this.theme = theme;
|
||||
}
|
||||
}
|
||||
|
||||
getSession() {
|
||||
return this.session;
|
||||
}
|
||||
|
||||
getComponents() {
|
||||
return this.components;
|
||||
}
|
||||
|
||||
getTheme() {
|
||||
return this.theme;
|
||||
}
|
||||
}
|
||||
|
||||
export class CFWebCheckoutPayment implements CheckoutPayment {
|
||||
private readonly session: CFSession;
|
||||
private readonly theme: CFWebTheme = new CFWebThemeBuilder().build();
|
||||
version: string;
|
||||
|
||||
constructor(session: CFSession, theme: CFWebTheme | null) {
|
||||
this.session = session;
|
||||
if (theme !== null) {
|
||||
this.theme = theme;
|
||||
}
|
||||
}
|
||||
|
||||
getSession() {
|
||||
return this.session;
|
||||
}
|
||||
|
||||
getTheme() {
|
||||
return this.theme;
|
||||
}
|
||||
}
|
||||
|
||||
interface CFResult {
|
||||
orderID: string;
|
||||
}
|
||||
|
||||
interface CFError {
|
||||
orderID: string;
|
||||
status: string;
|
||||
message: string;
|
||||
code: string;
|
||||
type: string;
|
||||
}
|
||||
interface CFResult {
|
||||
orderID: string;
|
||||
}
|
||||
export interface CFCallback {
|
||||
onVerify: (result: CFResult) => void;
|
||||
onError: (error: CFError) => void;
|
||||
}
|
||||
|
||||
@Plugin({
|
||||
pluginName: 'CFPaymentGateway',
|
||||
plugin: 'cordova-plugin-cashfree-pg',
|
||||
pluginRef: 'CFPaymentGateway',
|
||||
repo: 'https://github.com/cashfree/cordova-plugin-cashfree',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class CFPaymentGateway extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Initiate Drop Payment.
|
||||
* @param {CFDropCheckoutPayment} [dropObject] dropPaymentObject information
|
||||
*/
|
||||
@Cordova()
|
||||
doDropPayment(dropObject: CFDropCheckoutPayment) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiate Web Checkout Payment.
|
||||
* @param {CFWebCheckoutPayment} [webCheckoutPayment] webCheckoutPaymentObject information
|
||||
*/
|
||||
@Cordova()
|
||||
doWebCheckoutPayment(webCheckoutPayment: CFWebCheckoutPayment) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Callback.
|
||||
* @param {CFCallback} [cfCallback] callbacks for payment.
|
||||
*/
|
||||
@Cordova()
|
||||
setCallback(cfCallback: CFCallback) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,24 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
export interface ChooserOptions {
|
||||
mimeTypes?: string;
|
||||
maxFileSize?: number;
|
||||
}
|
||||
|
||||
export interface ChooserResult {
|
||||
data?: Uint8Array;
|
||||
dataURI?: string;
|
||||
mediaType: string;
|
||||
path: string;
|
||||
/**
|
||||
* without extension
|
||||
*/
|
||||
name: string;
|
||||
uri: string;
|
||||
/**
|
||||
* with extension
|
||||
*/
|
||||
displayName: string;
|
||||
mimeType: string;
|
||||
extension: string;
|
||||
size: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -47,32 +59,23 @@ export interface ChooserResult {
|
||||
pluginName: 'Chooser',
|
||||
plugin: 'cordova-plugin-chooser',
|
||||
pluginRef: 'chooser',
|
||||
repo: 'https://github.com/cyph/cordova-plugin-chooser',
|
||||
repo: 'https://github.com/MaximBelov/cordova-plugin-chooser',
|
||||
platforms: ['Android', 'iOS'],
|
||||
install: 'ionic cordova plugin add http://github.com/MaximBelov/cordova-plugin-chooser.git',
|
||||
})
|
||||
@Injectable()
|
||||
export class Chooser extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Displays native prompt for user to select a file.
|
||||
*
|
||||
* @param {string} [accept] Optional MIME type filter (e.g. 'image/gif,video/*').
|
||||
* @returns {Promise<any>} Promise containing selected file's raw binary data,
|
||||
* base64-encoded data: URI, MIME type, display name, and original URI.
|
||||
* @param {Object} options
|
||||
* @param {string} options.mimeTypes Optional MIME type filter (e.g. 'image/gif,video/*').
|
||||
* @param {string} options.maxFileSize Optional Max file size.
|
||||
* @returns {Promise<any>} Promise containing selected file's
|
||||
* data: MIME type, display name, and original URI.
|
||||
*/
|
||||
@Cordova()
|
||||
getFile(accept?: string): Promise<ChooserResult | undefined> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Displays native prompt for user to select a file.
|
||||
*
|
||||
* @param {string} [accept] Optional MIME type filter (e.g. 'image/gif,video/*').
|
||||
* @returns {Promise<any>} Promise containing selected file's MIME type, display name, and original URI.
|
||||
* If user cancels, promise will be resolved as undefined.
|
||||
* If error occurs, promise will be rejected.
|
||||
*/
|
||||
@Cordova()
|
||||
getFileMetadata(accept?: string): Promise<ChooserResult | undefined> {
|
||||
getFile(options?: ChooserOptions): Promise<ChooserResult | undefined> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,6 +95,16 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this method to set a custom locale for the clevertap instance.
|
||||
* @param locale {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setLocale(locale: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/*******************
|
||||
* Push
|
||||
******************/
|
||||
@@ -121,13 +131,14 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the device's Xiaomi push token
|
||||
*
|
||||
* Sets the device's Xiaomi push token.
|
||||
* clevertap-cordova 2.6.0 onwards method requires region as a mandatory parameter.
|
||||
* @param token {string}
|
||||
* @param region {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setPushXiaomiToken(token: string): Promise<any> {
|
||||
setPushXiaomiToken(token: string, region: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -804,6 +815,17 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this method to delete bulk Inbox Messages for Given Message Ids
|
||||
*
|
||||
* @param messageIds {any} array of strings
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
deleteInboxMessagesForIds(messageIds: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Mark Read Inbox Message For Id
|
||||
*
|
||||
@@ -814,7 +836,28 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
markReadInboxMessageForId(messageId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Mark Read Inbox Messages For Ids in bulk
|
||||
*
|
||||
* @param messageIds {any} array of strings
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
markReadInboxMessagesForIds(messageIds: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to dismiss Inbox
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
dismissInbox(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Mark Push Inbox Notification Viewed Event for Id
|
||||
*
|
||||
@@ -881,6 +924,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
|
||||
* Call this to Get Feature Flag for key
|
||||
*
|
||||
* @param key {string}
|
||||
@@ -893,6 +937,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
|
||||
* Call this to Set Defaults for Product Config
|
||||
*
|
||||
* @param defaults {any}
|
||||
@@ -904,6 +949,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
|
||||
* Call this for Product Config Fetch
|
||||
*
|
||||
* @param defaults {any}
|
||||
@@ -915,6 +961,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
|
||||
* Call this for Product Config Fetch with Min Interval
|
||||
*
|
||||
* @param timeInterval {number}
|
||||
@@ -926,6 +973,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
|
||||
* Call this for Product Config Activate
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
@@ -936,6 +984,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
|
||||
* Call this for Product Config Fetch and Activate
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
@@ -946,6 +995,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
|
||||
* Call this to set Product Config Fetch with Min Interval
|
||||
*
|
||||
* @param timeInterval {number}
|
||||
@@ -957,6 +1007,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
|
||||
* Call this to Get Last Fetch Time Interval
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
@@ -967,6 +1018,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
|
||||
* Call this to Get String
|
||||
*
|
||||
* @param key {string}
|
||||
@@ -978,6 +1030,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
|
||||
* Call this to Get Boolean
|
||||
*
|
||||
* @param key {string}
|
||||
@@ -989,6 +1042,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
|
||||
* Call this to Get Long
|
||||
*
|
||||
* @param key {string}
|
||||
@@ -1000,6 +1054,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
|
||||
* Call this to Get Double
|
||||
*
|
||||
* @param key {string}
|
||||
@@ -1011,6 +1066,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated - Since version 2.7.0 and will be removed in the future versions of this SDK.
|
||||
* Call this to Reset Product Config
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
@@ -1020,6 +1076,125 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/****************************
|
||||
* Product Experiences methods
|
||||
****************************/
|
||||
|
||||
/**
|
||||
*
|
||||
* Uploads variables to the server. Requires Development/Debug build/configuration.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
syncVariables(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Uploads variables to the server.
|
||||
* @param {boolean} isProduction Provide `true` if variables must be sync in Productuon build/configuration.
|
||||
* @returns {Promise<any>}
|
||||
*
|
||||
*
|
||||
* Note: This is NO-OP in Android
|
||||
*/
|
||||
@Cordova()
|
||||
syncVariablesinProd(isProduction: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Forces variables to update from the server.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
fetchVariables(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create variables.
|
||||
* @returns {Promise<any>}
|
||||
* @param {object} variables The JSON Object specifying the varibles to be created.
|
||||
*/
|
||||
@Cordova()
|
||||
defineVariables(variables: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a variable or a group for the specified name.
|
||||
* @param {string} name - name.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getVariable(name: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all variables via a JSON object.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getVariables(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a callback to be invoked when variables are initialised with server values. Will be called each time new values are fetched.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
onVariablesChanged(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the value of the variable changes.
|
||||
* @param {name} string the name of the variable
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
onValueChanged(name: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/****************************
|
||||
* Android 13 Push Primer
|
||||
****************************/
|
||||
|
||||
/**
|
||||
* Method to prompt the push primer for android 13 onwards.
|
||||
* @param {object} value - key-value belongs to the localInApp properties. Refer documentation for details.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
promptPushPrimer(localInAppObject: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to prompt the hard permission dialog directly, if the push primer is not required.
|
||||
* @param {string} showFallbackSettings - If the value is true then SDK shows an alert dialog which routes to app's notification settings page.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
promptForPushPermission(showFallbackSettings: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true/false based on whether push permission is granted or denied.
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
isPushPermissionGranted(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*******************
|
||||
* Developer Options
|
||||
******************/
|
||||
|
||||
@@ -29,10 +29,11 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'CloudSettings',
|
||||
plugin: 'cordova-plugin-cloud-settings',
|
||||
plugin: '@marysuon/cordova-plugin-cloud-settings',
|
||||
pluginRef: 'cordova.plugin.cloudsettings',
|
||||
repo: 'https://github.com/dpa99c/cordova-plugin-cloud-settings',
|
||||
install: 'ionic cordova plugin add cordova-plugin-cloud-settings --variable ANDROID_BACKUP_SERVICE_KEY=myapikey',
|
||||
install:
|
||||
'ionic cordova plugin add @marysuon/cordova-plugin-cloud-settings --variable ANDROID_BACKUP_SERVICE_KEY=myapikey',
|
||||
installVariables: ['ANDROID_BACKUP_SERVICE_KEY'],
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
export interface CropOption {
|
||||
/** The resulting JPEG quality (ignored on Android). default: 100 */
|
||||
quality?: number;
|
||||
|
||||
/** The resulting JPEG picture width. default: -1 */
|
||||
targetWidth?: number;
|
||||
|
||||
/** The resulting JPEG picture height. default: -1 */
|
||||
targetHeight?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Crop Plugin Privacy
|
||||
* @description
|
||||
* This plugin does something
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { CropPluginPrivacy } from '@awesome-cordova-plugins/crop-plugin-privacy/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private cropPluginPrivacy: CropPluginPrivacy) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.cropPluginPrivacy.functionName('/path/to/image', { quality: 100, targetWidth: 1, targetHeight: 1 })
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'CropPluginPrivacy',
|
||||
plugin: 'cordova-plugin-crop-privacy',
|
||||
pluginRef: 'crop',
|
||||
repo: 'https://github.com/BaraAksayeth25/cordova-plugin-crop-privacy',
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class CropPluginPrivacy extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* This function does something
|
||||
* @param arg1 {string} path destination
|
||||
* @param arg2 {object} Cropping configuration
|
||||
* @return {Promise<any>} return the file path
|
||||
*/
|
||||
@Cordova()
|
||||
cropImage(arg1: string, arg2: CropOption): Promise<any> {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
}
|
||||
@@ -66,4 +66,8 @@ export class Device extends AwesomeCordovaNativePlugin {
|
||||
/** Get the Android device's SDK version. (Android-only) */
|
||||
@CordovaProperty()
|
||||
sdkVersion?: string;
|
||||
|
||||
/** Detect if app is running on a macOS desktop with Apple Silicon. */
|
||||
@CordovaProperty()
|
||||
isiOSAppOnMac: string;
|
||||
}
|
||||
|
||||
@@ -42,30 +42,46 @@ import { Cordova, CordovaProperty, AwesomeCordovaNativePlugin, Plugin } from '@a
|
||||
@Injectable()
|
||||
export class Diagnostic extends AwesomeCordovaNativePlugin {
|
||||
permission = {
|
||||
READ_CALENDAR: 'READ_CALENDAR',
|
||||
WRITE_CALENDAR: 'WRITE_CALENDAR',
|
||||
CAMERA: 'CAMERA',
|
||||
READ_CONTACTS: 'READ_CONTACTS',
|
||||
WRITE_CONTACTS: 'WRITE_CONTACTS',
|
||||
GET_ACCOUNTS: 'GET_ACCOUNTS',
|
||||
ACCESS_FINE_LOCATION: 'ACCESS_FINE_LOCATION',
|
||||
ACCEPT_HANDOVER: 'ACCEPT_HANDOVER',
|
||||
ACCESS_BACKGROUND_LOCATION: 'ACCESS_BACKGROUND_LOCATION',
|
||||
ACCESS_COARSE_LOCATION: 'ACCESS_COARSE_LOCATION',
|
||||
RECORD_AUDIO: 'RECORD_AUDIO',
|
||||
READ_PHONE_STATE: 'READ_PHONE_STATE',
|
||||
CALL_PHONE: 'CALL_PHONE',
|
||||
ACCESS_FINE_LOCATION: 'ACCESS_FINE_LOCATION',
|
||||
ACCESS_MEDIA_LOCATION: 'ACCESS_MEDIA_LOCATION',
|
||||
ACTIVITY_RECOGNITION: 'ACTIVITY_RECOGNITION',
|
||||
ADD_VOICEMAIL: 'ADD_VOICEMAIL',
|
||||
USE_SIP: 'USE_SIP',
|
||||
PROCESS_OUTGOING_CALLS: 'PROCESS_OUTGOING_CALLS',
|
||||
READ_CALL_LOG: 'READ_CALL_LOG',
|
||||
WRITE_CALL_LOG: 'WRITE_CALL_LOG',
|
||||
SEND_SMS: 'SEND_SMS',
|
||||
RECEIVE_SMS: 'RECEIVE_SMS',
|
||||
READ_SMS: 'READ_SMS',
|
||||
RECEIVE_WAP_PUSH: 'RECEIVE_WAP_PUSH',
|
||||
RECEIVE_MMS: 'RECEIVE_MMS',
|
||||
WRITE_EXTERNAL_STORAGE: 'WRITE_EXTERNAL_STORAGE',
|
||||
READ_EXTERNAL_STORAGE: 'READ_EXTERNAL_STORAGE',
|
||||
ANSWER_PHONE_CALLS: 'ANSWER_PHONE_CALLS',
|
||||
BLUETOOTH_ADVERTISE: 'BLUETOOTH_ADVERTISE',
|
||||
BLUETOOTH_CONNECT: 'BLUETOOTH_CONNECT',
|
||||
BLUETOOTH_SCAN: 'BLUETOOTH_SCAN',
|
||||
BODY_SENSORS: 'BODY_SENSORS',
|
||||
BODY_SENSORS_BACKGROUND: 'BODY_SENSORS_BACKGROUND',
|
||||
CALL_PHONE: 'CALL_PHONE',
|
||||
CAMERA: 'CAMERA',
|
||||
GET_ACCOUNTS: 'GET_ACCOUNTS',
|
||||
NEARBY_WIFI_DEVICES: 'NEARBY_WIFI_DEVICES',
|
||||
POST_NOTIFICATIONS: 'POST_NOTIFICATIONS',
|
||||
PROCESS_OUTGOING_CALLS: 'PROCESS_OUTGOING_CALLS',
|
||||
READ_CALENDAR: 'READ_CALENDAR',
|
||||
READ_CALL_LOG: 'READ_CALL_LOG',
|
||||
READ_CONTACTS: 'READ_CONTACTS',
|
||||
READ_EXTERNAL_STORAGE: 'READ_EXTERNAL_STORAGE',
|
||||
READ_MEDIA_AUDIO: 'READ_MEDIA_AUDIO',
|
||||
READ_MEDIA_IMAGES: 'READ_MEDIA_IMAGES',
|
||||
READ_MEDIA_VIDEO: 'READ_MEDIA_VIDEO',
|
||||
READ_PHONE_NUMBERS: 'READ_PHONE_NUMBERS',
|
||||
READ_PHONE_STATE: 'READ_PHONE_STATE',
|
||||
READ_SMS: 'READ_SMS',
|
||||
RECEIVE_MMS: 'RECEIVE_MMS',
|
||||
RECEIVE_SMS: 'RECEIVE_SMS',
|
||||
RECEIVE_WAP_PUSH: 'RECEIVE_WAP_PUSH',
|
||||
RECORD_AUDIO: 'RECORD_AUDIO',
|
||||
SEND_SMS: 'SEND_SMS',
|
||||
USE_SIP: 'USE_SIP',
|
||||
UWB_RANGING: 'UWB_RANGING',
|
||||
WRITE_CALENDAR: 'WRITE_CALENDAR',
|
||||
WRITE_CALL_LOG: 'WRITE_CALL_LOG',
|
||||
WRITE_CONTACTS: 'WRITE_CONTACTS',
|
||||
WRITE_EXTERNAL_STORAGE: 'WRITE_EXTERNAL_STORAGE',
|
||||
};
|
||||
|
||||
@CordovaProperty()
|
||||
@@ -80,6 +96,9 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
||||
DENIED_ALWAYS: string;
|
||||
RESTRICTED: string;
|
||||
GRANTED_WHEN_IN_USE: string;
|
||||
EPHEMERAL: string;
|
||||
PROVISIONAL: string;
|
||||
LIMITED: string;
|
||||
};
|
||||
|
||||
locationAuthorizationMode = {
|
||||
@@ -113,6 +132,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
||||
SENSORS: ['BODY_SENSORS'],
|
||||
SMS: ['SEND_SMS', 'RECEIVE_SMS', 'READ_SMS', 'RECEIVE_WAP_PUSH', 'RECEIVE_MMS'],
|
||||
STORAGE: ['READ_EXTERNAL_STORAGE', 'WRITE_EXTERNAL_STORAGE'],
|
||||
NEARBY_DEVICES: ["BLUETOOTH_ADVERTISE", "BLUETOOTH_SCAN", "BLUETOOTH_CONNECT"],
|
||||
};
|
||||
|
||||
locationMode = {
|
||||
@@ -142,6 +162,25 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
||||
POWERING_OFF: string;
|
||||
};
|
||||
|
||||
@CordovaProperty()
|
||||
cpuArchitecture: {
|
||||
MIPS: string;
|
||||
MIPS_64: string;
|
||||
UNKNOWN: string;
|
||||
ARMv6: string;
|
||||
ARMv7: string;
|
||||
ARMv8: string;
|
||||
X86: string;
|
||||
X86_64: string;
|
||||
};
|
||||
|
||||
@CordovaProperty()
|
||||
remoteNotificationType: {
|
||||
ALERT: string;
|
||||
SOUND: string;
|
||||
BADGE: string;
|
||||
};
|
||||
|
||||
@CordovaProperty()
|
||||
motionStatus: {
|
||||
NOT_REQUESTED: string;
|
||||
@@ -268,8 +307,18 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// ANDROID AND IOS ONLY
|
||||
|
||||
/**
|
||||
* Enables debug mode, which logs native plugin debug messages to the native and JS consoles.
|
||||
* Debug mode is initially disabled on plugin initialisation.
|
||||
*/
|
||||
@Cordova({ platforms: ['Android', 'iOS'] })
|
||||
enableDebug(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the device setting for location is on. On Android this returns true if Location Mode is switched on. On iOS this returns true if Location Services is switched on.
|
||||
*
|
||||
@@ -301,6 +350,17 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the individual location authorization status for each type of location access (FINE, COARSE and BACKGROUND).
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ platforms: ['Android', 'iOS'] })
|
||||
getLocationAuthorizationStatuses(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the location authorization status for the application.
|
||||
* Note for Android: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
|
||||
@@ -510,8 +570,42 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
||||
@Cordova({ platforms: ['Android', 'iOS'], sync: true })
|
||||
registerLocationStateChangeHandler(handler: Function): void {}
|
||||
|
||||
/**
|
||||
* Returns CPU architecture of the current device.
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ platforms: ['Android', 'iOS'] })
|
||||
getArchitecture(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current battery level of the device as a percentage.
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ platforms: ['Android', 'iOS'] })
|
||||
getCurrentBatteryLevel(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
// ANDROID ONLY
|
||||
|
||||
/**
|
||||
* Restarts the application.
|
||||
* By default, a "warm" restart will be performed in which the main Cordova activity is immediately restarted, causing the Webview instance to be recreated.
|
||||
* However, if the `cold` parameter is set to true, then the application will be "cold" restarted, meaning a system exit will be performed, causing the entire application to be restarted.
|
||||
* This is useful if you want to fully reset the native application state but will cause the application to briefly disappear and re-appear..
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ platforms: ['Android'], callbackOrder: 'reverse' })
|
||||
restart(cold: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks if high-accuracy locations are available to the app from GPS hardware.
|
||||
* Returns true if Location mode is enabled and is set to "Device only" or "High accuracy" AND if the app is authorized to use location.
|
||||
@@ -560,6 +654,26 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if airplane mode is enabled on device.
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ platforms: ['Android'] })
|
||||
isAirplaneModeEnabled(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if mobile data is enabled on device.
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ platforms: ['Android'] })
|
||||
isMobileDataEnabled(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current location mode setting for the device.
|
||||
*
|
||||
@@ -570,6 +684,26 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns details of the OS of the device on which the app is currently running
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ platforms: ['Android'] })
|
||||
getDeviceOSVersion(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns details of the SDK levels used to build the app.
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ platforms: ['Android'] })
|
||||
getBuildOSVersion(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current authorization status for a given permission.
|
||||
* Note: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
|
||||
@@ -683,6 +817,27 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Bluetooth authorization status of the application on the device.
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ platforms: ['Android', 'iOS'] })
|
||||
getBluetoothAuthorizationStatus(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the individual authorization status for each Bluetooth run-time permission on Android 12+ / API 31+
|
||||
* On Android 11 / API 30 and below, all will be returned as GRANTED if the manifest has BLUETOOTH since they are implicitly granted at build-time.
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ platforms: ['Android'] })
|
||||
getBluetoothAuthorizationStatuses(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the application is authorized to use external storage.
|
||||
*
|
||||
@@ -876,6 +1031,16 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Presents limited library picker UI on iOS 14+
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ platforms: ['iOS'] })
|
||||
presentLimitedLibraryPicker(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if remote (push) notifications are enabled.
|
||||
*
|
||||
|
||||
484
src/@awesome-cordova-plugins/plugins/fbsdk/index.ts
Normal file
484
src/@awesome-cordova-plugins/plugins/fbsdk/index.ts
Normal file
@@ -0,0 +1,484 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
export interface FbSdkLoginResponse {
|
||||
status: string;
|
||||
|
||||
authResponse: {
|
||||
accessToken: string;
|
||||
|
||||
data_access_expiration_time: string;
|
||||
|
||||
expiresIn: number;
|
||||
|
||||
userID: string;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @name FbSdk
|
||||
* @description
|
||||
* Use the Facebook SDK plugin to obtain access to the native FB application on iOS and Android.
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-fbsdk`. For more info, please see the [Facebook SDK](https://github.com/MaximBelov/cordova-plugin-fbsdk).
|
||||
*
|
||||
* #### Installation
|
||||
*
|
||||
* To use the FB plugin, you first have to create a new Facebook App inside of the Facebook developer portal at [https://developers.facebook.com/apps](https://developers.facebook.com/apps).
|
||||
*
|
||||
* [](https://developers.facebook.com/apps/)
|
||||
*
|
||||
* Retrieve the `App ID` and `App Name`.
|
||||
*
|
||||
* [](https://developers.facebook.com/apps/)
|
||||
*
|
||||
* Then type in the following command in your Terminal, where APP_ID and APP_NAME are the values from the Facebook Developer portal.
|
||||
*
|
||||
* ```bash
|
||||
* ionic cordova plugin add cordova-plugin-fbsdk --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable CLIENT_TOKEN="abcd1234"
|
||||
* ```
|
||||
*
|
||||
* After, you'll need to add the native platforms you'll be using to your app in the Facebook Developer portal under your app's Settings:
|
||||
*
|
||||
* [](https://developers.facebook.com/apps/)
|
||||
*
|
||||
* Click `'Add Platform'`.
|
||||
*
|
||||
* [](https://developers.facebook.com/apps/)
|
||||
*
|
||||
* At this point you'll need to open your project's [`config.xml`](https://cordova.apache.org/docs/en/latest/config_ref/index.html) file, found in the root directory of your project.
|
||||
*
|
||||
* Take note of the `id` for the next step:
|
||||
* ```
|
||||
* <widget id="com.mycompany.testapp" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
* ```
|
||||
*
|
||||
* You can also edit the `id` to whatever you'd like it to be.
|
||||
*
|
||||
* #### Client Access Tokens
|
||||
*
|
||||
* [](https://developers.facebook.com/docs/facebook-login/guides/access-tokens#clienttokens)
|
||||
*
|
||||
*
|
||||
* #### iOS Install
|
||||
* Under 'Bundle ID', add the `id` from your `config.xml` file:
|
||||
*
|
||||
* [](https://developers.facebook.com/apps/)
|
||||
*
|
||||
*
|
||||
* #### Android Install
|
||||
* Under 'Google Play Package Name', add the `id` from your `config.xml` file:
|
||||
*
|
||||
* [](https://developers.facebook.com/apps/)
|
||||
*
|
||||
*
|
||||
* And that's it! You can now make calls to Facebook using the plugin.
|
||||
*
|
||||
* ## Events
|
||||
*
|
||||
* App events allow you to understand the makeup of users engaging with your app, measure the performance of your Facebook mobile app ads, and reach specific sets of your users with Facebook mobile app ads.
|
||||
*
|
||||
* - [iOS] [https://developers.facebook.com/docs/ios/app-events](https://developers.facebook.com/docs/ios/app-events)
|
||||
* - [Android] [https://developers.facebook.com/docs/android/app-events](https://developers.facebook.com/docs/android/app-events)
|
||||
* - [JS] Does not have an Events API, so the plugin functions are empty and will return an automatic success
|
||||
*
|
||||
* Activation events are automatically tracked for you in the plugin.
|
||||
*
|
||||
* Events are listed on the [insights page](https://www.facebook.com/insights/).
|
||||
*
|
||||
* For tracking events, see `logEvent` and `logPurchase`.
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { FbSdk, FbSdkLoginResponse } from '@awesome-cordova-plugins/fbsdk/ngx';
|
||||
*
|
||||
* constructor(private fbSdk: FbSdk) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.fbSdk.login(['public_profile', 'user_friends', 'email'])
|
||||
* .then((res: FbSdkLoginResponse) => console.log('Logged into Facebook!', res))
|
||||
* .catch(e => console.log('Error logging into Facebook', e));
|
||||
*
|
||||
*
|
||||
* this.fb.logEvent(this.fb.EVENTS.EVENT_NAME_ADDED_TO_CART);
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Facebook',
|
||||
plugin: 'cordova-plugin-fbsdk',
|
||||
pluginRef: 'facebookConnectPlugin',
|
||||
repo: 'https://github.com/MaximBelov/cordova-plugin-fbsdk',
|
||||
install:
|
||||
'ionic cordova plugin add cordova-plugin-fbsdk --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable CLIENT_TOKEN="abcd1234"',
|
||||
installVariables: ['APP_ID', 'APP_NAME', 'CLIENT_TOKEN'],
|
||||
platforms: ['Android', 'iOS', 'Browser'],
|
||||
})
|
||||
@Injectable()
|
||||
export class FbSdk extends AwesomeCordovaNativePlugin {
|
||||
EVENTS = {
|
||||
EVENT_NAME_ACTIVATED_APP: 'fb_mobile_activate_app',
|
||||
EVENT_NAME_DEACTIVATED_APP: 'fb_mobile_deactivate_app',
|
||||
EVENT_NAME_SESSION_INTERRUPTIONS: 'fb_mobile_app_interruptions',
|
||||
EVENT_NAME_TIME_BETWEEN_SESSIONS: 'fb_mobile_time_between_sessions',
|
||||
EVENT_NAME_COMPLETED_REGISTRATION: 'fb_mobile_complete_registration',
|
||||
EVENT_NAME_VIEWED_CONTENT: 'fb_mobile_content_view',
|
||||
EVENT_NAME_SEARCHED: 'fb_mobile_search',
|
||||
EVENT_NAME_RATED: 'fb_mobile_rate',
|
||||
EVENT_NAME_COMPLETED_TUTORIAL: 'fb_mobile_tutorial_completion',
|
||||
EVENT_NAME_PUSH_TOKEN_OBTAINED: 'fb_mobile_obtain_push_token',
|
||||
EVENT_NAME_ADDED_TO_CART: 'fb_mobile_add_to_cart',
|
||||
EVENT_NAME_ADDED_TO_WISHLIST: 'fb_mobile_add_to_wishlist',
|
||||
EVENT_NAME_INITIATED_CHECKOUT: 'fb_mobile_initiated_checkout',
|
||||
EVENT_NAME_ADDED_PAYMENT_INFO: 'fb_mobile_add_payment_info',
|
||||
EVENT_NAME_PURCHASED: 'fb_mobile_purchase',
|
||||
EVENT_NAME_ACHIEVED_LEVEL: 'fb_mobile_level_achieved',
|
||||
EVENT_NAME_UNLOCKED_ACHIEVEMENT: 'fb_mobile_achievement_unlocked',
|
||||
EVENT_NAME_SPENT_CREDITS: 'fb_mobile_spent_credits',
|
||||
EVENT_PARAM_CURRENCY: 'fb_currency',
|
||||
EVENT_PARAM_REGISTRATION_METHOD: 'fb_registration_method',
|
||||
EVENT_PARAM_CONTENT_TYPE: 'fb_content_type',
|
||||
EVENT_PARAM_CONTENT_ID: 'fb_content_id',
|
||||
EVENT_PARAM_SEARCH_STRING: 'fb_search_string',
|
||||
EVENT_PARAM_SUCCESS: 'fb_success',
|
||||
EVENT_PARAM_MAX_RATING_VALUE: 'fb_max_rating_value',
|
||||
EVENT_PARAM_PAYMENT_INFO_AVAILABLE: 'fb_payment_info_available',
|
||||
EVENT_PARAM_NUM_ITEMS: 'fb_num_items',
|
||||
EVENT_PARAM_LEVEL: 'fb_level',
|
||||
EVENT_PARAM_DESCRIPTION: 'fb_description',
|
||||
EVENT_PARAM_SOURCE_APPLICATION: 'fb_mobile_launch_source',
|
||||
EVENT_PARAM_VALUE_YES: '1',
|
||||
EVENT_PARAM_VALUE_NO: '0',
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the current application ID
|
||||
*
|
||||
* @returns {Promise<string>} Returns a Promise that resolves with the current application ID
|
||||
*/
|
||||
@Cordova()
|
||||
getApplicationId(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the application ID
|
||||
*
|
||||
* @param {string} id application ID
|
||||
*/
|
||||
@Cordova()
|
||||
setApplicationId(id: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current application name
|
||||
*
|
||||
* @returns {Promise<string>} Returns a Promise that resolves with the current application name
|
||||
*/
|
||||
@Cordova()
|
||||
getApplicationName(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the application name
|
||||
*
|
||||
* @param {string} name application name
|
||||
*/
|
||||
@Cordova()
|
||||
setApplicationName(name: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Login to Facebook to authenticate this app.
|
||||
*
|
||||
* ```typescript
|
||||
* {
|
||||
* status: 'connected',
|
||||
* authResponse: {
|
||||
* accessToken: 'kgkh3g42kh4g23kh4g2kh34g2kg4k2h4gkh3g4k2h4gk23h4gk2h34gk234gk2h34AndSoOn',
|
||||
* data_access_expiration_time: '1623680244',
|
||||
* expiresIn: 5183979,
|
||||
* userID: '634565435'
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* ```
|
||||
*
|
||||
* @param {string[]} permissions List of [permissions](https://developers.facebook.com/docs/facebook-login/permissions) this app has upon logging in.
|
||||
* @returns {Promise<FbSdkLoginResponse>} Returns a Promise that resolves with a status object if login succeeds, and rejects if login fails.
|
||||
*/
|
||||
@Cordova()
|
||||
login(permissions: string[]): Promise<FbSdkLoginResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Login to Facebook using Limited Login (iOS Only)
|
||||
*
|
||||
* ```typescript
|
||||
* {
|
||||
* status: 'connected',
|
||||
* authResponse: {
|
||||
* authenticationToken: 'kgkh3g42kh4g23kh4g2kh34g2kg4k2h4gkh3g4k2h4gk23h4gk2h34gk234gk2h34AndSoOn',
|
||||
* nonce: 'foo',
|
||||
* userID: '634565435'
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* ```
|
||||
*
|
||||
* @param {string[]} permissions List of [permissions](https://developers.facebook.com/docs/facebook-login/limited-login/permissions) this app has upon logging in.
|
||||
* @returns {Promise<FbSdkLoginResponse>} Returns a Promise that resolves with a status object if login succeeds, and rejects if login fails.
|
||||
*/
|
||||
@Cordova()
|
||||
loginWithLimitedTracking(permissions: string[]): Promise<FbSdkLoginResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the user has approved all necessary permissions
|
||||
*
|
||||
* @param {string[]} permissions List of [permissions](https://developers.facebook.com/docs/facebook-login/permissions) to check for
|
||||
* @returns {Promise<string>} Returns a Promise that resolves with a success string if all passed permissions are granted, or an error string if any permissions are not granted
|
||||
*/
|
||||
@Cordova()
|
||||
checkHasCorrectPermissions(permissions: string[]): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if data access has expired for the user
|
||||
*
|
||||
* @returns {Promise<string>} Returns a Promise that resolves with a success string if data access is expired, or rejects with an error
|
||||
*/
|
||||
@Cordova()
|
||||
isDataAccessExpired(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reauthorize data access after it has expired
|
||||
*
|
||||
* @returns {Promise<FbSdkLoginResponse>} Returns a Promise that resolves with a status object if login succeeds, and rejects if login fails.
|
||||
*/
|
||||
@Cordova()
|
||||
reauthorizeDataAccess(): Promise<FbSdkLoginResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Logout of Facebook.
|
||||
*
|
||||
* For more info see the [Facebook docs](https://developers.facebook.com/docs/reference/javascript/FB.logout)
|
||||
*
|
||||
* @returns {Promise<any>} Returns a Promise that resolves on a successful logout, and rejects if logout fails.
|
||||
*/
|
||||
@Cordova()
|
||||
logout(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a user is logged in to Facebook and has authenticated your app. There are three possible states for a user:
|
||||
*
|
||||
* 1) the user is logged into Facebook and has authenticated your application (connected)
|
||||
* 2) the user is logged into Facebook but has not authenticated your application (not_authorized)
|
||||
* 3) the user is either not logged into Facebook or explicitly logged out of your application so it doesn't attempt to connect to Facebook and thus, we don't know if they've authenticated your application or not (unknown)
|
||||
*
|
||||
* Resolves with a response like:
|
||||
*
|
||||
* ```
|
||||
* {
|
||||
* authResponse: {
|
||||
* userID: '12345678912345',
|
||||
* accessToken: 'kgkh3g42kh4g23kh4g2kh34g2kg4k2h4gkh3g4k2h4gk23h4gk2h34gk234gk2h34AndSoOn',
|
||||
* data_access_expiration_time: '1623680244',
|
||||
* expiresIn: '5183738'
|
||||
* },
|
||||
* status: 'connected'
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* For more information see the [Facebook docs](https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus)
|
||||
*
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with a status, or rejects with an error
|
||||
*/
|
||||
@Cordova()
|
||||
getLoginStatus(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a Facebook access token for using Facebook services.
|
||||
*
|
||||
* @returns {Promise<string>} Returns a Promise that resolves with an access token, or rejects with an error
|
||||
*/
|
||||
@Cordova()
|
||||
getAccessToken(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get profile information for the currently logged in user
|
||||
*
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with success data, or rejects with an error
|
||||
*/
|
||||
@Cordova()
|
||||
getCurrentProfile(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show one of various Facebook dialogs. Example of options for a Share dialog:
|
||||
*
|
||||
* ```
|
||||
* {
|
||||
* method: 'share',
|
||||
* href: 'http://example.com'
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* For more options see the [Cordova plugin docs](https://github.com/MaximBelov/cordova-plugin-fbsdk#show-a-dialog) and the [Facebook docs](https://developers.facebook.com/docs/javascript/reference/FB.ui)
|
||||
*
|
||||
* @param {Object} options The dialog options
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with success data, or rejects with an error
|
||||
*/
|
||||
@Cordova()
|
||||
showDialog(options: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a call to Facebook Graph API. Can take additional permissions beyond those granted on login.
|
||||
*
|
||||
* For more information see:
|
||||
*
|
||||
* Calling the Graph API - https://developers.facebook.com/docs/javascript/reference/FB.api
|
||||
* Graph Explorer - https://developers.facebook.com/tools/explorer
|
||||
* Graph API - https://developers.facebook.com/docs/graph-api
|
||||
*
|
||||
* @param {string} requestPath Graph API endpoint you want to call
|
||||
* @param {string[]} permissions List of [permissions](https://developers.facebook.com/docs/facebook-login/permissions) for this request.
|
||||
* @param {string} httpMethod HTTP method for the request, one of "GET", "POST", or "DELETE" (default is "GET")
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the result of the request, or rejects with an error
|
||||
*/
|
||||
@Cordova()
|
||||
api(requestPath: string, permissions: string[], httpMethod?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Data Processing Options for App events. For more information see [Facebook docs](https://developers.facebook.com/docs/app-events/guides/ccpa)
|
||||
*
|
||||
* @param {string[]} options List of options, i.e. ["LDU"]
|
||||
* @param {number} country The numeric identifier for the country
|
||||
* @param {number} state The numeric identifier for the state
|
||||
*/
|
||||
@Cordova()
|
||||
setDataProcessingOptions(options: string[], country?: number, state?: number): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set user data for Advanced Matching. For more information see [Facebook docs](https://developers.facebook.com/docs/app-events/advanced-matching/)
|
||||
*
|
||||
* @param {Object} userData An object containing data about the user
|
||||
*/
|
||||
@Cordova()
|
||||
setUserData(userData: Object): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear user data. For more information see [Facebook docs](https://developers.facebook.com/docs/app-events/advanced-matching/)
|
||||
*/
|
||||
@Cordova()
|
||||
clearUserData(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Log an event. For more information see the Events section above.
|
||||
*
|
||||
* @param {string} name Name of the event
|
||||
* @param {Object} [params] An object containing extra data to log with the event
|
||||
* @param {number} [valueToSum] any value to be added to added to a sum on each event
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 3,
|
||||
errorIndex: 4,
|
||||
})
|
||||
logEvent(name: string, params?: Object, valueToSum?: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable or disable the auto log app event feature - https://developers.facebook.com/docs/app-events/gdpr-compliance/
|
||||
*
|
||||
* @param {boolean} enabled value to be set
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
setAutoLogAppEventsEnabled(enabled: boolean): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable or disable collection of advertiser-id
|
||||
*
|
||||
* @param {boolean} enabled value to be set
|
||||
*/
|
||||
@Cordova()
|
||||
setAdvertiserIDCollectionEnabled(enabled: boolean): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable or disable advertiser tracking (iOS Only)
|
||||
*
|
||||
* @param {boolean} enabled value to be set
|
||||
*/
|
||||
@Cordova()
|
||||
setAdvertiserTrackingEnabled(enabled: boolean): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Log a purchase. For more information see the Events section above.
|
||||
*
|
||||
* @param {number} value Value of the purchase.
|
||||
* @param {string} currency The currency, as an [ISO 4217 currency code](http://en.wikipedia.org/wiki/ISO_4217)
|
||||
* @param {Object} params An object containing extra data to log with the event
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
logPurchase(value: number, currency: string, params?: Object): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the deferred app link
|
||||
*
|
||||
* @returns {Promise<string>} Returns a Promise that resolves with the deep link
|
||||
*/
|
||||
@Cordova()
|
||||
getDeferredApplink(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Manually log activation events
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
activateApp(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
74
src/@awesome-cordova-plugins/plugins/ffmpeg/index.ts
Normal file
74
src/@awesome-cordova-plugins/plugins/ffmpeg/index.ts
Normal file
@@ -0,0 +1,74 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
export interface VideoInformation {
|
||||
format: {
|
||||
bit_rate: string;
|
||||
duration: string;
|
||||
filename: string;
|
||||
format_name: string;
|
||||
nb_programs: string;
|
||||
nb_streams: string;
|
||||
probe_score: string;
|
||||
size: string;
|
||||
start_time: string;
|
||||
};
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name FFMpeg
|
||||
* @description
|
||||
* Simple plugin that binds mobile ffmpeg to execute ffmpeg commands
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { FFMpeg } from '@awesome-cordova-plugins/ffmpeg/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private ffMpeg: FFMpeg) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.fFMpeg.exec('-i someinput.mp4 -vn -c:a copy out.mp3')
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
*
|
||||
* this.fFMpeg.probe('somefile.mp4"')
|
||||
* .then((res: VideoInformation) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'FFMpeg',
|
||||
plugin: 'cordova-plugin-ffmpeg',
|
||||
pluginRef: 'ffmpeg',
|
||||
repo: 'https://github.com/MaximBelov/cordova-plugin-ffmpeg',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class FFMpeg extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Execute ffmpeg command
|
||||
* @param cmd {string} command
|
||||
* @return {Promise<any>} Returns a promise that resolves when execute finished
|
||||
*/
|
||||
@Cordova()
|
||||
exec(cmd: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts media information for the file specified with path
|
||||
* @param filePath {string} file path
|
||||
* @return {Promise<VideoInformation>} Returns a promise that resolves when media information received
|
||||
*/
|
||||
@Cordova()
|
||||
probe(filePath: string): Promise<VideoInformation> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
47
src/@awesome-cordova-plugins/plugins/file-chooser/index.ts
Normal file
47
src/@awesome-cordova-plugins/plugins/file-chooser/index.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
/* eslint-disable jsdoc/require-returns-check */
|
||||
/* eslint-disable jsdoc/check-tag-names */
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
/**
|
||||
* @name FileChooser Plugin
|
||||
* @description
|
||||
* Cordova FileChooser Plugin
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { FileChooser } from '@awesome-cordova-plugins/file-chooser/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private fileChooser: FileChooser) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.fileChooser.open()
|
||||
* .then(() => console.log('Success'))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'FileChooser',
|
||||
plugin: 'cordova-plugin-filechooser',
|
||||
pluginRef: 'fileChooser',
|
||||
repo: 'https://github.com/ihadeed/cordova-filechooser',
|
||||
platforms: ['Android'],
|
||||
})
|
||||
@Injectable()
|
||||
export class FileChooser extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Launches a chooser dialog. The filter param allows filtering a the mime type
|
||||
* { "mime": "application/pdf" }
|
||||
*
|
||||
* @param {string} [filter] Filter allowing filter by a mime type (text/plain, image/png, image/jpeg, audio/wav etc.)
|
||||
* @returns {Promise<string>} URI of the selected file
|
||||
*/
|
||||
@Cordova()
|
||||
open(filter?: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,96 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
// Biometric type
|
||||
export type BIOMETRIC_TYPE = 'finger' | 'face' | 'biometric';
|
||||
|
||||
export enum BIOMETRIC_ERRORS {
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_UNKNOWN_ERROR = -100,
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_UNAVAILABLE = -101,
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_AUTHENTICATION_FAILED = -102,
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_SDK_NOT_SUPPORTED = -103,
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_HARDWARE_NOT_SUPPORTED = -104,
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_PERMISSION_NOT_GRANTED = -105,
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_NOT_ENROLLED = -106,
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_INTERNAL_PLUGIN_ERROR = -107,
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_DISMISSED = -108,
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_PIN_OR_PATTERN_DISMISSED = -109,
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_SCREEN_GUARD_UNSECURED = -110,
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_LOCKED_OUT = -111,
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_LOCKED_OUT_PERMANENT = -112,
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_SECRET_NOT_FOUND = -113
|
||||
}
|
||||
|
||||
export interface FingerprintOptions {
|
||||
/**
|
||||
* Title in biometric prompt (android only)
|
||||
@@ -43,6 +133,14 @@ export interface FingerprintOptions {
|
||||
* @default false
|
||||
*/
|
||||
disableBackup?: boolean;
|
||||
|
||||
/**
|
||||
* (Android): If false user confirmation is NOT required after a biometric has been authenticated.
|
||||
*
|
||||
* @default true.
|
||||
* See https://developer.android.com/training/sign-in/biometric-auth#no-explicit-user-action
|
||||
*/
|
||||
confirmationRequired?: boolean;
|
||||
}
|
||||
|
||||
export interface FingerprintSecretOptions extends FingerprintOptions {
|
||||
@@ -121,98 +219,15 @@ export interface FingerprintSecretOptions extends FingerprintOptions {
|
||||
})
|
||||
@Injectable()
|
||||
export class FingerprintAIO extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_UNKNOWN_ERROR = -100;
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_UNAVAILABLE = -101;
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_AUTHENTICATION_FAILED = -102;
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_SDK_NOT_SUPPORTED = -103;
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_HARDWARE_NOT_SUPPORTED = -104;
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_PERMISSION_NOT_GRANTED = -105;
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_NOT_ENROLLED = -106;
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_INTERNAL_PLUGIN_ERROR = -107;
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_DISMISSED = -108;
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_PIN_OR_PATTERN_DISMISSED = -109;
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_SCREEN_GUARD_UNSECURED = -110;
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_LOCKED_OUT = -111;
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_LOCKED_OUT_PERMANENT = -112;
|
||||
/**
|
||||
* Convenience constant
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
BIOMETRIC_SECRET_NOT_FOUND = -113;
|
||||
|
||||
/**
|
||||
* Check if fingerprint authentication is available
|
||||
*
|
||||
* @returns {Promise<any>} Returns a promise with result
|
||||
* @returns {Promise<BIOMETRIC_TYPE>} Returns a promise with result which depends on device and os.
|
||||
* iPhone X will return 'face' other Android or iOS devices will return 'finger' Android P+ will return 'biometric'
|
||||
*/
|
||||
@Cordova()
|
||||
isAvailable(): Promise<any> {
|
||||
isAvailable(): Promise<BIOMETRIC_TYPE> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -220,10 +235,10 @@ export class FingerprintAIO extends AwesomeCordovaNativePlugin {
|
||||
* Show authentication dialogue and register secret
|
||||
*
|
||||
* @param {FingerprintSecretOptions} options Options for platform specific fingerprint API
|
||||
* @returns {Promise<any>} Returns a promise that resolves when authentication was successful
|
||||
* @returns {Promise<void>} Returns a promise that resolves when authentication was successful
|
||||
*/
|
||||
@Cordova()
|
||||
registerBiometricSecret(options: FingerprintSecretOptions): Promise<any> {
|
||||
registerBiometricSecret(options: FingerprintSecretOptions): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -231,7 +246,7 @@ export class FingerprintAIO extends AwesomeCordovaNativePlugin {
|
||||
* Show authentication dialogue and load secret
|
||||
*
|
||||
* @param {FingerprintOptions} options Options for platform specific fingerprint API
|
||||
* @returns {Promise<any>} Returns a promise that resolves when authentication was successful
|
||||
* @returns {Promise<string>} Returns a promise that resolves when authentication was successful
|
||||
*/
|
||||
@Cordova()
|
||||
loadBiometricSecret(options: FingerprintOptions): Promise<string> {
|
||||
@@ -242,10 +257,10 @@ export class FingerprintAIO extends AwesomeCordovaNativePlugin {
|
||||
* Show authentication dialogue
|
||||
*
|
||||
* @param {FingerprintOptions} options Options for platform specific fingerprint API
|
||||
* @returns {Promise<any>} Returns a promise that resolves when authentication was successful
|
||||
* @returns {Promise<void>} Returns a promise that resolves when authentication was successful
|
||||
*/
|
||||
@Cordova()
|
||||
show(options: FingerprintOptions): Promise<any> {
|
||||
show(options: FingerprintOptions): Promise<void> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
122
src/@awesome-cordova-plugins/plugins/firebase-model/index.ts
Normal file
122
src/@awesome-cordova-plugins/plugins/firebase-model/index.ts
Normal file
@@ -0,0 +1,122 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Plugin,
|
||||
Cordova,
|
||||
CordovaProperty,
|
||||
CordovaInstance,
|
||||
InstanceProperty,
|
||||
IonicNativePlugin,
|
||||
} from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export enum FirebaseModelStatus {
|
||||
downloading = 'downloading',
|
||||
completed = 'completed',
|
||||
}
|
||||
|
||||
export enum FirebaseModelInputType {
|
||||
path = 'path',
|
||||
base64string = 'base64string',
|
||||
blob = 'blob',
|
||||
}
|
||||
|
||||
export class FirebaseModelConfigResult {
|
||||
/**
|
||||
* Returns the current status of the model.
|
||||
*/
|
||||
status: FirebaseModelStatus;
|
||||
/**
|
||||
* Returns the current progress of the downloading model.
|
||||
*/
|
||||
progress: number;
|
||||
}
|
||||
|
||||
export class FirebaseModelClassifyResult {
|
||||
/**
|
||||
* Return the identified image label name.
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Returns the confidence score of the identified image.
|
||||
*/
|
||||
score: number;
|
||||
}
|
||||
|
||||
export class FirebaseModelInput {
|
||||
/**
|
||||
* Set the one of the input types defined in FirebaseModelInputType enum.
|
||||
*/
|
||||
inputType: FirebaseModelInputType;
|
||||
/**
|
||||
* Set the input as string | Blob based on the `inputType`
|
||||
*/
|
||||
input: string | Blob;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Firebase Model
|
||||
* @description This plugin downloads the TensorFlow model from firebase and classify the images.
|
||||
*
|
||||
* ```typescript
|
||||
* import { FirebaseModel } from '@ionic-native/ionic-native-firebase-model';
|
||||
*
|
||||
*
|
||||
* constructor(private firebaseModel: FirebaseModel) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.firebaseModel.configure('Sample_Model')
|
||||
* .subscribe((res: FirebaseModelConfigResult) => console.log(res.status + " - " + res.progress))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
*
|
||||
* try {
|
||||
* var result:FirebaseModelClassifyResult = await this.firebaseModel.classify("/Documents/input_image.png")
|
||||
* console.log(result.label + " - " + result.score)
|
||||
*
|
||||
* }
|
||||
* catch (e) {
|
||||
* console.log(e)
|
||||
* }
|
||||
*
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'FirebaseModel',
|
||||
plugin: 'cordova-plugin-firebase-model', // npm package name, example: cordova-plugin-camera
|
||||
pluginRef: 'FirebaseModel', // the variable reference to call the plugin, example: navigator.geolocation
|
||||
repo: '', // the github repository URL for the plugin
|
||||
install: 'ionic cordova plugin add cordova-plugin-firebase-model', // OPTIONAL install command, in case the plugin requires variables
|
||||
installVariables: [], // OPTIONAL the plugin requires variables
|
||||
platforms: ['iOS'], // Array of platforms supported, example: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class FirebaseModel extends IonicNativePlugin {
|
||||
/**
|
||||
* This function configure the Firebase TFLite model and downloads.
|
||||
* @param {string} arg1 Name of the TFLite model which is uploaded in the Firebase console
|
||||
* @returns {Observable<FirebaseModelConfigResult>} Returns a observable that gives the callback for downloading progress and status.
|
||||
*
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
observable: true,
|
||||
})
|
||||
configure(arg1: string): Observable<FirebaseModelConfigResult> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function identify the image using the Firebase TFLite model which is configured.
|
||||
* @param {FirebaseModelInput} arg1 Base64 string of the input image or .
|
||||
* @returns {Promise<FirebaseModelClassifyResult>} Returns a promise that resolves the classification result.
|
||||
*
|
||||
*/
|
||||
@Cordova()
|
||||
classify(arg1: FirebaseModelInput): Promise<FirebaseModelClassifyResult> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,11 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, CordovaProperty, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
export interface OnProgress {
|
||||
isProgress: boolean;
|
||||
transferred: number;
|
||||
total: number;
|
||||
}
|
||||
export interface HTTPResponse {
|
||||
/**
|
||||
* The HTTP status number of the response or a negative internal error code.
|
||||
@@ -608,6 +613,7 @@ export class HTTP extends AwesomeCordovaNativePlugin {
|
||||
* @param options.filePath {string} file path(s) to be used during upload and download see uploadFile and downloadFile for detailed information
|
||||
* @param options.name {string} name(s) to be used during upload see uploadFile for detailed information
|
||||
* @param options.responseType {string} response type, defaults to text
|
||||
* @param options.onProgress {function} A callback that is called when is progress
|
||||
* @returns {Promise<HTTPResponse>} returns a promise that will resolve on success, and reject on failure
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -623,6 +629,7 @@ export class HTTP extends AwesomeCordovaNativePlugin {
|
||||
filePath?: string | string[];
|
||||
name?: string | string[];
|
||||
responseType?: 'text' | 'arraybuffer' | 'blob' | 'json';
|
||||
onProgress?: (response: OnProgress) => void;
|
||||
}
|
||||
): Promise<HTTPResponse> {
|
||||
return;
|
||||
|
||||
89
src/@awesome-cordova-plugins/plugins/image-resizer/index.ts
Normal file
89
src/@awesome-cordova-plugins/plugins/image-resizer/index.ts
Normal file
@@ -0,0 +1,89 @@
|
||||
/* eslint-disable jsdoc/require-param-type */
|
||||
/* eslint-disable jsdoc/check-tag-names */
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
export interface ImageResizerOptions {
|
||||
/**
|
||||
* The URI for the image on the device to get scaled
|
||||
*/
|
||||
uri: string;
|
||||
/**
|
||||
* The name of the folder the image should be put
|
||||
* (Android only)
|
||||
*/
|
||||
folderName?: string;
|
||||
/**
|
||||
* A custom name for the file. Default name is a timestamp. You have to set this value on iOS
|
||||
*/
|
||||
fileName?: string;
|
||||
/**
|
||||
*
|
||||
* Quality given as Number for the quality of the new image
|
||||
* (Android and iOS only)
|
||||
*/
|
||||
quality?: number;
|
||||
/**
|
||||
* The width of the new image
|
||||
*/
|
||||
width: number;
|
||||
/**
|
||||
* The height of the new image
|
||||
*/
|
||||
height: number;
|
||||
/**
|
||||
* Whether or not to return a base64 encoded image string instead of the path to the resized image.
|
||||
* iOS only
|
||||
*/
|
||||
base64?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name ImageResizer
|
||||
* @description
|
||||
* Cordova Plugin For Image Resize
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { ImageResizer, ImageResizerOptions } from '@awesome-cordova-plugins/image-resizer/ngx';
|
||||
*
|
||||
* constructor(private imageResizer: ImageResizer) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* let options = {
|
||||
* uri: uri,
|
||||
* folderName: 'Protonet',
|
||||
* quality: 90,
|
||||
* width: 1280,
|
||||
* height: 1280
|
||||
* } as ImageResizerOptions;
|
||||
*
|
||||
* this.imageResizer
|
||||
* .resize(options)
|
||||
* .then((filePath: string) => console.log('FilePath', filePath))
|
||||
* .catch(e => console.log(e));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'ImageResizer',
|
||||
plugin: 'cordova-plugin-image-resizer', // npm package name, example: cordova-plugin-camera
|
||||
pluginRef: 'ImageResizer', // the variable reference to call the plugin, example: navigator.geolocation
|
||||
repo: 'https://github.com/JoschkaSchulz/cordova-plugin-image-resizer', // the github repository URL for the plugin
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class ImageResizer extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* This function resizes the image based on the options provided
|
||||
*
|
||||
* @param options {ImageResizerOptions} image resize options
|
||||
* @return {Promise<string>} Returns a Promise that resolves the resized image file URI
|
||||
* otherwise rejects with an error.
|
||||
*/
|
||||
@Cordova()
|
||||
resize(options: ImageResizerOptions): Promise<string> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,258 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
/**
|
||||
* @name Mobile Accessibility
|
||||
* @description
|
||||
* This plugin exposes information on the status of various accessibility features of mobile operating systems, including, for example, whether a screen reader is running, invert colors is enabled, and the preferred scaling for text.
|
||||
* It also allows an application to send a string to be spoken by the screen reader, or a command to stop the screen reader from speaking.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { MobileAccessibility } from '@awesome-cordova-plugins/mobile-accessibility/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private mobileAccessibility: MobileAccessibility) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.mobileAccessibility.isScreenReaderRunningCallback();
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'MobileAccessibility',
|
||||
plugin: 'phonegap-plugin-mobile-accessibility',
|
||||
pluginRef: 'window.MobileAccessibility',
|
||||
repo: 'https://github.com/phonegap/phonegap-mobile-accessibility',
|
||||
install: '',
|
||||
installVariables: [],
|
||||
platforms: ['Android', 'iOS', 'Amazon Fire OS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class MobileAccessibility extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* This function does something
|
||||
* @param arg1 {string} Some param to configure something
|
||||
* @param arg2 {number} Another param to configure something
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
functionName(arg1: string, arg2: number): Promise<any> {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
MobileAccessibilityNotifications: {
|
||||
ANNOUNCEMENT: 'ANNOUNCEMENT';
|
||||
BOLD_TEXT_STATUS_CHANGED: 'BOLD_TEXT_STATUS_CHANGED';
|
||||
CLOSED_CAPTIONING_STATUS_CHANGED: 'CLOSED_CAPTIONING_STATUS_CHANGED';
|
||||
DARKER_SYSTEM_COLORS_STATUS_CHANGED: 'DARKER_SYSTEM_COLORS_STATUS_CHANGED';
|
||||
GRAYSCALE_STATUS_CHANGED: 'GRAYSCALE_STATUS_CHANGED';
|
||||
GUIDED_ACCESS_STATUS_CHANGED: 'GUIDED_ACCESS_STATUS_CHANGED';
|
||||
INVERT_COLORS_STATUS_CHANGED: 'INVERT_COLORS_STATUS_CHANGED';
|
||||
LAYOUT_CHANGED: 'LAYOUT_CHANGED';
|
||||
MONO_AUDIO_STATUS_CHANGED: 'MONO_AUDIO_STATUS_CHANGED';
|
||||
PAGE_SCROLLED: 'PAGE_SCROLLED';
|
||||
REDUCE_MOTION_STATUS_CHANGED: 'REDUCE_MOTION_STATUS_CHANGED';
|
||||
REDUCE_TRANSPARENCY_STATUS_CHANGED: 'REDUCE_TRANSPARENCY_STATUS_CHANGED';
|
||||
SCREEN_CHANGED: 'SCREEN_CHANGED';
|
||||
SCREEN_READER_STATUS_CHANGED: 'SCREEN_READER_STATUS_CHANGED';
|
||||
SPEAK_SCREEN_STATUS_CHANGED: 'SPEAK_SCREEN_STATUS_CHANGED';
|
||||
SPEAK_SELECTION_STATUS_CHANGED: 'SPEAK_SELECTION_STATUS_CHANGED';
|
||||
SWITCH_CONTROL_STATUS_CHANGED: 'SWITCH_CONTROL_STATUS_CHANGED';
|
||||
TOUCH_EXPLORATION_STATUS_CHANGED: 'TOUCH_EXPLORATION_STATUS_CHANGED';
|
||||
};
|
||||
|
||||
/**
|
||||
* Makes an asynchronous call to native MobileAccessibility to determine if a screen reader is running.
|
||||
* @returns {Promise<boolean>} A result method to receive the boolean result asynchronously from the native MobileAccessibility plugin.
|
||||
*/
|
||||
@Cordova()
|
||||
isScreenReaderRunning(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* An iOS-specific proxy for the MobileAccessibility.isScreenReaderRunning method
|
||||
* @returns {Promise<boolean>} A result method to receive the boolean result asynchronously from the native MobileAccessibility plugin.
|
||||
*/
|
||||
@Cordova()
|
||||
isVoiceOverRunning(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* An Android/Amazon Fire OS-specific proxy for the MobileAccessibility.isScreenReaderRunning method.
|
||||
* @returns {Promise<boolean>} A result method to receive the boolean result asynchronously from the native MobileAccessibility plugin.
|
||||
*/
|
||||
@Cordova()
|
||||
isTalkBackRunning(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* On Android, this method returns true if ChromeVox is active and properly initialized with access to the text to speech API in the WebView.
|
||||
* If TalkBack is running but ChromeVox is not active, this method is useful to alert the user of a potential problem.
|
||||
* @returns {Promise<boolean>} Returns the result
|
||||
*/
|
||||
@Cordova()
|
||||
isChromeVoxActive(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @returns {Promise<boolean>} Returns the result
|
||||
*/
|
||||
@Cordova()
|
||||
isBoldTextEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @returns {Promise<boolean>} Returns the result
|
||||
*/
|
||||
@Cordova()
|
||||
isClosedCaptioningEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @returns {Promise<boolean>} Returns the result
|
||||
*/
|
||||
@Cordova()
|
||||
isDarkerSystemColorsEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @returns {Promise<boolean>} Returns the result
|
||||
*/
|
||||
@Cordova()
|
||||
isGrayscaleEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @returns {Promise<boolean>} Returns the result
|
||||
*/
|
||||
@Cordova()
|
||||
isGuidedAccessEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @returns {Promise<boolean>} Returns the result
|
||||
*/
|
||||
@Cordova()
|
||||
isInvertColorsEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @returns {Promise<boolean>} Returns the result
|
||||
*/
|
||||
@Cordova()
|
||||
isMonoAudioEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @returns {Promise<boolean>} Returns the result
|
||||
*/
|
||||
@Cordova()
|
||||
isReduceMotionEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @returns {Promise<boolean>} Returns the result
|
||||
*/
|
||||
@Cordova()
|
||||
isReduceTransparencyEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @returns {Promise<boolean>} Returns the result
|
||||
*/
|
||||
@Cordova()
|
||||
isSpeakScreenEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @returns {Promise<boolean>} Returns the result
|
||||
*/
|
||||
@Cordova()
|
||||
isSpeakSelectionEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @returns {Promise<boolean>} Returns the result
|
||||
*/
|
||||
@Cordova()
|
||||
isSwitchControlRunning(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @returns {Promise<boolean>} Returns the result
|
||||
*/
|
||||
@Cordova()
|
||||
isTouchExplorationEnabled(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* * @returns {Promise<number>} Returns the result
|
||||
*/
|
||||
@Cordova()
|
||||
getTextZoom(): Promise<number> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* @param textZoom {number} A percentage value by which text in the WebView should be scaled.
|
||||
*/
|
||||
@Cordova()
|
||||
setTextZoom(textZoom: number): void {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Cordova()
|
||||
updateTextZoom(): void {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* A Boolean value which specifies whether to use the preferred text zoom of a default percent value of 100.
|
||||
* @param value {boolean} Returns the result
|
||||
*/
|
||||
@Cordova()
|
||||
usePreferredTextZoom(value: boolean): void {}
|
||||
/**
|
||||
* Posts a notification with a string for the screen reader to announce if it is running.
|
||||
* @param mobileAccessibilityNotification {any}
|
||||
* @param value {string} A string to be announced by a screen reader.
|
||||
* @returns {Promise<boolean>} Returns the result
|
||||
*/
|
||||
@Cordova()
|
||||
postNotification(mobileAccessibilityNotification: any, value: string): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Speaks a given string through the screenreader. On Android, if ChromeVox is active, it will use the specified queueMode and properties.
|
||||
* @param value {string}
|
||||
* @param queueMode {mumber}
|
||||
* @param properties {any}
|
||||
*/
|
||||
@Cordova()
|
||||
speak(value: string, queueMode?: number, properties?: any): void {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Stops speech.
|
||||
*/
|
||||
@Cordova()
|
||||
stop(): void {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -328,16 +328,19 @@ export class MobileMessaging extends AwesomeCordovaNativePlugin {
|
||||
* @param event
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
sync: true,
|
||||
})
|
||||
register(event: Event): Observable<Message> {
|
||||
register(event: Event, handler: Function): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Alias for `register`.
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
sync: true,
|
||||
})
|
||||
on(event: Event): Observable<Message> {
|
||||
on(event: Event, handler: Function): void {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -350,16 +353,19 @@ export class MobileMessaging extends AwesomeCordovaNativePlugin {
|
||||
* @param {Function} handler will be unregistered from event
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
sync: true,
|
||||
})
|
||||
unregister(event: Event): Observable<Message> {
|
||||
unregister(event: Event, handler: Function): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Alias for `unregister`.
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
sync: true,
|
||||
})
|
||||
off(event: Event): Observable<Message> {
|
||||
off(event: Event, handler: Function): void {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -407,7 +413,7 @@ export class MobileMessaging extends AwesomeCordovaNativePlugin {
|
||||
@Cordova({
|
||||
observable: true,
|
||||
})
|
||||
submitEventImmediately(event: CustomEvent): Promise<void> {
|
||||
submitEventImmediately(event: CustomEvent): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -419,7 +425,7 @@ export class MobileMessaging extends AwesomeCordovaNativePlugin {
|
||||
* @param {Object} userData. An object containing user data
|
||||
*/
|
||||
@Cordova()
|
||||
saveUser(userData: UserData): Promise<any> {
|
||||
saveUser(userData: UserData): Promise<UserData> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
327
src/@awesome-cordova-plugins/plugins/newrelic/index.ts
Normal file
327
src/@awesome-cordova-plugins/plugins/newrelic/index.ts
Normal file
@@ -0,0 +1,327 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-plugins/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/**
|
||||
* @name newrelic mobile
|
||||
* @description
|
||||
* This NewRelic plugin collect crashes, network traffic, and other information for hybrid apps using native components.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { NewRelic } from "@awesome-cordova-plugins/newrelic/ngx";
|
||||
*
|
||||
*
|
||||
* constructor(private newrelic: newrelic) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* NewRelic.startInteraction('Getting Data From Server')
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'NewRelic',
|
||||
plugin: 'newrelic-cordova-plugin', // npm package name, example: cordova-plugin-camera
|
||||
pluginRef: 'NewRelic', // the variable reference to call the plugin, example: navigator.geolocation
|
||||
repo: 'https://github.com/newrelic/newrelic-cordova-plugin', // the github repository URL for the plugin
|
||||
install:
|
||||
'ionic cordova plugin add https://github.com/newrelic/newrelic-cordova-plugin.git --variable IOS_APP_TOKEN="{ios-app-token}" --variable ANDROID_APP_TOKEN="{android-app-token}"', // OPTIONAL install command, in case the plugin requires variables
|
||||
installVariables: ['IOS_APP_TOKEN', 'ANDROID_APP_TOKEN'], // OPTIONAL the plugin requires variables
|
||||
platforms: ['Android', 'iOS'], // Array of platforms supported, example: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class NewRelic extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Sets a custom user identifier value to associate mobile user
|
||||
* @param {string} userId The user identifier string.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
setUserId(userId: string): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a custom attribute with a specified name and value.
|
||||
* When called, it overwrites its previous value and type.
|
||||
* The created attribute is shared by multiple Mobile event types.
|
||||
* @param {string} attributeName Name of the attribute.
|
||||
* @param {number} value Value of the attribute.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
setAttribute(name: string, value: any): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a custom attribute with a specified name and value.
|
||||
* When called, it removes the attribute specified by the name string.
|
||||
* The removed attribute is shared by multiple Mobile event types.
|
||||
* @param {string} name Name of the attribute.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
removeAttribute(name: string): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates and records a MobileBreadcrumb event.
|
||||
* @param {string} eventName The name you want to give to a breadcrumb event.
|
||||
* @param {Map<string, any>} attributes A map that includes a list of attributes.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
recordBreadcrumb(name: string, eventAttributes: Map<string, any>): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates and records a custom event, for use in New Relic Insights.
|
||||
* The event includes a list of attributes, specified as a map.
|
||||
* @param {string} eventType The type of event.
|
||||
* @param {string} eventName The name of the event.
|
||||
* @param {Map<string, any>} attributes A map that includes a list of attributes.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
recordCustomEvent(eventType: string, eventName: string, eventAttributes: Map<string, any>): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
* Track a method as an interaction.
|
||||
* @param {string} actionName The name of the action.
|
||||
* @param {function} cb A success callback function.
|
||||
* @returns {Promise} A promise containing the interactionId.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
startInteraction(name: string): Promise<any> {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
* End an interaction
|
||||
* @param {string} interactionId The string ID for the interaction you want to end. This string is returned when you use startInteraction().
|
||||
*/
|
||||
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
endInteraction(name: string): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws a demo run-time exception to test New Relic crash reporting.
|
||||
* @param {string} message An optional argument attached to the exception.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
crashNow(message: string): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current session ID as a parameter to the successful callback function.
|
||||
* This method is useful for consolidating monitoring of app data (not just New Relic data) based on a single session definition and identifier.
|
||||
* @param {function} cb A success callback function.
|
||||
* @returns {Promise} A promise containing the current session ID.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
currentSessionId(name: string): Promise<any> {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
* Increments the count of an attribute with a specified name.
|
||||
* When called, it overwrites its previous value and type each time.
|
||||
* If attribute does not exist, it creates an attribute with a value of 1.
|
||||
* The incremented attribute is shared by multiple Mobile event types.
|
||||
* @param {string} name The name of the attribute.
|
||||
* @param {number} value Optional argument that increments the attribute by this value.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
incrementAttribute(name: string, value: any): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string} name The name for the custom metric.
|
||||
* @param {string} category The metric category name.
|
||||
* @param {number} value Optional. The value of the metric. Value should be a non-zero positive number.
|
||||
* @param {string} countUnit Optional (but requires value and valueUnit to be set). Unit of measurement for the metric count. Supported values are 'PERCENT', 'BYTES', 'SECONDS', 'BYTES_PER_SECOND', or 'OPERATIONS'.
|
||||
* @param {string} valueUnit Optional (but requires value and countUnit to be set). Unit of measurement for the metric value. Supported values are 'PERCENT', 'BYTES', 'SECONDS', 'BYTES_PER_SECOND', or 'OPERATIONS'.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
recordMetric(name: string, category: any, value: Number, countUnit: string, valueUnit: string): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all attributes from the session..
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
removeAllAttributes(): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the maximum size of the event pool stored in memory until the next harvest cycle.
|
||||
* When the pool size limit is reached, the agent will start sampling events, discarding some new and old, until the pool of events is sent in the next harvest cycle.
|
||||
* Default is a maximum of 1000 events per event harvest cycle.
|
||||
* @param {number} maxPoolSize The maximum number of events per harvest cycle.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
setMaxEventPoolSize(maxPoolSize: Number): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the event harvest cycle length.
|
||||
* Default is 600 seconds (10 minutes).
|
||||
* Minimum value cannot be less than 60 seconds.
|
||||
* Maximum value should not be greater than 600 seconds.
|
||||
* @param {number} maxBufferTimeInSeconds The maximum time (in seconds) that the agent should store events in memory.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
setMaxEventBufferTime(maxBufferTimeInSeconds: Number): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
* FOR ANDROID ONLY.
|
||||
* Enable or disable collection of event data.
|
||||
* @param {boolean} enabled Boolean value for enabling analytics events.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
analyticsEventEnabled(enabled: Boolean): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable or disable reporting sucessful HTTP request to the MobileRequest event type.
|
||||
* @param {boolean} enabled Boolean value for enable successful HTTP requests.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
networkRequestEnabled(enabled: Boolean): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable or disable reporting network and HTTP request errors to the MobileRequestError event type.
|
||||
* @param {boolean} enabled Boolean value for enabling network request errors.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
networkErrorRequestEnabled(enabled: Boolean): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable or disable capture of HTTP response bodies for HTTP error traces, and MobileRequestError events.
|
||||
* @param {boolean} enabled Boolean value for enabling HTTP response bodies.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
httpRequestBodyCaptureEnabled(enabled: Boolean): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string} url The URL of the request.
|
||||
* @param {string} method The HTTP method used, such as GET or POST.
|
||||
* @param {number} status The statusCode of the HTTP response, such as 200 for OK.
|
||||
* @param {number} startTime The start time of the request in milliseconds since the epoch.
|
||||
* @param {number} endTime The end time of the request in milliseconds since the epoch.
|
||||
* @param {number} bytesSent The number of bytes sent in the request.
|
||||
* @param {number} bytesReceived The number of bytes received in the response.
|
||||
* @param {string} body Optional. The response body of the HTTP response. The response body will be truncated and included in an HTTP Error metric if the HTTP transaction is an error.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
noticeHttpTransaction(
|
||||
url: string,
|
||||
method: string,
|
||||
status: Number,
|
||||
startTime: Number,
|
||||
endTime: Number,
|
||||
bytesSent: Number,
|
||||
bytesReceived: Number,
|
||||
body: string
|
||||
): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
* Records network failures.
|
||||
* If a network request fails, use this method to record details about the failure.
|
||||
* In most cases, place this call inside exception handlers.
|
||||
* @param {string} url The URL of the request.
|
||||
* @param {string} httpMethod The HTTP method used, such as GET or POST.
|
||||
* @param {number} startTime The start time of the request in milliseconds since the epoch.
|
||||
* @param {number} endTime The end time of the request in milliseconds since the epoch.
|
||||
* @param {string} failure The name of the network failure. Possible values are 'Unknown', 'BadURL', 'TimedOut', 'CannotConnectToHost', 'DNSLookupFailed', 'BadServerResponse', 'SecureConnectionFailed'.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
noticeNetworkFailure(url: string, method: string, startTime: Number, endTime: Number, failure: string): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
* Records JavaScript errors for ionic.
|
||||
* @param {Error} err The error to report.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
recordError(err: Error): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
* Shut down the agent within the current application lifecycle during runtime.
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
})
|
||||
shutdown(): void {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
|
||||
/**
|
||||
* @name Power Management
|
||||
* @description
|
||||
* The PowerManagement plugin offers access to the devices power-management functionality.
|
||||
* It should be used for applications which keep running for a long time without any user interaction.
|
||||
* @usage
|
||||
* ```
|
||||
* import { PowerManagement } from '@awesome-cordova-plugins/power-management/ngx';
|
||||
*
|
||||
* constructor(private powerManagement: PowerManagement) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.powerManagement.acquire()
|
||||
* .then(onSuccess)
|
||||
* .catch(onError);
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'PowerManagement',
|
||||
plugin: 'cordova-plugin-powermanagement-orig',
|
||||
pluginRef: 'powerManagement',
|
||||
repo: 'https://github.com/Viras-/cordova-plugin-powermanagement',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class PowerManagement extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Acquire a wakelock by calling this.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
acquire(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This acquires a partial wakelock, allowing the screen to be dimmed.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
dim(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Release the wakelock. It's important to do this when you're finished with the wakelock, to avoid unnecessary battery drain.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
release(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* By default, the plugin will automatically release a wakelock when your app is paused (e.g. when the screen is turned off, or the user switches to another app).
|
||||
* It will reacquire the wakelock upon app resume. If you would prefer to disable this behaviour, you can use this function.
|
||||
* @param set {boolean}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setReleaseOnPause(set: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -55,6 +55,23 @@ export enum BILLING_FEATURE {
|
||||
PRICE_CHANGE_CONFIRMATION,
|
||||
}
|
||||
|
||||
export enum REFUND_REQUEST_STATUS {
|
||||
/**
|
||||
* Apple has received the refund request.
|
||||
*/
|
||||
SUCCESS,
|
||||
|
||||
/**
|
||||
* User canceled submission of the refund request.
|
||||
*/
|
||||
USER_CANCELLED,
|
||||
|
||||
/**
|
||||
* There was an error with the request. See message for more details.
|
||||
*/
|
||||
ERROR,
|
||||
}
|
||||
|
||||
export enum PRORATION_MODE {
|
||||
UNKNOWN_SUBSCRIPTION_UPGRADE_DOWNGRADE_POLICY = 0,
|
||||
|
||||
@@ -78,10 +95,11 @@ export enum PRORATION_MODE {
|
||||
IMMEDIATE_WITHOUT_PRORATION = 3,
|
||||
|
||||
/**
|
||||
* Replacement takes effect when the old plan expires, and the new price will
|
||||
* be charged at the same time.
|
||||
* Replacement takes effect immediately, and the user is charged full price
|
||||
* of new plan and is given a full billing cycle of subscription,
|
||||
* plus remaining prorated time from the old plan.
|
||||
*/
|
||||
DEFERRED = 4,
|
||||
IMMEDIATE_AND_CHARGE_FULL_PRICE = 5,
|
||||
}
|
||||
|
||||
export enum PACKAGE_TYPE {
|
||||
@@ -144,12 +162,119 @@ export enum INTRO_ELIGIBILITY_STATUS {
|
||||
* The user is eligible for a free trial or intro pricing for this product.
|
||||
*/
|
||||
INTRO_ELIGIBILITY_STATUS_ELIGIBLE,
|
||||
/**
|
||||
* There is no free trial or intro pricing for this product.
|
||||
*/
|
||||
INTRO_ELIGIBILITY_STATUS_NO_INTRO_OFFER_EXISTS,
|
||||
}
|
||||
|
||||
export enum LOG_LEVEL {
|
||||
VERBOSE = 'VERBOSE',
|
||||
DEBUG = 'DEBUG',
|
||||
INFO = 'INFO',
|
||||
WARN = 'WARN',
|
||||
ERROR = 'ERROR',
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum for in-app message types.
|
||||
* This can be used if you disable automatic in-app message from showing automatically.
|
||||
* Then, you can pass what type of messages you want to show in the `showInAppMessages`
|
||||
* method in Purchases.
|
||||
*/
|
||||
export enum IN_APP_MESSAGE_TYPE {
|
||||
// Make sure the enum values are in sync with those defined in iOS/Android
|
||||
/**
|
||||
* In-app messages to indicate there has been a billing issue charging the user.
|
||||
*/
|
||||
BILLING_ISSUE = 0,
|
||||
|
||||
/**
|
||||
* iOS-only. This message will show if you increase the price of a subscription and
|
||||
* the user needs to opt-in to the increase.
|
||||
*/
|
||||
PRICE_INCREASE_CONSENT = 1,
|
||||
|
||||
/**
|
||||
* iOS-only. StoreKit generic messages.
|
||||
*/
|
||||
GENERIC = 2,
|
||||
}
|
||||
|
||||
export enum PRODUCT_CATEGORY {
|
||||
/**
|
||||
* A type of product for non-subscription.
|
||||
*/
|
||||
NON_SUBSCRIPTION = 'NON_SUBSCRIPTION',
|
||||
|
||||
/**
|
||||
* A type of product for subscriptions.
|
||||
*/
|
||||
SUBSCRIPTION = 'SUBSCRIPTION',
|
||||
|
||||
/**
|
||||
* A type of product for unknowns.
|
||||
*/
|
||||
UNKNOWN = 'UNKNOWN',
|
||||
}
|
||||
|
||||
/**
|
||||
* Recurrence mode for a pricing phase
|
||||
*/
|
||||
export enum RECURRENCE_MODE {
|
||||
/**
|
||||
* Pricing phase repeats infinitely until cancellation
|
||||
*/
|
||||
INFINITE_RECURRING = 1,
|
||||
|
||||
/**
|
||||
* Pricing phase repeats for a fixed number of billing periods
|
||||
*/
|
||||
FINITE_RECURRING = 2,
|
||||
|
||||
/**
|
||||
* Pricing phase does not repeat
|
||||
*/
|
||||
NON_RECURRING = 3,
|
||||
}
|
||||
|
||||
/**
|
||||
* Payment mode for offer pricing phases. Google Play only.
|
||||
*/
|
||||
export enum OFFER_PAYMENT_MODE {
|
||||
/**
|
||||
* Subscribers don't pay until the specified period ends
|
||||
*/
|
||||
FREE_TRIAL = 'FREE_TRIAL',
|
||||
|
||||
/**
|
||||
* Subscribers pay up front for a specified period
|
||||
*/
|
||||
SINGLE_PAYMENT = 'SINGLE_PAYMENT',
|
||||
|
||||
/**
|
||||
* Subscribers pay a discounted amount for a specified number of periods
|
||||
*/
|
||||
DISCOUNTED_RECURRING_PAYMENT = 'DISCOUNTED_RECURRING_PAYMENT',
|
||||
}
|
||||
|
||||
/**
|
||||
* Time duration unit for Period.
|
||||
*/
|
||||
export enum PERIOD_UNIT {
|
||||
DAY = 'DAY',
|
||||
WEEK = 'WEEK',
|
||||
MONTH = 'MONTH',
|
||||
YEAR = 'YEAR',
|
||||
UNKNOWN = 'UNKNOWN',
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Purchases
|
||||
* @description
|
||||
* Purchases is a cross platform solution for managing in-app subscriptions. A backend is also provided via [RevenueCat](https://www.revenuecat.com)
|
||||
* *Purchases* is a client for the [RevenueCat](https://www.revenuecat.com/) subscription and purchase tracking system.
|
||||
* It is an open source framework that provides a wrapper around `BillingClient`, `StoreKit` and the RevenueCat backend
|
||||
* to make implementing in-app subscriptions easy - receipt validation and status tracking included!
|
||||
*
|
||||
* ## Features
|
||||
* | | RevenueCat |
|
||||
@@ -164,36 +289,30 @@ export enum INTRO_ELIGIBILITY_STATUS {
|
||||
* | 📮 | Great support - [Help Center](https://revenuecat.zendesk.com) |
|
||||
* | 🤩 | Awesome [new features](https://trello.com/b/RZRnWRbI/revenuecat-product-roadmap) |
|
||||
*
|
||||
* ## Capacitor
|
||||
*
|
||||
* The Cordova plugin is not guaranteed to be up to date and we are moving our efforts to the Capacitor plugin.
|
||||
* Please consider using our [Capacitor plugin](https://docs.revenuecat.com/docs/capacitor) instead of the Cordova plugin and this wrapper.
|
||||
*
|
||||
* ## Getting Started
|
||||
*
|
||||
* For more detailed information, you can view our complete documentation at [docs.revenuecat.com](https://docs.revenuecat.com/docs).
|
||||
* @usage
|
||||
* #### 1. Get a RevenueCat API key
|
||||
*
|
||||
* Log in to the [RevenueCat dashboard](https://app.revenuecat.com) and obtain a free API key for your application.
|
||||
*
|
||||
* #### 2. Initialize the SDK
|
||||
*
|
||||
* You should only configure _Purchases_ once (usually on app launch) as soon as your app has a unique user id for your user. This can be when a user logs in if you have accounts or on launch if you can generate a random user identifier.
|
||||
*
|
||||
* ```typescript
|
||||
* import { Platform } from "@ionic/angular";
|
||||
* import { Purchases } from "@awesome-cordova-plugins/purchases/ngx";
|
||||
*
|
||||
* constructor(public platform: Platform, private purchases: Purchases) {
|
||||
* platform.ready().then(() => {
|
||||
* this.purchases.setDebugLogsEnabled(true); // Enable to get debug logs
|
||||
* this.purchases.configure("my_api_key", "my_app_user_id");
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* #### 3. Quickstart
|
||||
* Please follow the [Quickstart Guide](https://docs.revenuecat.com/docs/) for more information on how to use the SDK
|
||||
*
|
||||
* ## Latest changes to this plugin
|
||||
*
|
||||
* This latest release updates the plugin to use BillingClient 6 in Android. If you come from an older version of the
|
||||
* RevenueCat SDK, see [Android Native - 5.x to 6.x Migration](https://www.revenuecat.com/docs/android-native-5x-to-6x-migration)
|
||||
* for a more thorough explanation of the new Google subscription model announced with BillingClient 5 and how to take advantage of it.
|
||||
*
|
||||
* If your app supports product changes using [DEFERRED replacement mode](https://www.revenuecat.com/docs/managing-subscriptions#google-play),
|
||||
* then you can either stick with the previous major version until support for DEFERRED is re-introduced in this major version,
|
||||
* or you can remove DEFERRED replacement options from your app.
|
||||
*
|
||||
* @usage
|
||||
*
|
||||
* ### Requirements
|
||||
* Requires XCode 11.0+ and minimum target iOS 9.0+
|
||||
* This plugin has been tested with cordova-plugin-purchases@
|
||||
* Requires XCode 13.2+ and minimum target iOS 11.0+
|
||||
* This plugin has been tested with cordova-plugin-purchases@5.x.x
|
||||
* @interfaces
|
||||
* PurchasesError
|
||||
* IntroEligibility
|
||||
@@ -209,7 +328,7 @@ export enum INTRO_ELIGIBILITY_STATUS {
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Purchases',
|
||||
plugin: 'cordova-plugin-purchases@3.1.0',
|
||||
plugin: 'cordova-plugin-purchases@5.0.0',
|
||||
pluginRef: 'Purchases', // the variable reference to call the plugin, example: navigator.geolocation
|
||||
repo: 'https://github.com/RevenueCat/cordova-plugin-purchases', // the github repository URL for the plugin
|
||||
platforms: ['Android', 'iOS'], // Array of platforms supported, example: ['Android', 'iOS']
|
||||
@@ -234,6 +353,13 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
*/
|
||||
static PURCHASE_TYPE = PURCHASE_TYPE;
|
||||
|
||||
/**
|
||||
* Supported product categories.
|
||||
* @readonly
|
||||
* @enum {string}
|
||||
*/
|
||||
public static PRODUCT_CATEGORY = PRODUCT_CATEGORY;
|
||||
|
||||
/**
|
||||
* Enum for billing features.
|
||||
* Currently, these are only relevant for Google Play Android users:
|
||||
@@ -241,6 +367,13 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
*/
|
||||
static BILLING_FEATURE = BILLING_FEATURE;
|
||||
|
||||
/**
|
||||
* Enum with possible return states for beginning refund request.
|
||||
* @readonly
|
||||
* @enum {string}
|
||||
*/
|
||||
static REFUND_REQUEST_STATUS = REFUND_REQUEST_STATUS;
|
||||
|
||||
/**
|
||||
* Replace SKU's ProrationMode.
|
||||
*
|
||||
@@ -265,12 +398,28 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
*/
|
||||
static INTRO_ELIGIBILITY_STATUS = INTRO_ELIGIBILITY_STATUS;
|
||||
|
||||
/**
|
||||
* Enum of different possible log levels.
|
||||
*
|
||||
* @readonly
|
||||
* @enum {string}
|
||||
*/
|
||||
static LOG_LEVEL = LOG_LEVEL;
|
||||
|
||||
/**
|
||||
* Enum of different possible in-app message types.
|
||||
*
|
||||
* @readonly
|
||||
* @enum {string}
|
||||
*/
|
||||
static IN_APP_MESSAGE_TYPE = IN_APP_MESSAGE_TYPE;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link configureWith} instead. It accepts a {@link PurchasesConfiguration} object which offers more flexibility.
|
||||
*
|
||||
* Sets up Purchases with your API key and an app user id.
|
||||
*
|
||||
* @param {string} apiKey RevenueCat API Key. Needs to be a String
|
||||
* @param {string} apiKey RevenueCat API Key. Needs to be a string
|
||||
* @param {string?} appUserID A unique id for identifying the user
|
||||
* @param {boolean} observerMode An optional boolean. Set this to TRUE if you have your own IAP implementation and
|
||||
* want to use only RevenueCat's backend. Default is FALSE. If you are on Android and setting this to ON, you will have
|
||||
@@ -284,36 +433,15 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Sets up Purchases with your API key and an app user id.
|
||||
* @param {PurchasesConfiguration} Object containing configuration parameters
|
||||
* @param {PurchasesConfiguration} configuration containing configuration parameters
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
configureWith({ apiKey, appUserID, observerMode, userDefaultsSuiteName, useAmazon }: PurchasesConfiguration): void {}
|
||||
|
||||
/**
|
||||
* Set this to true if you are passing in an appUserID but it is anonymous, this is true by default if you didn't pass an appUserID
|
||||
* If a user tries to purchase a product that is active on the current app store account, we will treat it as a restore and alias
|
||||
* the new ID with the previous id.
|
||||
*
|
||||
* @param allowSharing {boolean} true if enabled, false to disabled
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setAllowSharingStoreAccount(allowSharing: boolean): void {}
|
||||
|
||||
/**
|
||||
* Add a dict of attribution information
|
||||
*
|
||||
* @deprecated Use the set<NetworkId> functions instead.
|
||||
* @param {object} data Attribution data from any of the attribution networks in Purchases.ATTRIBUTION_NETWORKS
|
||||
* @param {ATTRIBUTION_NETWORK} network Which network, see Purchases.ATTRIBUTION_NETWORK
|
||||
* @param {string?} networkUserId An optional unique id for identifying the user. Needs to be a string.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
addAttributionData(data: { [key: string]: any }, network: ATTRIBUTION_NETWORK, networkUserId?: string): void {}
|
||||
configureWith(configuration: PurchasesConfiguration): void {}
|
||||
|
||||
/**
|
||||
* Gets the Offerings configured in the dashboard
|
||||
*
|
||||
* @returns {Promise<PurchasesOfferings>} Will return a [PurchasesError] if the offerings are not properly configured in RevenueCat or if there is another error retrieving them.
|
||||
* @returns Will return a [PurchasesError] if the offerings are not properly configured in RevenueCat or if there is another error retrieving them.
|
||||
*/
|
||||
@Cordova()
|
||||
getOfferings(): Promise<PurchasesOfferings> {
|
||||
@@ -345,8 +473,6 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
* @param {UpgradeInfo} upgradeInfo Android only. Optional UpgradeInfo you wish to upgrade from containing the oldSKU
|
||||
* and the optional prorationMode.
|
||||
* @param {PURCHASE_TYPE} type Optional type of product, can be inapp or subs. Subs by default
|
||||
* @returns {Promise<MakePurchaseResponse>} A [PurchasesError] is triggered after an error or when the user cancels the purchase.
|
||||
* If user cancelled, userCancelled will be true
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
@@ -360,14 +486,42 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a purchase
|
||||
*
|
||||
* @param {PurchasesStoreProduct} product The product you want to purchase
|
||||
* @param {GoogleProductChangeInfo} googleProductChangeInfo Android only. Optional GoogleProductChangeInfo you
|
||||
* wish to upgrade from containing the oldProductIdentifier and the optional prorationMode.
|
||||
* @param {boolean} googleIsPersonalizedPrice Android and Google only. Optional boolean indicates personalized pricing on products available for purchase in the EU.
|
||||
* For compliance with EU regulations. User will see "This price has been customized for you" in the purchase dialog when true.
|
||||
* See https://developer.android.com/google/play/billing/integrate#personalized-price for more info.
|
||||
*
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
purchaseStoreProduct(
|
||||
product: PurchasesStoreProduct,
|
||||
googleProductChangeInfo?: GoogleProductChangeInfo | null,
|
||||
googleIsPersonalizedPrice = false
|
||||
): Promise<{ productIdentifier: string; customerInfo: CustomerInfo }> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a purchase
|
||||
*
|
||||
* @param {PurchasesPackage} aPackage The Package you wish to purchase. You can get the Packages by calling getOfferings
|
||||
* @param {UpgradeInfo} upgradeInfo Android only. Optional UpgradeInfo you wish to upgrade from containing the oldSKU
|
||||
* and the optional prorationMode.
|
||||
* @returns {Promise<MakePurchaseResponse>} A [PurchasesError] is triggered after an error or when the user cancels the purchase.
|
||||
* If user cancelled, userCancelled will be true
|
||||
* @param {GoogleProductChangeInfo} googleProductChangeInfo Android only. Optional GoogleProductChangeInfo you
|
||||
* wish to upgrade from containing the oldProductIdentifier and the optional prorationMode.
|
||||
* @param {boolean} googleIsPersonalizedPrice Android and Google only. Optional boolean indicates personalized pricing
|
||||
* on products available for purchase in the EU. For compliance with EU regulations.
|
||||
* User will see "This price has been customized for you" in the purchase dialog when true.
|
||||
* See https://developer.android.com/google/play/billing/integrate#personalized-price for more info.
|
||||
*
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
@@ -375,7 +529,34 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
})
|
||||
purchasePackage(
|
||||
aPackage: PurchasesPackage,
|
||||
upgradeInfo?: UpgradeInfo | null
|
||||
upgradeInfo?: UpgradeInfo | null,
|
||||
googleProductChangeInfo?: GoogleProductChangeInfo | null,
|
||||
googleIsPersonalizedPrice = false
|
||||
): Promise<{ productIdentifier: string; customerInfo: CustomerInfo }> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Google only. Make a purchase of a subscriptionOption
|
||||
*
|
||||
* @param {SubscriptionOption} subscriptionOption The SubscriptionOption you wish to purchase. You can get the
|
||||
* SubscriptionOption from StoreProducts by calling getOfferings
|
||||
* @param {GoogleProductChangeInfo} googleProductChangeInfo Android only. Optional GoogleProductChangeInfo you
|
||||
* wish to upgrade from containing the oldProductIdentifier and the optional prorationMode.
|
||||
* @param {boolean} googleIsPersonalizedPrice Android and Google only. Optional boolean indicates personalized pricing
|
||||
* on products available for purchase in the EU. For compliance with EU regulations.
|
||||
* User will see "This price has been customized for you" in the purchase dialog when true.
|
||||
* See https://developer.android.com/google/play/billing/integrate#personalized-price for more info.
|
||||
*
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
public static purchaseSubscriptionOption(
|
||||
subscriptionOption: SubscriptionOption,
|
||||
googleProductChangeInfo?: GoogleProductChangeInfo | null,
|
||||
googleIsPersonalizedPrice = false
|
||||
): Promise<{ productIdentifier: string; customerInfo: CustomerInfo }> {
|
||||
return;
|
||||
}
|
||||
@@ -383,7 +564,6 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Restores a user's previous purchases and links their appUserIDs to any user's also using those purchases.
|
||||
*
|
||||
* @returns {Promise<CustomerInfo>} Errors are of type [PurchasesError]
|
||||
*/
|
||||
@Cordova()
|
||||
restorePurchases(): Promise<CustomerInfo> {
|
||||
@@ -392,8 +572,6 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Get the appUserID that is currently in placed in the SDK
|
||||
*
|
||||
* @returns {string}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
getAppUserID(): string {
|
||||
@@ -405,8 +583,6 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
* to identify a user without calling configure.
|
||||
*
|
||||
* @param {string} appUserID The appUserID that should be linked to the currently user
|
||||
* @returns {Promise<LogInResult>} an object that contains the customerInfo after logging in, as well as a boolean indicating
|
||||
* whether the user has just been created for the first time in the RevenueCat backend.
|
||||
*/
|
||||
@Cordova()
|
||||
logIn(appUserID: string): Promise<LogInResult> {
|
||||
@@ -416,55 +592,15 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Logs out the Purchases client clearing the saved appUserID. This will generate a random user id and save it in the cache.
|
||||
* If the current user is already anonymous, this will produce a PurchasesError.
|
||||
*
|
||||
* @returns {Promise<CustomerInfo>} new purchaser info after resetting.
|
||||
*/
|
||||
@Cordova()
|
||||
logOut(): Promise<CustomerInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated, use logIn instead.
|
||||
* This function will alias two appUserIDs together.
|
||||
* @param newAppUserID {String} The new appUserID that should be linked to the currently identified appUserID. Needs to be a string.
|
||||
* @returns {Promise<CustomerInfo>} Errors are of type [PurchasesError] and get normally triggered if there
|
||||
* is an error retrieving the new purchaser info for the new user or if there is an error creating the alias.
|
||||
*/
|
||||
@Cordova()
|
||||
createAlias(newAppUserID: string): Promise<CustomerInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated, use logIn instead.
|
||||
* This function will identify the current user with an appUserID. Typically this would be used after a logout to identify a new user without calling configure
|
||||
* @param newAppUserID {String} The new appUserID that should be linked to the currently identified appUserID. Needs to be a string.
|
||||
* @returns {Promise<CustomerInfo>} Errors are of type [PurchasesError] and get normally triggered if there
|
||||
* is an error retrieving the new purchaser info for the new user.
|
||||
*/
|
||||
@Cordova()
|
||||
identify(newAppUserID: string): Promise<CustomerInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated, use logOut instead.
|
||||
* Resets the Purchases client clearing the saved appUserID. This will generate a random user id and save it in the cache.
|
||||
* @returns {Promise<CustomerInfo>} Errors are of type [PurchasesError] and get normally triggered if there
|
||||
* is an error retrieving the new purchaser info for the new user.
|
||||
*/
|
||||
@Cordova()
|
||||
reset(): Promise<CustomerInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current purchaser info. This call will return the cached purchaser info unless the cache is stale, in which case,
|
||||
* it will make a network call to retrieve it from the servers.
|
||||
*
|
||||
* @returns {Promise<CustomerInfo>} Errors are of type [PurchasesError] and get normally triggered if there
|
||||
* is an error retrieving the purchaser info.
|
||||
*/
|
||||
@Cordova()
|
||||
getCustomerInfo(): Promise<CustomerInfo> {
|
||||
@@ -473,8 +609,6 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Returns an observable that can be used to receive updates on the purchaser info
|
||||
*
|
||||
* @returns {Observable<CustomerInfo>}
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
@@ -486,6 +620,8 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link setLogLevel} instead.
|
||||
*
|
||||
* Enables/Disables debugs logs
|
||||
*
|
||||
* @param {boolean} enabled true to enable debug logs, false to disable
|
||||
@@ -493,6 +629,33 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
@Cordova({ sync: true })
|
||||
setDebugLogsEnabled(enabled: boolean): void {}
|
||||
|
||||
/**
|
||||
* Used to set the log level. Useful for debugging issues with the lovely team @RevenueCat.
|
||||
* @param {LOG_LEVEL} level the minimum log level to enable.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setLogLevel(level: LOG_LEVEL): void {}
|
||||
|
||||
/**
|
||||
* Set a custom log handler for redirecting logs to your own logging system.
|
||||
* By default, this sends info, warning, and error messages.
|
||||
* If you wish to receive Debug level messages, see [setLogLevel].
|
||||
*
|
||||
* @param {LogHandler} logHandler It will get called for each log event.
|
||||
* Use this function to redirect the log to your own logging system
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setLogHandler(logHandler: LogHandler): void {}
|
||||
|
||||
/**
|
||||
* iOS only.
|
||||
*
|
||||
* @param {boolean} enabled Set this property to true *only* when testing the ask-to-buy / SCA purchases flow.
|
||||
* More information: http://errors.rev.cat/ask-to-buy
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setSimulatesAskToBuyInSandbox(enabled: boolean): void {}
|
||||
|
||||
/**
|
||||
* This method will send all the purchases to the RevenueCat backend. Call this when using your own implementation
|
||||
* for subscriptions anytime a sync is needed, like after a successful purchase.
|
||||
@@ -503,13 +666,25 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
syncPurchases(): void {}
|
||||
|
||||
/**
|
||||
* iOS only.
|
||||
* This method will send a purchase to the RevenueCat backend. This function should only be called if you are
|
||||
* in Amazon observer mode or performing a client side migration of your current users to RevenueCat.
|
||||
*
|
||||
* @param {boolean} enabled Set this property to true *only* when testing the ask-to-buy / SCA purchases flow.
|
||||
* More information: http://errors.rev.cat/ask-to-buy
|
||||
* The receipt IDs are cached if successfully posted so they are not posted more than once.
|
||||
*
|
||||
* @param {string} productID Product ID associated to the purchase.
|
||||
* @param {string} receiptID ReceiptId that represents the Amazon purchase.
|
||||
* @param {string} amazonUserID Amazon's userID. This parameter will be ignored when syncing a Google purchase.
|
||||
* @param {(string|null|undefined)} isoCurrencyCode Product's currency code in ISO 4217 format.
|
||||
* @param {(number|null|undefined)} price Product's price.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setSimulatesAskToBuyInSandbox(enabled: boolean): void {}
|
||||
syncObserverModeAmazonPurchase(
|
||||
productID: string,
|
||||
receiptID: string,
|
||||
amazonUserID: string,
|
||||
isoCurrencyCode?: string | null,
|
||||
price?: number | null
|
||||
): void {}
|
||||
|
||||
/**
|
||||
* Enable automatic collection of Apple Search Ads attribution. Disabled by default.
|
||||
@@ -526,8 +701,6 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
enableAdServicesAttributionTokenCollection(): void {}
|
||||
|
||||
/**
|
||||
* @returns {Promise<boolean>} A boolean indicating if the `appUserID` has been generated
|
||||
* by RevenueCat or not.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
isAnonymous(): boolean {
|
||||
@@ -545,7 +718,6 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
* pricing, to not create a misleading situation. To avoid this, make sure you are testing with the latest version of
|
||||
* iOS so that the subscription group can be collected by the SDK. Android always returns INTRO_ELIGIBILITY_STATUS_UNKNOWN.
|
||||
* @param productIdentifiers Array of product identifiers for which you want to compute eligibility
|
||||
* @returns { Promise<Object.<string, IntroEligibility>> } Map of IntroEligibility per productId
|
||||
*/
|
||||
@Cordova()
|
||||
checkTrialOrIntroductoryPriceEligibility(
|
||||
@@ -571,7 +743,6 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
* Removes a given ShouldPurchasePromoProductListener
|
||||
*
|
||||
* @param {ShouldPurchasePromoProductListener} listenerToRemove ShouldPurchasePromoProductListener reference of the listener to remove
|
||||
* @returns {boolean} True if listener was removed, false otherwise
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
removeShouldPurchasePromoProductListener(listenerToRemove: ShouldPurchasePromoProductListener): boolean {
|
||||
@@ -790,7 +961,7 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
*
|
||||
* @param features An array of feature types to check for support. Feature types must be one of
|
||||
* [BILLING_FEATURE]. By default, is an empty list and no specific feature support will be checked.
|
||||
* @returns {Promise<boolean>} Or [PurchasesError] if there is an error.
|
||||
*
|
||||
*/
|
||||
@Cordova()
|
||||
canMakePayments(features: BILLING_FEATURE[] = []): Promise<boolean> {
|
||||
@@ -804,6 +975,67 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setProxyURL(url: string): void {}
|
||||
|
||||
/**
|
||||
* iOS 15+ only. Presents a refund request sheet in the current window scene for
|
||||
* the latest transaction associated with the active entitlement.
|
||||
*
|
||||
* If the request was unsuccessful, no active entitlements could be found for
|
||||
* the user, or multiple active entitlements were found for the user,
|
||||
* the promise will return an error.
|
||||
* If called in an unsupported platform (iOS < 15), an `unsupportedError` will be sent to the callback.
|
||||
*
|
||||
* Important: This method should only be used if your user can only have a single active entitlement at a given time.
|
||||
* If a user could have more than one entitlement at a time, use `beginRefundRequestForEntitlement` instead.
|
||||
*
|
||||
*/
|
||||
@Cordova()
|
||||
beginRefundRequestForActiveEntitlement(): Promise<REFUND_REQUEST_STATUS> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* iOS 15+ only. Presents a refund request sheet in the current window scene for
|
||||
* the latest transaction associated with the `entitlement`.
|
||||
*
|
||||
* If the request was unsuccessful, the promise will return an error.
|
||||
* If called in an unsupported platform (iOS < 15), an `unsupportedError` will be sent to the callback.
|
||||
*
|
||||
* @param entitlementInfo The entitlement to begin a refund request for.
|
||||
*
|
||||
*/
|
||||
@Cordova()
|
||||
beginRefundRequestForEntitlement(entitlementInfo: PurchasesEntitlementInfo): Promise<REFUND_REQUEST_STATUS> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* iOS 15+ only. Presents a refund request sheet in the current window scene for
|
||||
* the latest transaction associated with the `product`.
|
||||
*
|
||||
* If the request was unsuccessful, the promise will return an error.
|
||||
* If called in an unsupported platform (iOS < 15), an `unsupportedError` will be sent to the callback.
|
||||
*
|
||||
* @param storeProduct The StoreProduct to begin a refund request for.
|
||||
*
|
||||
*/
|
||||
@Cordova()
|
||||
beginRefundRequestForProduct(storeProduct: PurchasesStoreProduct): Promise<REFUND_REQUEST_STATUS> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows in-app messages available from the App Store or Google Play. You need to disable messages from showing
|
||||
* automatically using [PurchasesConfiguration.shouldShowInAppMessagesAutomatically].
|
||||
*
|
||||
* Note: In iOS, this requires version 16+. In older versions the promise will be resolved successfully
|
||||
* immediately.
|
||||
*
|
||||
* @param messageTypes An array of message types that the stores can display inside your app. Must be one of
|
||||
* [IN_APP_MESSAGE_TYPE]. By default, is undefined and all message types will be shown.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
showInAppMessages(messageTypes?: IN_APP_MESSAGE_TYPE[]): void {}
|
||||
}
|
||||
/**
|
||||
* The EntitlementInfo object gives you access to all of the information about the status of a user entitlement.
|
||||
@@ -819,7 +1051,6 @@ export interface PurchasesEntitlementInfo {
|
||||
readonly isActive: boolean;
|
||||
/**
|
||||
* True if the underlying subscription is set to renew at the end of the billing period (expirationDate).
|
||||
* Will always be True if entitlement is for lifetime access.
|
||||
*/
|
||||
readonly willRenew: boolean;
|
||||
/**
|
||||
@@ -886,7 +1117,6 @@ export interface PurchasesEntitlementInfos {
|
||||
readonly activeInCurrentEnvironment: { [key: string]: PurchasesEntitlementInfo };
|
||||
/**
|
||||
* Dictionary of active ``EntitlementInfo`` objects keyed by their identifiers.
|
||||
*
|
||||
* @note: these can be active on any environment.
|
||||
*/
|
||||
readonly activeInAnyEnvironment: { [key: string]: PurchasesEntitlementInfo };
|
||||
@@ -1054,6 +1284,7 @@ export interface PurchasesStoreProduct {
|
||||
readonly priceString: string;
|
||||
/**
|
||||
* Currency code for price and original price.
|
||||
* Contains the currency code value of defaultOption for Google Play.
|
||||
*/
|
||||
readonly currencyCode: string;
|
||||
/**
|
||||
@@ -1064,6 +1295,34 @@ export interface PurchasesStoreProduct {
|
||||
* Collection of discount offers for a product. Null for Android.
|
||||
*/
|
||||
readonly discounts: PurchasesStoreProductDiscount[] | null;
|
||||
|
||||
/**
|
||||
* Product category.
|
||||
*/
|
||||
readonly productCategory: PRODUCT_CATEGORY | null;
|
||||
|
||||
/**
|
||||
* Subscription period, specified in ISO 8601 format. For example,
|
||||
* P1W equates to one week, P1M equates to one month,
|
||||
* P3M equates to three months, P6M equates to six months,
|
||||
* and P1Y equates to one year.
|
||||
* Note: Not available for Amazon.
|
||||
*/
|
||||
readonly subscriptionPeriod: string | null;
|
||||
|
||||
/**
|
||||
* Default subscription option for a product. Google Play only.
|
||||
*/
|
||||
readonly defaultOption: SubscriptionOption | null;
|
||||
/**
|
||||
* Collection of subscription options for a product. Google Play only.
|
||||
*/
|
||||
readonly subscriptionOptions: SubscriptionOption[] | null;
|
||||
/**
|
||||
* Offering identifier the store product was presented from.
|
||||
* Null if not using offerings or if fetched directly from store via getProducts.
|
||||
*/
|
||||
readonly presentedOfferingIdentifier: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1102,6 +1361,13 @@ export interface PurchasesOffering {
|
||||
* Offering description defined in RevenueCat dashboard.
|
||||
*/
|
||||
readonly serverDescription: string;
|
||||
/**
|
||||
* Offering metadata defined in RevenueCat dashboard. To access values, you need
|
||||
* to check the type beforehand. For example:
|
||||
* const my_unknown_value: unknown = offering.metadata['my_key'];
|
||||
* const my_string_value: string | undefined = typeof(my_unknown_value) === 'string' ? my_unknown_value : undefined;
|
||||
*/
|
||||
readonly metadata: { [key: string]: unknown };
|
||||
/**
|
||||
* Array of `Package` objects available for purchase.
|
||||
*/
|
||||
@@ -1172,6 +1438,20 @@ export interface UpgradeInfo {
|
||||
readonly prorationMode?: PRORATION_MODE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds the information used when upgrading from another sku. For Android use only.
|
||||
*/
|
||||
export interface GoogleProductChangeInfo {
|
||||
/**
|
||||
* The old product identifier to upgrade from.
|
||||
*/
|
||||
readonly oldProductIdentifier: string;
|
||||
/**
|
||||
* The [PRORATION_MODE] to use when upgrading the given oldSKU.
|
||||
*/
|
||||
readonly prorationMode?: PRORATION_MODE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds the introductory price status
|
||||
*/
|
||||
@@ -1224,10 +1504,185 @@ export interface PurchasesConfiguration {
|
||||
* suite, otherwise it will use standardUserDefaults. Default is null, which will make the SDK use standardUserDefaults.
|
||||
*/
|
||||
userDefaultsSuiteName?: string;
|
||||
/**
|
||||
* iOS-only, will be ignored for Android.
|
||||
* Set this to TRUE to enable StoreKit2.
|
||||
* Default is FALSE.
|
||||
*
|
||||
* @deprecated RevenueCat currently uses StoreKit 1 for purchases, as its stability in production scenarios has
|
||||
* proven to be more performant than StoreKit 2.
|
||||
* We're collecting more data on the best approach, but StoreKit 1 vs StoreKit 2 is an implementation detail
|
||||
* that you shouldn't need to care about.
|
||||
* We recommend not using this parameter, letting RevenueCat decide for you which StoreKit implementation to use.
|
||||
*/
|
||||
usesStoreKit2IfAvailable?: boolean;
|
||||
/**
|
||||
* An optional boolean. Android only. Required to configure the plugin to be used in the Amazon Appstore.
|
||||
*/
|
||||
useAmazon?: boolean;
|
||||
/**
|
||||
* Whether we should show store in-app messages automatically. Both Google Play and the App Store provide in-app
|
||||
* messages for some situations like billing issues. By default, those messages will be shown automatically.
|
||||
* This allows to disable that behavior, so you can display those messages at your convenience. For more information,
|
||||
* check: https://rev.cat/storekit-message and https://rev.cat/googleplayinappmessaging
|
||||
*/
|
||||
shouldShowInAppMessagesAutomatically?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains all details associated with a SubscriptionOption
|
||||
* Used only for Google
|
||||
*/
|
||||
export interface SubscriptionOption {
|
||||
/**
|
||||
* Identifier of the subscription option
|
||||
* If this SubscriptionOption represents a base plan, this will be the basePlanId.
|
||||
* If it represents an offer, it will be {basePlanId}:{offerId}
|
||||
*/
|
||||
readonly id: string;
|
||||
|
||||
/**
|
||||
* Identifier of the StoreProduct associated with this SubscriptionOption
|
||||
* This will be {subId}:{basePlanId}
|
||||
*/
|
||||
readonly storeProductId: string;
|
||||
|
||||
/**
|
||||
* Identifer of the subscription associated with this SubscriptionOption
|
||||
* This will be {subId}
|
||||
*/
|
||||
readonly productId: string;
|
||||
|
||||
/**
|
||||
* Pricing phases defining a user's payment plan for the product over time.
|
||||
*/
|
||||
readonly pricingPhases: PricingPhase[];
|
||||
|
||||
/**
|
||||
* Tags defined on the base plan or offer. Empty for Amazon.
|
||||
*/
|
||||
readonly tags: string[];
|
||||
|
||||
/**
|
||||
* True if this SubscriptionOption represents a subscription base plan (rather than an offer).
|
||||
*/
|
||||
readonly isBasePlan: boolean;
|
||||
|
||||
/**
|
||||
* The subscription period of fullPricePhase (after free and intro trials).
|
||||
*/
|
||||
readonly billingPeriod: Period | null;
|
||||
|
||||
/**
|
||||
* True if the subscription is pre-paid.
|
||||
*/
|
||||
readonly isPrepaid: boolean;
|
||||
|
||||
/**
|
||||
* The full price PricingPhase of the subscription.
|
||||
* Looks for the last price phase of the SubscriptionOption.
|
||||
*/
|
||||
readonly fullPricePhase: PricingPhase | null;
|
||||
|
||||
/**
|
||||
* The free trial PricingPhase of the subscription.
|
||||
* Looks for the first pricing phase of the SubscriptionOption where amountMicros is 0.
|
||||
* There can be a freeTrialPhase and an introductoryPhase in the same SubscriptionOption.
|
||||
*/
|
||||
readonly freePhase: PricingPhase | null;
|
||||
|
||||
/**
|
||||
* The intro trial PricingPhase of the subscription.
|
||||
* Looks for the first pricing phase of the SubscriptionOption where amountMicros is greater than 0.
|
||||
* There can be a freeTrialPhase and an introductoryPhase in the same SubscriptionOption.
|
||||
*/
|
||||
readonly introPhase: PricingPhase | null;
|
||||
|
||||
/**
|
||||
* Offering identifier the subscription option was presented from
|
||||
*/
|
||||
readonly presentedOfferingIdentifier: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains all the details associated with a PricingPhase
|
||||
*/
|
||||
export interface PricingPhase {
|
||||
/**
|
||||
* Billing period for which the PricingPhase applies
|
||||
*/
|
||||
readonly billingPeriod: Period;
|
||||
|
||||
/**
|
||||
* Recurrence mode of the PricingPhase
|
||||
*/
|
||||
readonly recurrenceMode: RECURRENCE_MODE | null;
|
||||
|
||||
/**
|
||||
* Number of cycles for which the pricing phase applies.
|
||||
* Null for infiniteRecurring or finiteRecurring recurrence modes.
|
||||
*/
|
||||
readonly billingCycleCount: number | null;
|
||||
|
||||
/**
|
||||
* Price of the PricingPhase
|
||||
*/
|
||||
readonly price: Price;
|
||||
|
||||
/**
|
||||
* Indicates how the pricing phase is charged for finiteRecurring pricing phases
|
||||
*/
|
||||
readonly offerPaymentMode: OFFER_PAYMENT_MODE | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains all the details associated with a Price
|
||||
*/
|
||||
export interface Price {
|
||||
/**
|
||||
* Formatted price of the item, including its currency sign. For example $3.00
|
||||
*/
|
||||
readonly formatted: string;
|
||||
|
||||
/**
|
||||
* Price in micro-units, where 1,000,000 micro-units equal one unit of the currency.
|
||||
*
|
||||
* For example, if price is "€7.99", price_amount_micros is 7,990,000. This value represents
|
||||
* the localized, rounded price for a particular currency.
|
||||
*/
|
||||
readonly amountMicros: number;
|
||||
|
||||
/**
|
||||
* Returns ISO 4217 currency code for price and original price.
|
||||
*
|
||||
* For example, if price is specified in British pounds sterling, price_currency_code is "GBP".
|
||||
* If currency code cannot be determined, currency symbol is returned.
|
||||
*/
|
||||
readonly currencyCode: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains all the details associated with a Period
|
||||
*/
|
||||
export interface Period {
|
||||
/**
|
||||
* The number of period units: day, week, month, year, unknown
|
||||
*/
|
||||
readonly unit: PERIOD_UNIT;
|
||||
|
||||
/**
|
||||
* The increment of time that a subscription period is specified in
|
||||
*/
|
||||
readonly value: number;
|
||||
|
||||
/**
|
||||
* Specified in ISO 8601 format. For example, P1W equates to one week,
|
||||
* P1M equates to one month, P3M equates to three months, P6M equates to six months,
|
||||
* and P1Y equates to one year
|
||||
*/
|
||||
readonly iso8601: string;
|
||||
}
|
||||
|
||||
export type ShouldPurchasePromoProductListener = (deferredPurchase: () => void) => void;
|
||||
|
||||
export type LogHandler = (logLevel: LOG_LEVEL, message: string) => void;
|
||||
|
||||
42
src/@awesome-cordova-plugins/plugins/save-dialog/index.ts
Normal file
42
src/@awesome-cordova-plugins/plugins/save-dialog/index.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
/**
|
||||
* @name SaveDialog
|
||||
* @description
|
||||
* Plugin displays the native Save dialog which allows users to store a file in the selected location.
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { SaveDialog } from '@awesome-cordova-plugins/save-dialog';
|
||||
*
|
||||
* constructor(private saveDialog: SaveDialog) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.saveDialog.saveFile(blob, fileName);
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'SaveDialog',
|
||||
plugin: 'cordova-plugin-save-dialog',
|
||||
pluginRef: 'SaveDialog',
|
||||
repo: 'https://github.com/Amphiluke/cordova-plugin-save-dialog',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class SaveDialog extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Creates a PDF using a URL, it download the document into an in memory Webkit object, and renders it into a PDF.
|
||||
*
|
||||
* @param url {string} URL to create a PDF from
|
||||
* @param options {PDFGeneratorOptions} options for PDF generation
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
saveFile(blob: Blob, fileName?: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
105
src/@awesome-cordova-plugins/plugins/sms-retriever-api/index.ts
Normal file
105
src/@awesome-cordova-plugins/plugins/sms-retriever-api/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
|
||||
import { Observable, fromEvent } from 'rxjs';
|
||||
|
||||
export interface IncomingSMS {
|
||||
message: string;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export enum SmsRetrieverStatus {
|
||||
AlreadyStarted = 'SMS_RETRIEVER_ALREADY_STARTED',
|
||||
Started = 'SMS_RETRIEVER_STARTED',
|
||||
Done = 'SMS_RETRIEVER_DONE',
|
||||
Timeout = 'TIMEOUT',
|
||||
}
|
||||
|
||||
/**
|
||||
* @name SmsRetrieverApi
|
||||
* @description
|
||||
* This plugin retries the SMS which arrive without requiring READ permissions.
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { SmsRetrieverApi } from '@awesome-cordova-plugins/sms-retriever-api/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private SmsRetrieverApi: SmsRetrieverApi) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.SmsRetrieverApi.getHashString()
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
* this.SmsRetrieverApi.startWatch()
|
||||
* .subscribe(
|
||||
* (res: any) => console.log(res),
|
||||
* (error: any) => console.error(error),
|
||||
* )
|
||||
* .catch((error: any) => console.error(error));
|
||||
* this.onSMSArrive.onSMSArrive()
|
||||
* .subscribe(() => { console.log(); });
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'SmsRetriever',
|
||||
plugin: 'cordova-plugin-sms-retriever',
|
||||
pluginRef: 'cordova.plugins.SMSRetriever',
|
||||
repo: 'https://github.com/andreszs/cordova-plugin-sms-retriever',
|
||||
install: 'ionic cordova plugin add cordova-plugin-sms-retriever --variable PLAY_SERVICES_VERSION="18.0.1"',
|
||||
installVariables: ['PLAY_SERVICES_VERSION'],
|
||||
platforms: ['Android'],
|
||||
})
|
||||
@Injectable()
|
||||
export class SmsRetrieverApi extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* This function start watching message arrive event and retrieve message text.
|
||||
*
|
||||
* @returns {Observable<string>} Returns an observable that resolves when retries SMS text or TIMEOUT after 5 min.
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
})
|
||||
startWatch(): Observable<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function stop watching message.
|
||||
*
|
||||
* @returns {Promise<string>} Returns a promise that resolves when successfully remove sms listener.
|
||||
*/
|
||||
@Cordova()
|
||||
stopWatch(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is to get hash string of APP.
|
||||
*
|
||||
* @returns {Promise<string>} Returns a promise that resolves when successfully generate hash of APP.
|
||||
*/
|
||||
@Cordova()
|
||||
getHashString(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a dialog to select your mobile numbers saved in phone and returns selected phone number.
|
||||
*
|
||||
* @returns {Promise<string>} Returns a promise that resolves when successfully get phone number
|
||||
*/
|
||||
@Cordova()
|
||||
getPhoneNumber(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Watch incoming SMS event listener
|
||||
*
|
||||
* @returns {Observable<IncomingSMS>}
|
||||
*/
|
||||
onSMSArrive(): Observable<IncomingSMS> {
|
||||
return fromEvent<IncomingSMS>(document, 'onSMSArrive');
|
||||
}
|
||||
}
|
||||
70
src/@awesome-cordova-plugins/plugins/smtp-client/index.ts
Normal file
70
src/@awesome-cordova-plugins/plugins/smtp-client/index.ts
Normal file
@@ -0,0 +1,70 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
/**
|
||||
* @name Smtp Client
|
||||
* @description
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { SmtpClient } from '@awesome-cordova-plugins/smtp-client/ngx';
|
||||
*
|
||||
* constructor(private smtpClient: SmtpClient) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.smtpClient.sendMail(mailSettings, success, failure);
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'SMTPClient',
|
||||
plugin: 'cordova-plugin-smtp-client',
|
||||
pluginRef: 'smtpClient',
|
||||
repo: 'https://github.com/CWBudde/cordova-plugin-smtp-client',
|
||||
install: 'ionic cordova plugin add cordova-plugin-smtp-client',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class SmtpClient extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* The sendMail function.
|
||||
*
|
||||
* var mailSettings = {
|
||||
* emailFrom: "emailFrom@domain.com",
|
||||
* emailTo: "emailTo@domain.com",
|
||||
* smtp: "smtp-mail.domain.com",
|
||||
* smtpUserName: "authuser@domain.com",
|
||||
* smtpPassword: "password",
|
||||
* attachments: ["attachment1", "attachment2"],
|
||||
* subject: "email subject",
|
||||
* textBody: "write something within the body of the email"
|
||||
* };
|
||||
*
|
||||
* var successCallback = function(message) {
|
||||
* alert(message);
|
||||
* }
|
||||
*
|
||||
* var errorCallback = function(message) {
|
||||
* alert("Error sending the email");
|
||||
* }
|
||||
*
|
||||
* @param mailSettings
|
||||
* @param successCallback
|
||||
* @param errorCallback
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
sendMail(mailSettings: any, successCallback: any, errorCallback: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* You can call isLoaded to check if client is loaded.
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
isLoaded(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
/**
|
||||
* @name Unique Device ID
|
||||
* @description
|
||||
* This plugin produces a unique, cross-install, app-specific device id.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { UniqueDeviceID } from '@awesome-cordova-plugins/unique-device-id/ngx';
|
||||
*
|
||||
* constructor(private uniqueDeviceID: UniqueDeviceID) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.uniqueDeviceID.get()
|
||||
* .then((uuid: any) => console.log(uuid))
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'UniqueDeviceID',
|
||||
plugin: 'cordova-plugin-uniquedeviceid',
|
||||
pluginRef: 'window.plugins.uniqueDeviceID',
|
||||
repo: 'https://github.com/Paldom/UniqueDeviceID',
|
||||
install: '', // OPTIONAL install command, in case the plugin requires variables
|
||||
installVariables: [], // OPTIONAL the plugin requires variables
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8'], // Array of platforms supported, example: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class UniqueDeviceID extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Gets a unique, cross-install, app-specific device id.
|
||||
* @return {Promise<string>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
get(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1181,4 +1181,45 @@ export class UrbanAirShip extends AwesomeCordovaNativePlugin {
|
||||
openPreferenceCenter(prenferenceCenterId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides the locale setting.
|
||||
*
|
||||
* @param {string} locale language and optional country code.
|
||||
* @param {function} [success] Success callback.
|
||||
* @param {function(message)} [failure] Failure callback.
|
||||
* @param {string} failure.message The error message.
|
||||
* @since 14.3.0
|
||||
*/
|
||||
@Cordova()
|
||||
setCurrentLocale(locale: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the currently set locale.
|
||||
*
|
||||
* @param {function(locale)} [success] Success callback.
|
||||
* @param {string} success.locale The locale as a string.
|
||||
* @param {function(message)} [failure] Failure callback.
|
||||
* @param {string} failure.message The error message.
|
||||
* @since 14.3.0
|
||||
*/
|
||||
@Cordova()
|
||||
getCurrentLocale(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the current locale.
|
||||
*
|
||||
* @param {function} [success] Success callback.
|
||||
* @param {function(message)} [failure] Failure callback.
|
||||
* @param {string} failure.message The error message.
|
||||
* @since 14.3.0
|
||||
*/
|
||||
@Cordova()
|
||||
clearLocale(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -619,4 +619,118 @@ export class WonderPush extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
UserPreferences = new UserPreferencesMethods(this);
|
||||
|
||||
/**
|
||||
* Gets the user's country, either as previously stored, or as guessed from the system.
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
@Cordova()
|
||||
getCountry(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides the user's country. You should use an ISO 3166-1 alpha-2 country code. Defaults to getting the country code from the system default locale.
|
||||
* Use `null` to disable the override.
|
||||
* @param {string} country
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
setCountry(country: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the user's currency, either as previously stored, or as guessed from the system.
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
@Cordova()
|
||||
getCurrency(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides the user's currency. You should use an ISO 4217 currency code. Defaults to getting the currency code from the system default locale.
|
||||
* Use `null` to disable the override.
|
||||
* @param {string} currency -
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
setCurrency(currency: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the user's locale, either as previously stored, or as guessed from the system.
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
@Cordova()
|
||||
getLocale(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides the user's locale.
|
||||
* You should use an `xx-XX` form of RFC 1766, composed of a lowercase ISO 639-1 language code, an underscore or a dash, and an uppercase ISO 3166-1 alpha-2 country code.
|
||||
* Defaults to getting the locale code from the system default locale.
|
||||
* Use `null` to disable the override.
|
||||
* @param {string} locale -
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
setLocale(locale: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the user's time zone, either as previously stored, or as guessed from the system.
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
@Cordova()
|
||||
getTimeZone(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* You should use an IANA time zone database codes, `Continent/Country` style preferably, abbreviations like `CET`, `PST`, `UTC`, which have the drawback of changing on daylight saving transitions.
|
||||
* Defaults to getting the time zone code from the system default locale.
|
||||
* Use `null` to disable the override.
|
||||
* @param {string} timeZone -
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
setTimeZone(timeZone: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables the collection of the user's geolocation.
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
enableGeolocation(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disables the collection of the user's geolocation.
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
disableGeolocation(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides the user's geolocation.
|
||||
* Using this method you can have the user's location be set to wherever you want.
|
||||
* This may be useful to use a pre-recorded location.
|
||||
* @param {number} latitude
|
||||
* @param {number} longitude
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
setGeolocation(latitude: number, longitude: number): Promise<void> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,11 +33,12 @@ export class Zip extends AwesomeCordovaNativePlugin {
|
||||
* Extracts files from a ZIP archive
|
||||
* @param {string} sourceZip Source ZIP file
|
||||
* @param {string} destFolder Destination folder
|
||||
* @param {Function} onSuccess callback to be called on when done
|
||||
* @param {Function} onProgress optional callback to be called on progress update
|
||||
* @returns {Promise<number>} returns a promise that resolves with a number. 0 is success, -1 is error
|
||||
*/
|
||||
@Cordova()
|
||||
unzip(sourceZip: string, destFolder: string, onProgress?: Function): Promise<number> {
|
||||
unzip(sourceZip: string, destFolder: string, onSuccess: Function, onProgress?: Function): Promise<number> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user