mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-02-16 00:00:02 +08:00
Compare commits
495 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | ||
|
|
b8e3ac4403 | ||
|
|
cd81cfabf4 | ||
|
|
81a8b42a29 | ||
|
|
6f14ba6031 | ||
|
|
62f664e61a | ||
|
|
664e3385ce | ||
|
|
8201dc1d14 | ||
|
|
375246970c | ||
|
|
d7c771b250 | ||
|
|
89b21b7694 | ||
|
|
5e23ebebdc | ||
|
|
5bc6693571 | ||
|
|
facadcabaa | ||
|
|
d1210b76a7 | ||
|
|
e7d1641fe9 | ||
|
|
e22cf2bb69 | ||
|
|
deb8a61a81 | ||
|
|
3cca6104df | ||
|
|
de884a55d0 | ||
|
|
5a22241db5 | ||
|
|
d476af44cd | ||
|
|
8b6d6c726b | ||
|
|
7f1bf9520b | ||
|
|
f9257f4d65 | ||
|
|
85441e59ca | ||
|
|
a86c55ba5f | ||
|
|
f8c6430a26 | ||
|
|
98dc7c4be0 | ||
|
|
178489ffaa | ||
|
|
bf860c30c2 | ||
|
|
a7a10913fc | ||
|
|
406ad4ec45 | ||
|
|
c3a01431ce | ||
|
|
dc1ee8c530 | ||
|
|
b6a44e3a8a | ||
|
|
7761ed4a39 | ||
|
|
e799600b6e | ||
|
|
b0780a8bec | ||
|
|
b6cc2d93f0 | ||
|
|
7817643282 | ||
|
|
b572a10a6e | ||
|
|
acb39e5849 | ||
|
|
74302846dc | ||
|
|
a76463877c | ||
|
|
698692ed59 | ||
|
|
dfd3d55dbc | ||
|
|
f2d809f8b3 | ||
|
|
22d6cd957b | ||
|
|
2b061556dd | ||
|
|
7baa002fb9 | ||
|
|
2698011d4b | ||
|
|
b8374ab3b1 | ||
|
|
e85f6cf2b2 | ||
|
|
f86764abe7 | ||
|
|
dcb9b225ce | ||
|
|
97739e86f1 | ||
|
|
b3fade36c6 | ||
|
|
a6fcc16d12 | ||
|
|
e420bd1d2a | ||
|
|
8b826e3c1b | ||
|
|
1b45462542 | ||
|
|
82377f0633 | ||
|
|
aef160e418 | ||
|
|
a801c7d305 | ||
|
|
898e0b8588 | ||
|
|
99161e2b73 | ||
|
|
678fb71a7f | ||
|
|
6e953e58ca | ||
|
|
29163b93d6 | ||
|
|
ba83a81c75 | ||
|
|
ac1d0aa0a1 | ||
|
|
5d7cf3940f | ||
|
|
725e88080b | ||
|
|
38d59e3455 | ||
|
|
b5b8968ac4 | ||
|
|
ebdd6e9796 | ||
|
|
620385befc | ||
|
|
ba9c1c154e | ||
|
|
dd081cc696 | ||
|
|
135c6cc8b4 | ||
|
|
c7d39dde42 | ||
|
|
eb27d87d92 | ||
|
|
878a6e94c2 | ||
|
|
95fa8eb098 | ||
|
|
b1f4639640 | ||
|
|
d6697b8a95 | ||
|
|
41e96d950f | ||
|
|
56fc1d4663 | ||
|
|
9e5953bc27 | ||
|
|
346ea82652 | ||
|
|
8671e18391 | ||
|
|
0a31a374b1 | ||
|
|
64d2c55880 | ||
|
|
f96b7588de | ||
|
|
7a528b42d9 | ||
|
|
19fc222ea9 | ||
|
|
41a85e6587 | ||
|
|
04422600ca | ||
|
|
4e183b1881 | ||
|
|
63c83653c0 | ||
|
|
032f3a160a | ||
|
|
44967cc02c | ||
|
|
123517eac6 | ||
|
|
d1c13567d7 | ||
|
|
49df2996c8 | ||
|
|
d14d8c413e | ||
|
|
511300ea7b | ||
|
|
a3d3d546af | ||
|
|
cca5929a7d | ||
|
|
6e83ebdfb3 | ||
|
|
38528e1017 | ||
|
|
c801668d3f | ||
|
|
bc1ff3da7d | ||
|
|
a29927837c | ||
|
|
3935e620be | ||
|
|
379df77692 | ||
|
|
af723c02e3 | ||
|
|
daa929e229 | ||
|
|
126f23b303 | ||
|
|
95b84447ad | ||
|
|
5ebe762d4b | ||
|
|
ab1ea4aef9 | ||
|
|
08db901db6 | ||
|
|
0e922b7e0b | ||
|
|
cfa194b71a | ||
|
|
cee00fbcc8 | ||
|
|
9f65002b6e | ||
|
|
7aba998e1c | ||
|
|
3e1fdd966b | ||
|
|
c2b01e0510 | ||
|
|
26a8cbe437 | ||
|
|
7e2452b6ad | ||
|
|
5f9f58edba | ||
|
|
6b2c1fd32e | ||
|
|
f5b7b8469b | ||
|
|
c70508e877 | ||
|
|
dd349640ee | ||
|
|
6406cdc35c | ||
|
|
6f4d6cf0bc | ||
|
|
88e78cf9fa | ||
|
|
21b7b673e9 | ||
|
|
5b9382f2fe | ||
|
|
8bda638d19 | ||
|
|
f81610ef69 | ||
|
|
adba813eb0 | ||
|
|
aa00e37ffd | ||
|
|
c7566e2ba0 | ||
|
|
bf443da2d4 | ||
|
|
8a4055c06b | ||
|
|
00a0cbc05b | ||
|
|
343ca3652d | ||
|
|
1f5a2f007a | ||
|
|
bae0a8dbc8 | ||
|
|
18cb1acb2a | ||
|
|
9a4abea1cd | ||
|
|
46086a7f4f | ||
|
|
710cf7acc0 | ||
|
|
206b2183f1 | ||
|
|
a8dafc29be | ||
|
|
36ed9a6d9c | ||
|
|
ab2aec26e3 | ||
|
|
9f93ba66a5 | ||
|
|
d735124f59 | ||
|
|
ba5232cdb0 | ||
|
|
672552bd7d | ||
|
|
6e2b9a062a | ||
|
|
893540cf88 | ||
|
|
dcad4d7711 | ||
|
|
bfd3a58276 | ||
|
|
365571eaf2 | ||
|
|
53cd775a71 | ||
|
|
798ae0a238 | ||
|
|
4b2dea8244 | ||
|
|
444b9539a8 | ||
|
|
ed83bbe171 | ||
|
|
136d24ae3d | ||
|
|
6ff9625fdc | ||
|
|
650027f2cc | ||
|
|
2b92cc1adf | ||
|
|
19acfe7dbd | ||
|
|
9865faa8c5 | ||
|
|
24e190ae1f | ||
|
|
17121a8058 | ||
|
|
fd88c86e40 | ||
|
|
02d38860d1 | ||
|
|
164ae4039a | ||
|
|
9fedc9fda5 | ||
|
|
a17dba1f8b | ||
|
|
12ef7ac215 | ||
|
|
04fdacc22f | ||
|
|
07093dc553 | ||
|
|
32c65efe10 | ||
|
|
4a43c143fe | ||
|
|
6e544f08ac | ||
|
|
e1aaa9ab60 | ||
|
|
4316bbcb07 | ||
|
|
08770ca627 | ||
|
|
e965d3ea49 | ||
|
|
933cb1e0c8 | ||
|
|
6d35716b2f | ||
|
|
3c03eba60c | ||
|
|
b234620bf1 | ||
|
|
e8752e28ba | ||
|
|
89fc8d490e | ||
|
|
273925c0a6 | ||
|
|
3747b82f53 | ||
|
|
35d7d5c135 | ||
|
|
e8a386a13a | ||
|
|
0feef6a75d | ||
|
|
2ab626ada9 | ||
|
|
d02781caaa | ||
|
|
7875ca7e6f | ||
|
|
278c0619c4 | ||
|
|
7ae78815d3 | ||
|
|
9eee42a26e | ||
|
|
99f4c5d093 | ||
|
|
55da02c808 | ||
|
|
21f7411dd4 | ||
|
|
74b12329c7 | ||
|
|
6fec213c33 | ||
|
|
75a6776898 | ||
|
|
d231ec2444 | ||
|
|
be08057704 | ||
|
|
3da0c9da94 | ||
|
|
52c156ab83 | ||
|
|
f1a0785022 | ||
|
|
a8973a2c2b | ||
|
|
698fa6f47f | ||
|
|
c30179a1eb | ||
|
|
2fc051d915 | ||
|
|
a4c84d9bcd | ||
|
|
d9e9a6d31a | ||
|
|
110b370003 | ||
|
|
790b9eb15c | ||
|
|
09094cef9d | ||
|
|
105de208e5 | ||
|
|
bccfde9fc0 | ||
|
|
fdb6582eb2 | ||
|
|
11c7a61a81 | ||
|
|
983d7f1ed1 | ||
|
|
b0e031d92c | ||
|
|
9903cea9b6 | ||
|
|
8a2a5bc8bd | ||
|
|
4d25f05de8 | ||
|
|
1c30ae6724 | ||
|
|
019371de49 | ||
|
|
e2aef199e6 | ||
|
|
e220450477 | ||
|
|
daa4887325 | ||
|
|
711affd42d | ||
|
|
bae943a165 | ||
|
|
e9f75a0c4b | ||
|
|
9821335ecf | ||
|
|
edd6becb78 | ||
|
|
4dba4d1c04 | ||
|
|
49749da17c | ||
|
|
fcdce472df | ||
|
|
5786dcc16a | ||
|
|
fd402a97d5 | ||
|
|
792cb5ce11 | ||
|
|
d3f2b02b30 | ||
|
|
4a42674d6b | ||
|
|
7de0f637fd | ||
|
|
8e257f3e08 | ||
|
|
0a772198fb | ||
|
|
1f8545f739 | ||
|
|
52acb0d003 | ||
|
|
b721017a17 | ||
|
|
c6794d2257 | ||
|
|
d2613cb17f | ||
|
|
145a60685e | ||
|
|
72dc59123a | ||
|
|
204d7df921 | ||
|
|
827e722d4c | ||
|
|
77730dd2e1 | ||
|
|
021ba2c68b | ||
|
|
65165200d7 | ||
|
|
bb1f3268de | ||
|
|
24c61a50a7 | ||
|
|
d382e3e17e | ||
|
|
e03e869f76 | ||
|
|
72cc3c79e6 | ||
|
|
fce7f2c1af | ||
|
|
286d7d8298 | ||
|
|
093fda8f74 | ||
|
|
9ba02fe567 | ||
|
|
20ced6738b | ||
|
|
3af036f93e | ||
|
|
e6140aaaee | ||
|
|
8765be4e42 | ||
|
|
c3b0377e3c | ||
|
|
8ab490b95b | ||
|
|
67d8a37d1e | ||
|
|
8351a26a74 | ||
|
|
a9c5ba9d67 | ||
|
|
a1e85d2f80 | ||
|
|
551382a841 | ||
|
|
bc51ed7c2c | ||
|
|
416a4b7626 | ||
|
|
06c9f19ce3 | ||
|
|
32c6559648 | ||
|
|
2c25c4be3a | ||
|
|
c88310b658 | ||
|
|
92a2ae5006 | ||
|
|
3bd839acbb | ||
|
|
43136d9447 | ||
|
|
bbab19f5aa | ||
|
|
8276f460e7 | ||
|
|
d31111478d | ||
|
|
20c3b83c23 | ||
|
|
c17defd727 | ||
|
|
68d854f0a5 | ||
|
|
b2d1e45ba6 | ||
|
|
7c487064b7 | ||
|
|
3b8566df93 | ||
|
|
a04a70e1a0 | ||
|
|
7cad9fd207 | ||
|
|
6a93bb2e9b | ||
|
|
e1c10171ba | ||
|
|
7ef395a1f5 | ||
|
|
3da6e37b20 | ||
|
|
8e9bbf41e1 | ||
|
|
7350c630fe | ||
|
|
f5c5e7d179 | ||
|
|
dfbcf412ed | ||
|
|
8c23123ae8 | ||
|
|
2c8d6e4224 | ||
|
|
cc203ee566 | ||
|
|
c3248915e0 | ||
|
|
0c282b365a | ||
|
|
3a628efa78 | ||
|
|
64ec0cbb07 | ||
|
|
930e011bf0 | ||
|
|
eb2c405e99 | ||
|
|
bf3c873b43 | ||
|
|
f63db5b94c | ||
|
|
642314271c | ||
|
|
7d52794933 | ||
|
|
104e66db28 | ||
|
|
771552cd42 | ||
|
|
50069b6fe8 | ||
|
|
3b6d3a04fb | ||
|
|
1df610968a | ||
|
|
79e10c7b54 | ||
|
|
da8c059017 | ||
|
|
bbb8e20b57 | ||
|
|
5c7ece4e9b | ||
|
|
bdab2f82cd | ||
|
|
e149bc0fdc | ||
|
|
a16099aaae | ||
|
|
ce822f8ed0 | ||
|
|
119796b0e7 | ||
|
|
0922b468a2 | ||
|
|
6cfc20cd93 | ||
|
|
e4b1d47c07 | ||
|
|
47181c1e03 | ||
|
|
d095932007 | ||
|
|
bcf4868847 | ||
|
|
76743a4811 | ||
|
|
973a8b76c1 | ||
|
|
3afcf3c0e9 | ||
|
|
f04f4f8fb9 | ||
|
|
429bd8f5b2 | ||
|
|
98cf6a1be4 | ||
|
|
62207e6ad5 | ||
|
|
a013e33e2c | ||
|
|
d10a20ec1d | ||
|
|
6f97eb6bbc | ||
|
|
9a6406c341 | ||
|
|
54e958b570 | ||
|
|
a93bfcd8c3 | ||
|
|
f3f923de22 | ||
|
|
48e39db016 | ||
|
|
6d44ce555c | ||
|
|
fb37d49e46 | ||
|
|
dceef7f32a | ||
|
|
175a6ca029 | ||
|
|
72b466f62b | ||
|
|
e69f88e5fa | ||
|
|
a766261e87 | ||
|
|
86bf521aa4 | ||
|
|
57d0ec878b | ||
|
|
4ed2d60ba4 | ||
|
|
5d044a774b | ||
|
|
97559595d8 | ||
|
|
2f25396c94 | ||
|
|
96847444fa | ||
|
|
bf7ba31aab | ||
|
|
2738adb450 | ||
|
|
4516f0fba3 | ||
|
|
923a6fb2c0 | ||
|
|
096aab7d59 | ||
|
|
c680cb4966 | ||
|
|
f84e86e621 | ||
|
|
0a2d28a74d | ||
|
|
a445327f78 | ||
|
|
0886f361db | ||
|
|
93e31a509f | ||
|
|
9cae7e8936 | ||
|
|
7a6d690a0d | ||
|
|
1e264b53b3 | ||
|
|
163005d9c4 | ||
|
|
fe87a6e56c | ||
|
|
8c8ca73af0 | ||
|
|
15cae61ee2 | ||
|
|
f717880b8c | ||
|
|
8b10e201f5 | ||
|
|
a2a5836804 | ||
|
|
2720d84ff5 | ||
|
|
4ad2d71bca | ||
|
|
6d2428c97e | ||
|
|
bfe7a6a0a1 | ||
|
|
dce0a22b23 | ||
|
|
ba62223ce2 | ||
|
|
a1d2868343 | ||
|
|
d13f72d851 | ||
|
|
bba3c330a9 | ||
|
|
7f8f02e3af | ||
|
|
4cdb306443 | ||
|
|
be59a18099 | ||
|
|
c3ea692d60 | ||
|
|
5a8094fb2b | ||
|
|
ba921c648f | ||
|
|
ca1fe40048 | ||
|
|
50c6bc5755 | ||
|
|
6303749876 | ||
|
|
53930a1a61 | ||
|
|
59a4ac48ae | ||
|
|
7a19f7d774 | ||
|
|
02259e8873 | ||
|
|
e72399f43d | ||
|
|
def31a9b44 | ||
|
|
148806a326 | ||
|
|
0853c367bc | ||
|
|
1c6c6e90de | ||
|
|
e3fee8659c | ||
|
|
e41ffb0979 | ||
|
|
34b16a98a8 | ||
|
|
529ec51bda |
@@ -1 +1 @@
|
||||
root: ./docs/
|
||||
root: ./docs/plugins/
|
||||
|
||||
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 one of these channels: https://forum.ionicframework.com/ or https://ionicworldwide.herokuapp.com/
|
||||
- [ ] 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. -->
|
||||
|
||||
11
.github/dependabot.yml
vendored
11
.github/dependabot.yml
vendored
@@ -1,11 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: 'github-actions'
|
||||
directory: '/'
|
||||
schedule:
|
||||
interval: 'daily'
|
||||
|
||||
- package-ecosystem: 'npm'
|
||||
directory: '/'
|
||||
schedule:
|
||||
interval: 'daily'
|
||||
8
.github/workflows/nodejs.yml
vendored
8
.github/workflows/nodejs.yml
vendored
@@ -8,12 +8,12 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x]
|
||||
node-version: [16.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.4
|
||||
- uses: actions/checkout@v3.2.0
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2.4.1
|
||||
uses: actions/setup-node@v3.5.1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
run: npm ci
|
||||
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
run: npm run lint -- --quiet
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
12
.github/workflows/npmpublish.yml
vendored
12
.github/workflows/npmpublish.yml
vendored
@@ -9,10 +9,10 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.4
|
||||
- uses: actions/setup-node@v2.4.1
|
||||
- uses: actions/checkout@v3.2.0
|
||||
- uses: actions/setup-node@v3.5.1
|
||||
with:
|
||||
node-version: 14
|
||||
node-version: 16
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Build
|
||||
@@ -24,10 +24,10 @@ jobs:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.4
|
||||
- uses: actions/setup-node@v2.4.1
|
||||
- uses: actions/checkout@v3.2.0
|
||||
- uses: actions/setup-node@v3.5.1
|
||||
with:
|
||||
node-version: 14
|
||||
node-version: 16
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- run: npm ci
|
||||
- run: npm run shipit
|
||||
|
||||
2
.github/workflows/stale.yml
vendored
2
.github/workflows/stale.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v4
|
||||
- uses: actions/stale@v7
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: 'There has been no recent activity and this issue has been marked inactive.'
|
||||
|
||||
257
CHANGELOG.md
257
CHANGELOG.md
@@ -1,3 +1,260 @@
|
||||
# [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)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **launch-navigator:** use currect handlers ([#4385](https://github.com/danielsogl/awesome-cordova-plugins/issues/4385)) ([62f664e](https://github.com/danielsogl/awesome-cordova-plugins/commit/62f664e61a31f7b8be395cd6ce575604c5b5e88c))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **diagnostic:** addisCameraRollAuthorized and getCameraRollAuthorizationStatus functions (WIP) ([#4362](https://github.com/danielsogl/awesome-cordova-plugins/issues/4362)) ([cd81cfa](https://github.com/danielsogl/awesome-cordova-plugins/commit/cd81cfabf4a3027d65597a3b7079da5998988891))
|
||||
* **webim:** update plugin wrapper ([#4370](https://github.com/danielsogl/awesome-cordova-plugins/issues/4370)) ([81a8b42](https://github.com/danielsogl/awesome-cordova-plugins/commit/81a8b42a29f8b83fdcae8f6bcdf5179d009ad72d))
|
||||
|
||||
|
||||
|
||||
## [6.0.1](https://github.com/danielsogl/awesome-cordova-plugins/compare/v6.0.0...v6.0.1) (2022-10-17)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* use correct core version ([e7d1641](https://github.com/danielsogl/awesome-cordova-plugins/commit/e7d1641fe9b3cc18bbfab0fb7f23d8b3a4136e9b))
|
||||
|
||||
|
||||
|
||||
# [6.0.0](https://github.com/danielsogl/awesome-cordova-plugins/compare/v5.46.0...v6.0.0) (2022-10-15)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **core:** use angular ivy ([#4369](https://github.com/danielsogl/awesome-cordova-plugins/issues/4369)) ([85441e5](https://github.com/danielsogl/awesome-cordova-plugins/commit/85441e59cac2ac9f40b9da55647ec89c9bafb2ea))
|
||||
|
||||
|
||||
|
||||
# [5.46.0](https://github.com/danielsogl/awesome-cordova-plugins/compare/v5.45.0...v5.46.0) (2022-10-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **sms-retriever:** update startWatching result type ([#4309](https://github.com/danielsogl/awesome-cordova-plugins/issues/4309)) ([178489f](https://github.com/danielsogl/awesome-cordova-plugins/commit/178489ffaae6ad256ca1536bc79e63354c72516f))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **adjust:** update wrapper for Adjust Cordova SDK v4.32.0 ([#4327](https://github.com/danielsogl/awesome-cordova-plugins/issues/4327)) ([a7a1091](https://github.com/danielsogl/awesome-cordova-plugins/commit/a7a10913fcfc218dddd1b55b24aa797b47e3bf73))
|
||||
* **app-review:** add plugin ([#4348](https://github.com/danielsogl/awesome-cordova-plugins/issues/4348)) ([b0780a8](https://github.com/danielsogl/awesome-cordova-plugins/commit/b0780a8bec1f061489966ab29ebd44736eb3536e))
|
||||
* **applovin:** add plugin ([#4307](https://github.com/danielsogl/awesome-cordova-plugins/issues/4307)) ([bf860c3](https://github.com/danielsogl/awesome-cordova-plugins/commit/bf860c30c216e05bc516c179979210c1645570a9))
|
||||
* **bluetooth-le:** upgrade to v6.7.0 ([#4320](https://github.com/danielsogl/awesome-cordova-plugins/issues/4320)) ([98dc7c4](https://github.com/danielsogl/awesome-cordova-plugins/commit/98dc7c4be0c3a63775a63926e5958bcde79e7d5c))
|
||||
* **device:** add sdkVersion ([#4354](https://github.com/danielsogl/awesome-cordova-plugins/issues/4354)) ([acb39e5](https://github.com/danielsogl/awesome-cordova-plugins/commit/acb39e5849f368e2d2ac75baa5d341b189206e27))
|
||||
* **diagnostic:** extend parameter for requestLocationAuthorization ([#4350](https://github.com/danielsogl/awesome-cordova-plugins/issues/4350)) ([b572a10](https://github.com/danielsogl/awesome-cordova-plugins/commit/b572a10a6e1e4063fdd19a04acc09d049b973d67))
|
||||
* **firebase-x:** add MessagePayloadAps prop ([#4344](https://github.com/danielsogl/awesome-cordova-plugins/issues/4344)) ([dc1ee8c](https://github.com/danielsogl/awesome-cordova-plugins/commit/dc1ee8c5306196562a0013924014a0d7adfa5059))
|
||||
* **GCDWebServer:** add plugin ([#4302](https://github.com/danielsogl/awesome-cordova-plugins/issues/4302)) ([f8c6430](https://github.com/danielsogl/awesome-cordova-plugins/commit/f8c6430a26f5b489255c4f36629f245ed23bb280))
|
||||
* **webim:** add plugin ([#4355](https://github.com/danielsogl/awesome-cordova-plugins/issues/4355)) ([7430284](https://github.com/danielsogl/awesome-cordova-plugins/commit/74302846dc387423d51da79be82f7e0fee4a45bf))
|
||||
|
||||
|
||||
|
||||
# [5.45.0](https://github.com/danielsogl/awesome-cordova-plugins/compare/v5.44.0...v5.45.0) (2022-09-05)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **adjust:** update wrapper for Adjust Cordova SDK v4.30.0 ([#4277](https://github.com/danielsogl/awesome-cordova-plugins/issues/4277)) ([82377f0](https://github.com/danielsogl/awesome-cordova-plugins/commit/82377f06330e8618e50a57004c9a79cafa66d972))
|
||||
* **android-permissions:** add android 13 permissions ([#4295](https://github.com/danielsogl/awesome-cordova-plugins/issues/4295)) ([ba9c1c1](https://github.com/danielsogl/awesome-cordova-plugins/commit/ba9c1c154e76900f9570a7f3acc7728fd32a89a2))
|
||||
* **dynamsoft-barcode:** add setFocus and setZoom ([#4281](https://github.com/danielsogl/awesome-cordova-plugins/issues/4281)) ([a801c7d](https://github.com/danielsogl/awesome-cordova-plugins/commit/a801c7d3054d285c962b4657f4b224c9a9ad67cf))
|
||||
* **firebase-x:** add message typing ([#4282](https://github.com/danielsogl/awesome-cordova-plugins/issues/4282)) ([898e0b8](https://github.com/danielsogl/awesome-cordova-plugins/commit/898e0b8588f479aea228746c2b3e177c6066f757))
|
||||
* **in-app-purchase-2:** update validator for custom headers ([#4262](https://github.com/danielsogl/awesome-cordova-plugins/issues/4262)) ([8b826e3](https://github.com/danielsogl/awesome-cordova-plugins/commit/8b826e3c1b2b53e0d188e90d22f34948b2362cd4))
|
||||
* **intercom:** add displaySurvey ([#4292](https://github.com/danielsogl/awesome-cordova-plugins/issues/4292)) ([ebdd6e9](https://github.com/danielsogl/awesome-cordova-plugins/commit/ebdd6e97964d6c1e862f0160180d6e056f91de88))
|
||||
* **lets-cooee:** add event observer and installation documentation ([#4278](https://github.com/danielsogl/awesome-cordova-plugins/issues/4278)) ([aef160e](https://github.com/danielsogl/awesome-cordova-plugins/commit/aef160e4180d28598a8ef25c75cd8057dd59f81f))
|
||||
* **unvired-cordova-sdk:** Add new function to regenrate the JWT Token ([#4291](https://github.com/danielsogl/awesome-cordova-plugins/issues/4291)) ([678fb71](https://github.com/danielsogl/awesome-cordova-plugins/commit/678fb71a7f4cf1ad34c2746fdaa3690a13df4fe4))
|
||||
|
||||
|
||||
|
||||
# [5.44.0](https://github.com/danielsogl/awesome-cordova-plugins/compare/v5.43.0...v5.44.0) (2022-06-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **diagnostic:** adjust options declaration ([#4227](https://github.com/danielsogl/awesome-cordova-plugins/issues/4227)) ([19fc222](https://github.com/danielsogl/awesome-cordova-plugins/commit/19fc222ea93c79c53156aa0a05b3dc0bffa77a7e))
|
||||
* **urbanairship:** fix cordova and method wrapper options ([#4221](https://github.com/danielsogl/awesome-cordova-plugins/issues/4221)) ([0442260](https://github.com/danielsogl/awesome-cordova-plugins/commit/04422600ca9675ff1f5ff763e3aba03b7abb8455))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **cooee:** add plugin ([#4228](https://github.com/danielsogl/awesome-cordova-plugins/issues/4228)) ([7a528b4](https://github.com/danielsogl/awesome-cordova-plugins/commit/7a528b42d9427222d01b8e0da675045996be042d))
|
||||
* **dynamsoft-barcode:** update startScanning options ([#4205](https://github.com/danielsogl/awesome-cordova-plugins/issues/4205)) ([4e183b1](https://github.com/danielsogl/awesome-cordova-plugins/commit/4e183b18818864b23501fa4bccd2813ca4149e5a))
|
||||
* **file-md5:** add plugin ([#4201](https://github.com/danielsogl/awesome-cordova-plugins/issues/4201)) ([63c8365](https://github.com/danielsogl/awesome-cordova-plugins/commit/63c83653c0d0942d9cac2185bd8b9f38a5b4980c))
|
||||
* **mobile-messaging:** add chat methods ([#4231](https://github.com/danielsogl/awesome-cordova-plugins/issues/4231)) ([f96b758](https://github.com/danielsogl/awesome-cordova-plugins/commit/f96b7588dece0ed1119d7166168486315f9fc714))
|
||||
* **zip:** add plugin ([#4238](https://github.com/danielsogl/awesome-cordova-plugins/issues/4238)) ([0a31a37](https://github.com/danielsogl/awesome-cordova-plugins/commit/0a31a374b1a73403785a1e6c9104381ee9761940))
|
||||
|
||||
|
||||
|
||||
# [5.43.0](https://github.com/danielsogl/awesome-cordova-plugins/compare/v5.42.0...v5.43.0) (2022-05-25)
|
||||
|
||||
|
||||
|
||||
# [5.42.0](https://github.com/danielsogl/awesome-cordova-plugins/compare/v5.41.0...v5.42.0) (2022-05-21)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** update dependency tslib to v2.4.0 ([#4154](https://github.com/danielsogl/awesome-cordova-plugins/issues/4154)) ([bae0a8d](https://github.com/danielsogl/awesome-cordova-plugins/commit/bae0a8dbc85fb751470365080b1a35689d9d6be4))
|
||||
* **keychain:** mark useTouchID as required ([#4182](https://github.com/danielsogl/awesome-cordova-plugins/issues/4182)) ([6b2c1fd](https://github.com/danielsogl/awesome-cordova-plugins/commit/6b2c1fd32e068a25dccd0f9fda5357fdc9eb7c26))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **dynamsoft barcode scanner:** update plugin ([#4176](https://github.com/danielsogl/awesome-cordova-plugins/issues/4176)) ([7e2452b](https://github.com/danielsogl/awesome-cordova-plugins/commit/7e2452b6ad0526247dcb310d37f819026c90451c))
|
||||
* **hyper-track:** add new functions ([#4128](https://github.com/danielsogl/awesome-cordova-plugins/issues/4128)) ([26a8cbe](https://github.com/danielsogl/awesome-cordova-plugins/commit/26a8cbe437f63e8dd80b9fac643ee68070b9a1cf))
|
||||
* **in-app-purchase-2:** add launchPriceChangeConfirmationFlow ([#4127](https://github.com/danielsogl/awesome-cordova-plugins/issues/4127)) ([c2b01e0](https://github.com/danielsogl/awesome-cordova-plugins/commit/c2b01e051086d87747597ac3554feaa8772a71d1))
|
||||
|
||||
|
||||
### Reverts
|
||||
|
||||
* Revert "chore(deps): update dependency jest to v28 (#4159)" (#4163) ([710cf7a](https://github.com/danielsogl/awesome-cordova-plugins/commit/710cf7acc0d12c981adb9b00db96945e4348c643)), closes [#4159](https://github.com/danielsogl/awesome-cordova-plugins/issues/4159) [#4163](https://github.com/danielsogl/awesome-cordova-plugins/issues/4163)
|
||||
|
||||
|
||||
|
||||
# [5.41.0](https://github.com/danielsogl/awesome-cordova-plugins/compare/v5.40.0...v5.41.0) (2022-04-02)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **http:** add set client auth mode method ([#4100](https://github.com/danielsogl/awesome-cordova-plugins/issues/4100)) ([04fdacc](https://github.com/danielsogl/awesome-cordova-plugins/commit/04fdacc22feba4eedf14c76b0a9c408ec1ee1bdf))
|
||||
* **star-prnt:** allow null port for print methods and openCashDrawer ([#4095](https://github.com/danielsogl/awesome-cordova-plugins/issues/4095)) ([a17dba1](https://github.com/danielsogl/awesome-cordova-plugins/commit/a17dba1f8b6570d76d5c8a30f437edb2dca9abea))
|
||||
* **urbanairship:** new functions for version cordova-urbanairship 14.0 ([#4097](https://github.com/danielsogl/awesome-cordova-plugins/issues/4097)) ([12ef7ac](https://github.com/danielsogl/awesome-cordova-plugins/commit/12ef7ac215f1f9cf718a004fae9e7f4d01f597b8))
|
||||
|
||||
|
||||
|
||||
# [5.40.0](https://github.com/danielsogl/awesome-cordova-plugins/compare/v5.39.1...v5.40.0) (2022-03-05)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **browser-tab:** add plugin ([#4046](https://github.com/danielsogl/awesome-cordova-plugins/issues/4046)) ([daa4887](https://github.com/danielsogl/awesome-cordova-plugins/commit/daa48873255d0fc31608cc8515e08386c01db6dd))
|
||||
* **urbanairship:** Add attributes editing and fix tag editing ([#4058](https://github.com/danielsogl/awesome-cordova-plugins/issues/4058)) ([d9e9a6d](https://github.com/danielsogl/awesome-cordova-plugins/commit/d9e9a6d31aed0308bc3cb0bf07ee7e1682e2f66f))
|
||||
|
||||
|
||||
|
||||
## [5.39.1](https://github.com/danielsogl/awesome-cordova-plugins/compare/v5.39.0...v5.39.1) (2022-02-12)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **background-upload:** use correct plugin source ([#4028](https://github.com/danielsogl/awesome-cordova-plugins/issues/4028)) ([8e257f3](https://github.com/danielsogl/awesome-cordova-plugins/commit/8e257f3e08528954a69581eef98871d1fb146441))
|
||||
|
||||
|
||||
|
||||
# [5.39.0](https://github.com/danielsogl/awesome-cordova-plugins/compare/v5.38.0...v5.39.0) (2022-02-01)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **firebase-x:** change incrementCounter signature ([#4010](https://github.com/danielsogl/awesome-cordova-plugins/issues/4010)) ([bb1f326](https://github.com/danielsogl/awesome-cordova-plugins/commit/bb1f3268dede9633f5736cedfa5f4ccc15f89aa9))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **clevertap:** support new clevertap changes ([#4011](https://github.com/danielsogl/awesome-cordova-plugins/issues/4011)) ([24c61a5](https://github.com/danielsogl/awesome-cordova-plugins/commit/24c61a50a76cc174245624ea71f21bf0f556a317)), closes [#3491](https://github.com/danielsogl/awesome-cordova-plugins/issues/3491)
|
||||
|
||||
|
||||
|
||||
# [5.38.0](https://github.com/danielsogl/awesome-cordova-plugins/compare/v5.37.3...v5.38.0) (2022-01-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **social-sharing:** change shareWithOptions parameter typing ([#3996](https://github.com/danielsogl/awesome-cordova-plugins/issues/3996)) ([a1e85d2](https://github.com/danielsogl/awesome-cordova-plugins/commit/a1e85d2f80a18a4b2da93abdd85ebd5ab04f1b16))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **camera-preview:** add storeToFile param ([#3958](https://github.com/danielsogl/awesome-cordova-plugins/issues/3958)) ([6a93bb2](https://github.com/danielsogl/awesome-cordova-plugins/commit/6a93bb2e9b450d89112768e78c5cf888b85fcffa))
|
||||
* **chooser-simple-file:** add plugin ([#3982](https://github.com/danielsogl/awesome-cordova-plugins/issues/3982)) ([67d8a37](https://github.com/danielsogl/awesome-cordova-plugins/commit/67d8a37d1e1d526da8beab8ac8e05b09312f30e4))
|
||||
* **magnetometer:** add magnetometer wrapper ([#3887](https://github.com/danielsogl/awesome-cordova-plugins/issues/3887)) ([3b8566d](https://github.com/danielsogl/awesome-cordova-plugins/commit/3b8566df939773a4b9a1604a4af3a60e24cf9aed))
|
||||
* **market:** add plugin ([e6140aa](https://github.com/danielsogl/awesome-cordova-plugins/commit/e6140aaaeef735731a292aabb3972624754f10c3))
|
||||
* **sumup:** add test and setup function ([#3950](https://github.com/danielsogl/awesome-cordova-plugins/issues/3950)) ([7350c63](https://github.com/danielsogl/awesome-cordova-plugins/commit/7350c630fea4db8c31a07f46b4464bab2f1b55e4))
|
||||
* **tealium:** update wrapper ([#3883](https://github.com/danielsogl/awesome-cordova-plugins/issues/3883)) ([771552c](https://github.com/danielsogl/awesome-cordova-plugins/commit/771552cd4286b755b5bd7a8bddb755bb3c3d5d0c))
|
||||
|
||||
|
||||
|
||||
## [5.37.3](https://github.com/danielsogl/awesome-cordova-plugins/compare/v5.37.2...v5.37.3) (2021-12-19)
|
||||
|
||||
|
||||
|
||||
## [5.37.2](https://github.com/danielsogl/awesome-cordova-plugins/compare/v5.37.1...v5.37.2) (2021-12-16)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **adjust:** added missing AdjustConfig method ([#3886](https://github.com/danielsogl/awesome-cordova-plugins/issues/3886)) ([a013e33](https://github.com/danielsogl/awesome-cordova-plugins/commit/a013e33e2c672c0faef75bef7bf1c28a8a62bb8e))
|
||||
|
||||
|
||||
|
||||
## [5.37.1](https://github.com/danielsogl/awesome-cordova-plugins/compare/v5.37.0...v5.37.1) (2021-11-24)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **purchases:** add `setAirshipChannelID` method ([#3856](https://github.com/danielsogl/awesome-cordova-plugins/issues/3856)) ([2f25396](https://github.com/danielsogl/awesome-cordova-plugins/commit/2f25396c944a86b92de86cdf2e841ee7179bef19))
|
||||
|
||||
|
||||
|
||||
# [5.37.0](https://github.com/danielsogl/awesome-cordova-plugins/compare/v5.36.1...v5.37.0) (2021-10-16)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **adjust:** update wrapper for Adjust Cordova SDK v4.29.1 ([#3801](https://github.com/danielsogl/awesome-cordova-plugins/issues/3801)) ([02259e8](https://github.com/danielsogl/awesome-cordova-plugins/commit/02259e8873941e7171f317835666e8193ffc1b6a))
|
||||
* **unvired-cordova-sdk:** Add a new function to register and receive push notifications. ([#3802](https://github.com/danielsogl/awesome-cordova-plugins/issues/3802)) ([7a19f7d](https://github.com/danielsogl/awesome-cordova-plugins/commit/7a19f7d7747857cab3feb62d524f66e34cad022d))
|
||||
|
||||
|
||||
|
||||
## [5.36.1](https://github.com/danielsogl/awesome-cordova-plugins/compare/v5.36.0...v5.36.1) (2021-10-01)
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
# Initial page
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
* [LocalBackup](plugins/local-backup.md)
|
||||
* [Native Geocoder](plugins/native-geocoder.md)
|
||||
* [Coordinates](plugins/hyper-track.md)
|
||||
* [HTTP](plugins/approov-advanced-http.md)
|
||||
* [ApproovHTTP](plugins/approov-advanced-http.md)
|
||||
* [Answers](plugins/fabric.md)
|
||||
* [UriHelper](plugins/nfc.md)
|
||||
* [Dialogs](plugins/dialogs.md)
|
||||
@@ -214,4 +214,9 @@
|
||||
* [Android Notch](plugins/android-notch.md)
|
||||
* [Network Interface](plugins/network-interface.md)
|
||||
* [Printer](plugins/printer.md)
|
||||
* [Browser Tab](plugins/browser-tab.md)
|
||||
* [Dynamsoft Barcode Scanner](plugins/dynamsoft-barcode-scanner.md)
|
||||
* [GCDWebServer](plugins/gcdwebserver.md)
|
||||
* [Installation](installation.md)
|
||||
* [FAQ](faq.md)
|
||||
|
||||
|
||||
87
docs/faq.md
Normal file
87
docs/faq.md
Normal file
@@ -0,0 +1,87 @@
|
||||
# FAQ
|
||||
|
||||
### [Cordova Management Tips](https://ionicframework.com/docs/native/community#cordova-management-tips) <a id="cordova-management-tips"></a>
|
||||
|
||||
**1\) Use the** [**Ionic CLI**](https://ionicframework.com/docs/cli) **to add/update/delete plugins.**
|
||||
|
||||
Instead of directly editing `config.xml` and `package.json`. Use `ionic` in front of Cordova commands for a better experience and additional functionality \(`ionic cordova build ios` instead of `cordova build ios`\).
|
||||
|
||||
**2\) Upgrade plugins by removing, then re-adding them.**
|
||||
|
||||
```text
|
||||
$ ionic cordova plugin remove cordova-plugin-camera
|
||||
$ ionic cordova plugin add cordova-plugin-camera
|
||||
```
|
||||
|
||||
**3\) Install explicit versions.**
|
||||
|
||||
To ensure that the same version of a plugin is always installed via `npm install`, specify the version number:
|
||||
|
||||
```text
|
||||
$ ionic cordova plugin add cordova-plugin-camera@4.3.2
|
||||
```
|
||||
|
||||
**4\) Restore Cordova in an existing Ionic project**
|
||||
|
||||
Useful when adding new developers to a project. `ionic cordova prepare` restores platforms and plugins from `package.json` and `config.xml`. The version to be installed is taken from `package.json` or `config.xml`, if found in those files. In case of conflicts, `package.json` is given precedence over `config.xml`.
|
||||
|
||||
**5\) Troubleshoot Cordova issues with Ionic CLI commands**
|
||||
|
||||
* `ionic doctor list`: Detects [common issues](https://ionicframework.com/docs/cli/commands/doctor-list) and suggests steps to fix them
|
||||
* `ionic repair`: Remove, then [regenerate](https://ionicframework.com/docs/cli/commands/repair) all dependencies
|
||||
|
||||
### [Understanding Version Numbers](https://ionicframework.com/docs/native/community#understanding-version-numbers) <a id="understanding-version-numbers"></a>
|
||||
|
||||
For any given Ionic Native plugin, the Ionic Native \(TypeScript code\) and Cordova \(native code\) version numbers will not match. The Ionic Native version number is found in `package.json`:
|
||||
|
||||
```text
|
||||
"@ionic-native/camera": "^5.3.0",
|
||||
```
|
||||
|
||||
CopyCopied
|
||||
|
||||
The Cordova plugin version number is found in both `package.json` and `config.xml`:
|
||||
|
||||
```text
|
||||
"cordova-plugin-camera": "4.0.3",
|
||||
```
|
||||
|
||||
CopyCopied
|
||||
|
||||
```text
|
||||
<plugin name="cordova-plugin-camera" spec="4.0.3" />
|
||||
```
|
||||
|
||||
CopyCopied
|
||||
|
||||
When checking for new native functionality or bug fixes, look for new versions on the Cordova plugin GitHub page itself \(here's the [Camera one](https://github.com/apache/cordova-plugin-camera), for example\).
|
||||
|
||||
To check for new Ionic Native releases \(may include exposing methods recently added by the Cordova plugin, etc.\), see [here](https://github.com/ionic-team/ionic-native/releases).
|
||||
|
||||
### [Troubleshooting Failed Builds](https://ionicframework.com/docs/native/community#troubleshooting-failed-builds) <a id="troubleshooting-failed-builds"></a>
|
||||
|
||||
Research the build error\(s\) by checking out these resources:
|
||||
|
||||
* Google & [StackOverflow](https://stackoverflow.com/): Many issues are documented online
|
||||
* Ask the [Ionic Community Ionic Forum](https://forum.ionicframework.com/) \(see the Ionic Native category\)
|
||||
* See the Ionic Customer Success [Knowledge Base](https://ionic.zendesk.com/)
|
||||
|
||||
#### [Cordova Plugin Conflicts](https://ionicframework.com/docs/native/community#cordova-plugin-conflicts) <a id="cordova-plugin-conflicts"></a>
|
||||
|
||||
Plugins can conflict with each other when they share the same underlying native dependencies or when more than one plugin tries to access the same native code at once. For example, common libraries like the Google Play Services version \(Google Maps is using GPS v24.2 but Firebase wants GPS v27.1\). Keeping these plugins updated regularly can help with this.
|
||||
|
||||
Another tip is to ensure that your app uses only one plugin per specific feature/functionality \(example: Push Notifications\).
|
||||
|
||||
### [Recommended Upgrade Strategy](https://ionicframework.com/docs/native/community#recommended-upgrade-strategy) <a id="recommended-upgrade-strategy"></a>
|
||||
|
||||
The most Ionic stable apps are routinely updated, especially at the native layer. Keeping native plugins up to date ensures your project has the latest security fixes, new features, and improved performance.
|
||||
|
||||
Update your project's plugins one at a time, ideally in separate code branches. This reduces the surface area that issues can arise from - if you update everything in your project at once, it's sometimes hard to tell where the problem stems from.
|
||||
|
||||
#### [When should I update?](https://ionicframework.com/docs/native/community#when-should-i-update-) <a id="when-should-i-update-"></a>
|
||||
|
||||
* When a new feature/bug is released: Run `npm outdated` to see a list of available updates.
|
||||
* When new major versions are released: Official blogs, such as the [Cordova blog](https://cordova.apache.org/blog/)and [Ionic blog](https://ionicframework.com/blog/), will publish announcements and news.
|
||||
* Evaluate the nature of the update: is it a shiny new feature or critical security fix?
|
||||
* Timing: Where does it fit in against your team's project goals?
|
||||
|
||||
144
docs/installation.md
Normal file
144
docs/installation.md
Normal file
@@ -0,0 +1,144 @@
|
||||
# Installation
|
||||
|
||||
[Apache Cordova](https://cordova.apache.org/) is an open source native runtime that allows developers to build native mobile apps with HTML, CSS, and JavaScript. Similar to [Capacitor](https://capacitorjs.com/), Ionic’s own native runtime, Cordova allows developers to access native device features, such as camera, keyboard, and geolocation, using a system of plugins. A plugin is a small amount of add-on code that provides JavaScript interface to native components. They allow your app to use native device capabilities beyond what is available to pure web apps.
|
||||
|
||||
For developers using Ionic with Cordova, our team has developed a collection of TypeScript wrappers for open source Cordova plugins that make it easy to add native functionality to any Ionic app. See [Ionic Native](https://github.com/ionic-team/ionic-native).
|
||||
|
||||
These plugins are submitted and maintained by the Ionic community. While community members are generally quick to find and fix issues, certain plugins may not function properly.
|
||||
|
||||
For professional developers and teams that require dedicated native plugin support & SLAs, ongoing maintenance, and security patches, please explore our [premium options](https://ionicframework.com/native), including plugin support and pre-built solutions for common native use cases.
|
||||
|
||||
> These docs are for apps built with Ionic Framework 4.0.0 and greater. For older Ionic v3 projects, please [see here](https://ionicframework.com/docs/v3/native).
|
||||
|
||||
### [Capacitor Support](https://ionicframework.com/docs/native/community#capacitor-support) <a id="capacitor-support"></a>
|
||||
|
||||
In addition to Cordova, Ionic Native 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).
|
||||
|
||||
### [Usage](https://ionicframework.com/docs/native/community#usage) <a id="usage"></a>
|
||||
|
||||
All plugins have two components - the native code \(Cordova\) and the TypeScript code \(Ionic Native\). Cordova plugins are also wrapped in a `Promise` or `Observable` in order to provide a common plugin interface and modernized development approach.
|
||||
|
||||
Using the [Camera plugin](https://ionicframework.com/docs/native/camera) as an example, first install it:CORDOVACAPACITOR
|
||||
|
||||
```text
|
||||
// Install Cordova plugin
|
||||
$ ionic cordova plugin add cordova-plugin-camera
|
||||
|
||||
// Install Ionic Native TypeScript wrapper
|
||||
$ npm install @ionic-native/camera
|
||||
|
||||
// Install Ionic Native core library (once per project)
|
||||
$ npm install @ionic-native/core
|
||||
```
|
||||
|
||||
Next, begin using the plugin, following the various framework usage options below. For FAQ, see [here](https://ionicframework.com/docs/native/faq).
|
||||
|
||||
### [Angular](https://ionicframework.com/docs/native/community#angular) <a id="angular"></a>
|
||||
|
||||
Angular apps can use either Cordova or Capacitor to build native mobile apps. Import the plugin in a `@NgModule` and add it to the list of Providers. For Angular, the import path should end with `/ngx`. Angular's change detection is automatically handled.
|
||||
|
||||
```text
|
||||
// app.module.ts
|
||||
import { Camera } from '@ionic-native/camera/ngx';
|
||||
|
||||
...
|
||||
|
||||
@NgModule({
|
||||
...
|
||||
|
||||
providers: [
|
||||
...
|
||||
Camera
|
||||
...
|
||||
]
|
||||
...
|
||||
})
|
||||
export class AppModule { }
|
||||
```
|
||||
|
||||
CopyCopied
|
||||
|
||||
After the plugin has been declared, it can be imported and injected like any other service:
|
||||
|
||||
```text
|
||||
// camera.service.ts
|
||||
import { Injectable } from "@angular/core";
|
||||
import { Camera, CameraOptions } from "@ionic-native/camera/ngx";
|
||||
|
||||
@Injectable({
|
||||
providedIn: "root",
|
||||
})
|
||||
export class PhotoService {
|
||||
constructor(private camera: Camera) {}
|
||||
|
||||
takePicture() {
|
||||
const options: CameraOptions = {
|
||||
quality: 100,
|
||||
destinationType: this.camera.DestinationType.DATA_URL,
|
||||
encodingType: this.camera.EncodingType.JPEG,
|
||||
mediaType: this.camera.MediaType.PICTURE,
|
||||
};
|
||||
|
||||
this.camera.getPicture(options).then(
|
||||
(imageData) => {
|
||||
// Do something with the new photo
|
||||
},
|
||||
(err) => {
|
||||
// Handle error
|
||||
console.log("Camera issue: " + err);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
CopyCopied
|
||||
|
||||
### [React](https://ionicframework.com/docs/native/community#react) <a id="react"></a>
|
||||
|
||||
React apps must use Capacitor to build native mobile apps. However, Ionic Native \(and therefore, Cordova plugins\) can still be used.// Install Core library \(once per project\)npm install @ionic-native/core
|
||||
// Install Ionic Native TypeScript wrappernpm install @ionic-native/barcode-scanner
|
||||
// Install Cordova pluginnpm install phonegap-plugin-barcodescanner
|
||||
// Update native platform project\(s\) to include newly added pluginionic cap sync
|
||||
|
||||
Import the plugin object then use its static methods:
|
||||
|
||||
```text
|
||||
import { BarcodeScanner } from "@ionic-native/barcode-scanner";
|
||||
|
||||
const Tab1: React.FC = () => {
|
||||
const openScanner = async () => {
|
||||
const data = await BarcodeScanner.scan();
|
||||
console.log(`Barcode data: ${data.text}`);
|
||||
};
|
||||
return (
|
||||
<IonPage>
|
||||
<IonHeader>
|
||||
<IonToolbar>
|
||||
<IonTitle>Tab 1</IonTitle>
|
||||
</IonToolbar>
|
||||
</IonHeader>
|
||||
<IonContent>
|
||||
<IonButton onClick={openScanner}>Scan barcode</IonButton>
|
||||
</IonContent>
|
||||
</IonPage>
|
||||
);
|
||||
};
|
||||
```
|
||||
|
||||
CopyCopied
|
||||
|
||||
### [Vanilla JavaScript](https://ionicframework.com/docs/native/community#vanilla-javascript) <a id="vanilla-javascript"></a>
|
||||
|
||||
Vanilla JavaScript apps, targeting ES2015+ and/or TypeScript, can use either Cordova or Capacitor to build native mobile apps. To use any plugin, import the class from the appropriate package and use its static methods:
|
||||
|
||||
```text
|
||||
import { Camera } from "@ionic-native/camera";
|
||||
|
||||
document.addEventListener("deviceready", () => {
|
||||
Camera.getPicture()
|
||||
.then((data) => console.log("Took a picture!", data))
|
||||
.catch((e) => console.log("Error occurred while taking a picture", e));
|
||||
});
|
||||
```
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# AdjustAppStoreSubscription
|
||||
plugin add com.adjust.sdk
|
||||
# Adjust
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add com.adjust.sdk
|
||||
$ npm install @awesome-cordova-plugins/adjust
|
||||
```
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# RewardVideo
|
||||
# AdMob
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-admob-plus
|
||||
@@ -7,11 +7,7 @@ $ npm install @awesome-cordova-plugins/admob-plus
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/admob-plus/)
|
||||
|
||||
Plugin Repo: []()
|
||||
|
||||
|
||||
|
||||
b.com/admob-plus/admob-plus](https://github.com/admob-plus/admob-plus)
|
||||
Plugin Repo: [https://github.com/admob-plus/admob-plus](https://github.com/admob-plus/admob-plus)
|
||||
|
||||
|
||||
|
||||
|
||||
20
docs/plugins/applovin/README.md
Normal file
20
docs/plugins/applovin/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Applovin
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-applovin-max
|
||||
$ npm install @awesome-cordova-plugins/applovin
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/applovin/)
|
||||
|
||||
Plugin Repo: [https://github.com/AppLovin/AppLovin-MAX-Cordova](https://github.com/AppLovin/AppLovin-MAX-Cordova)
|
||||
|
||||
This plugin allows you to easily configure, integrate and interact with Applovin ads.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# FileTransferManager
|
||||
`
|
||||
# BackgroundUpload
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-background-upload
|
||||
$ npm install @awesome-cordova-plugins/background-upload
|
||||
```
|
||||
|
||||
17
docs/plugins/browser-tab.md
Normal file
17
docs/plugins/browser-tab.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Browser Tab
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-browsertab
|
||||
$ npm install @awesome-cordova-plugins/browser-tab
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/browser-tab/)
|
||||
|
||||
Plugin Repo: [https://github.com/google/cordova-plugin-browsertab](https://github.com/google/cordova-plugin-browsertab)
|
||||
|
||||
This plugin provides an interface to in-app browser tabs that exist on some mobile platforms, specifically [Custom Tabs](http://developer.android.com/tools/support-library/features.html#custom-tabs) on Android (including the [Chrome Custom Tabs](https://developer.chrome.com/multidevice/android/customtabs) implementation), and [SFSafariViewController](https://developer.apple.com/library/ios/documentation/SafariServices/Reference/SFSafariViewController_Ref/) on iOS.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
17
docs/plugins/browser-tab/README.md
Normal file
17
docs/plugins/browser-tab/README.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Browser Tab
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-browsertab
|
||||
$ npm install @awesome-cordova-plugins/browser-tab
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/browser-tab/)
|
||||
|
||||
Plugin Repo: [https://github.com/google/cordova-plugin-browsertab](https://github.com/google/cordova-plugin-browsertab)
|
||||
|
||||
This plugin provides an interface to in-app browser tabs that exist on some mobile platforms, specifically [Custom Tabs](http://developer.android.com/tools/support-library/features.html#custom-tabs) on Android (including the [Chrome Custom Tabs](https://developer.chrome.com/multidevice/android/customtabs) implementation), and [SFSafariViewController](https://developer.apple.com/library/ios/documentation/SafariServices/Reference/SFSafariViewController_Ref/) on iOS.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
32
docs/plugins/chooser-simple-file/README.md
Normal file
32
docs/plugins/chooser-simple-file/README.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Chooser
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-simple-file-chooser
|
||||
$ npm install @awesome-cordova-plugins/chooser-simple-file
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/chooser-simple-file/)
|
||||
|
||||
Plugin Repo: [https://github.com/hc-oss/cordova-plugin-simple-file-chooser](https://github.com/hc-oss/cordova-plugin-simple-file-chooser)
|
||||
|
||||
File chooser plugin for Cordova.
|
||||
|
||||
The following must be added to config.xml to prevent crashing when selecting large files on Android:
|
||||
```xml
|
||||
<platform name="android">
|
||||
<edit-config
|
||||
file="app/src/main/AndroidManifest.xml"
|
||||
mode="merge"
|
||||
target="/manifest/application">
|
||||
<application android:largeHeap="true" />
|
||||
</edit-config>
|
||||
</platform>
|
||||
```
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
|
||||
|
||||
|
||||
20
docs/plugins/dynamsoft-barcode-scanner.md
Executable file
20
docs/plugins/dynamsoft-barcode-scanner.md
Executable file
@@ -0,0 +1,20 @@
|
||||
# Dynamsoft Barcode Scanner
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-dynamsoft-barcode-reader
|
||||
$ npm install @awesome-cordova-plugins/dynamsoft-barcode-scanner
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/dynamsoft-barcode-scanner/)
|
||||
|
||||
Plugin Repo: [https://github.com/xulihang/cordova-plugin-dynamsoft-barcode-reader](https://github.com/xulihang/cordova-plugin-dynamsoft-barcode-reader)
|
||||
|
||||
The Dynamsoft Barcode Scanner Plugin can read barcodes from images as well as camera previews.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
* Android
|
||||
* iOS
|
||||
|
||||
|
||||
|
||||
20
docs/plugins/dynamsoft-barcode-scanner/README.md
Executable file
20
docs/plugins/dynamsoft-barcode-scanner/README.md
Executable file
@@ -0,0 +1,20 @@
|
||||
# dynamsoft-barcode-scanner
|
||||
|
||||
```
|
||||
$ ''
|
||||
$ npm install @awesome-cordova-plugins/dynamsoft-barcode-scanner
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/dynamsoft-barcode-scanner/)
|
||||
|
||||
Plugin Repo: [https://github.com/xulihang/cordova-plugin-dynamsoft-barcode-reader](https://github.com/xulihang/cordova-plugin-dynamsoft-barcode-reader)
|
||||
|
||||
This plugin scans barcodes using Dynamsoft Barcode Reader
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
|
||||
|
||||
|
||||
20
docs/plugins/file-md5/README.md
Normal file
20
docs/plugins/file-md5/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# File MD5
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-file-md5
|
||||
$ npm install @awesome-cordova-plugins/file-md5
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/file-md5/)
|
||||
|
||||
Plugin Repo: [https://github.com/mramonlopez/cordova-plugin-file-md5](https://github.com/mramonlopez/cordova-plugin-file-md5)
|
||||
|
||||
This plugin reads large files in chunks and build the md5sum incrementally.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ Go to firebase console and export google-services.json and GoogleService-Info.pl
|
||||
NOTE: on iOS in order to collect demographic, age, gender data etc. you should additionally include AdSupport.framework into your project.
|
||||
|
||||
## Using capacitor?
|
||||
For Android you'll have to add in __android/app/src/main/AndroidManfiest.xml__ under `<application>`
|
||||
For Android you'll have to add in __android/app/src/main/AndroidManifest.xml__ under `<application>`
|
||||
```
|
||||
<meta-data
|
||||
tools:replace="android:value"
|
||||
|
||||
19
docs/plugins/gcdwebserver.md
Executable file
19
docs/plugins/gcdwebserver.md
Executable file
@@ -0,0 +1,19 @@
|
||||
# GCDWebServer
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-gcdwebserver
|
||||
$ npm install @awesome-cordova-plugins/gcdwebserver
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/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.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
iOS
|
||||
|
||||
|
||||
|
||||
19
docs/plugins/gcdwebserver/README.md
Executable file
19
docs/plugins/gcdwebserver/README.md
Executable file
@@ -0,0 +1,19 @@
|
||||
# GCDWebServer
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-gcdwebserver
|
||||
$ npm install @awesome-cordova-plugins/gcdwebserver
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/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.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
iOS
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# Coordinates
|
||||
# HyperTrack
|
||||
|
||||
alidationError
|
||||
ic cordova plugin add cordova-plugin-hypertrack-v3
|
||||
$ npm install @awesome-cordova-plugins/hyper-track
|
||||
|
||||
@@ -9,14 +9,14 @@ $ npm install @awesome-cordova-plugins/imap
|
||||
|
||||
Plugin Repo: [https://github.com/aleksandar888/cordova-plugin-imap.git](https://github.com/aleksandar888/cordova-plugin-imap.git)
|
||||
|
||||
This plugin will enable an Ionic application to use the IMAP (Internet Message Access Protocol) features.
|
||||
This plugin is in Beta version and it offers support only for Android.
|
||||
The plugin uses Java Mail API.
|
||||
Planned improvements and support for iOS.
|
||||
This plugin will enable a Cordova application to use the IMAP (Internet Message Access Protocol) features
|
||||
The plugin offers support for Android and iOS.
|
||||
To enable the IMAP features on Android, this plugin uses the framework [Java Mail API](https://javaee.github.io/javamail/) and for iOS, it uses the [MailCore 2](http://libmailcore.com/) library.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ Get and set data in the iOS Keychain
|
||||
|
||||
Requires Cordova plugin: `cordova-plugin-ios-keychain`. For more info, please see the [Keychain plugin docs](https://github.com/ionic-team/cordova-plugin-ios-keychain).
|
||||
|
||||
See also [Secure Storage](https://ionicframework.com/docs/native/secure-storage/) for more supported platforms.
|
||||
See also [Secure Storage](https://ionic.io/docs/secure-storage) for more supported platforms.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
|
||||
20
docs/plugins/lets-cooee/README.md
Normal file
20
docs/plugins/lets-cooee/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Lets Cooee
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add @letscooee/cordova-plugin --variable COOEE_APP_ID=appId
|
||||
$ npm install @awesome-cordova-plugins/lets-cooee
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/lets-cooee/)
|
||||
|
||||
Plugin Repo: [https://github.com/letscooee/cordova-plugin-cooee](https://github.com/letscooee/cordova-plugin-cooee)
|
||||
|
||||
AI driven Personalised Notifications for Better Customer Engagement
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
|
||||
|
||||
|
||||
20
docs/plugins/magnetometer/README.md
Normal file
20
docs/plugins/magnetometer/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Device eMagnetometer
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-magnetometer
|
||||
$ npm install @awesome-cordova-plugins/magnetometer
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/magnetometer/)
|
||||
|
||||
Plugin Repo: [https://github.com/sdesalas/cordova-plugin-magnetometer](https://github.com/sdesalas/cordova-plugin-magnetometer)
|
||||
|
||||
Requires Cordova plugin: `cordova-plugin-magnetometer`. For more info, please see the [Device Orientation docs](https://github.com/sdesalas/cordova-plugin-magnetometer).
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
|
||||
|
||||
|
||||
20
docs/plugins/market/README.md
Normal file
20
docs/plugins/market/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Market
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-market
|
||||
$ npm install @awesome-cordova-plugins/market
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/market/)
|
||||
|
||||
Plugin Repo: [https://github.com/xmartlabs/cordova-plugin-market](https://github.com/xmartlabs/cordova-plugin-market)
|
||||
|
||||
Opens an app's page in the market place (Google Play, App Store)
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
|
||||
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
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
|
||||
|
||||
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.3.0
|
||||
$ ionic cordova plugin add cordova-plugin-purchases@2.4.0
|
||||
$ npm install @awesome-cordova-plugins/purchases
|
||||
```
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SmartlookSetupConfigBuilder
|
||||
va plugin add https://github.com/smartlook/cordova-smartlook.git
|
||||
# SmartlookEventTrackingMode
|
||||
ova plugin add https://github.com/smartlook/cordova-smartlook.git
|
||||
$ npm install @awesome-cordova-plugins/smartlook
|
||||
```
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ $ npm install @awesome-cordova-plugins/tealium
|
||||
|
||||
Plugin Repo: [https://github.com/Tealium/cordova-plugin](https://github.com/Tealium/cordova-plugin)
|
||||
|
||||
This plugin provides a TypeScript wrapper around the [Tealium](https://www.tealium.com) Cordova plugin for Ionic Native.
|
||||
This plugin does provides a wrapper around the Tealium Cordova Plugin for Ionic Native.
|
||||
|
||||
For full documentation, see [https://community.tealiumiq.com/t5/Mobile-Libraries/Tealium-for-Cordova/ta-p/17618](https://community.tealiumiq.com/t5/Mobile-Libraries/Tealium-for-Cordova/ta-p/17618)
|
||||
For full documentation, see [https://docs.tealium.com/platforms/cordova/](https://docs.tealium.com/platforms/cordova/)
|
||||
|
||||
## Supported platforms
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# DbResult
|
||||
ordova SDK
|
||||
# UnviredResult
|
||||
a SDK
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add @awesome-cordova-plugins/unvired-cordova-sdk
|
||||
|
||||
@@ -7,12 +7,13 @@ $ npm install @awesome-cordova-plugins/urbanairship
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/urbanairship/)
|
||||
|
||||
Plugin Repo: [https://www.npmjs.com/package/urbanairship-cordova](https://www.npmjs.com/package/urbanairship-cordova)
|
||||
Plugin Repo: [https://github.com/urbanairship/urbanairship-cordova](https://github.com/urbanairship/urbanairship-cordova)
|
||||
|
||||
Npm: [https://www.npmjs.com/package/urbanairship-cordova](https://www.npmjs.com/package/urbanairship-cordova)
|
||||
|
||||
This plugin does something
|
||||
|
||||
## Supported platforms
|
||||
|
||||
* Android
|
||||
* iOS
|
||||
* iOS
|
||||
|
||||
|
||||
20
docs/plugins/zip/README.md
Normal file
20
docs/plugins/zip/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Zip
|
||||
|
||||
```
|
||||
$ ionic cordova plugin add cordova-plugin-zip
|
||||
$ npm install @awesome-cordova-plugins/zip
|
||||
```
|
||||
|
||||
## [Usage Documentation](https://danielsogl.gitbook.io/awesome-cordova-plugins/plugins/zip/)
|
||||
|
||||
Plugin Repo: [https://github.com/MobileChromeApps/cordova-plugin-zip](https://github.com/MobileChromeApps/cordova-plugin-zip)
|
||||
|
||||
A Cordova plugin to unzip files in Android and iOS.
|
||||
|
||||
## Supported platforms
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
|
||||
|
||||
|
||||
5981
package-lock.json
generated
5981
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
86
package.json
86
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "awesome-cordova-plugins",
|
||||
"version": "5.36.1",
|
||||
"version": "6.3.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,52 +24,52 @@
|
||||
"prettier": "prettier --write --ignore-unknown \"**/*\""
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.1"
|
||||
"tslib": "2.4.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/common": "^11.2.14",
|
||||
"@angular/compiler": "^11.2.14",
|
||||
"@angular/compiler-cli": "^11.2.14",
|
||||
"@angular/core": "^11.2.14",
|
||||
"@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.12",
|
||||
"@types/jest": "^27.0.1",
|
||||
"@types/lodash": "^4.14.175",
|
||||
"@types/node": "^16.10.2",
|
||||
"@types/rimraf": "^3.0.2",
|
||||
"@types/webpack": "^5.28.0",
|
||||
"@typescript-eslint/eslint-plugin": "^4.32.0",
|
||||
"@typescript-eslint/parser": "^4.32.0",
|
||||
"async-promise-queue": "^1.0.5",
|
||||
"conventional-changelog-cli": "^2.1.1",
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
"dgeni": "^0.4.14",
|
||||
"@types/fs-extra": "9.0.13",
|
||||
"@types/jest": "27.5.2",
|
||||
"@types/lodash": "4.14.191",
|
||||
"@types/node": "18.11.18",
|
||||
"@types/rimraf": "3.0.2",
|
||||
"@types/webpack": "5.28.0",
|
||||
"@typescript-eslint/eslint-plugin": "5.47.1",
|
||||
"@typescript-eslint/parser": "5.47.1",
|
||||
"async-promise-queue": "1.0.5",
|
||||
"conventional-changelog-cli": "2.2.2",
|
||||
"cz-conventional-changelog": "3.3.0",
|
||||
"dgeni": "0.4.14",
|
||||
"dgeni-packages": "0.16.10",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-jsdoc": "^36.1.0",
|
||||
"fs-extra": "^10.0.0",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-rename": "^2.0.0",
|
||||
"gulp-replace": "^1.1.3",
|
||||
"husky": "^7.0.1",
|
||||
"is-ci": "^3.0.0",
|
||||
"jest": "^27.2.4",
|
||||
"lint-staged": "^11.1.2",
|
||||
"lodash": "^4.17.21",
|
||||
"minimist": "^1.2.5",
|
||||
"prettier": "^2.3.2",
|
||||
"rimraf": "^3.0.2",
|
||||
"rollup": "^2.58.0",
|
||||
"rxjs": "^6.6.7",
|
||||
"terser-webpack-plugin": "^5.2.4",
|
||||
"ts-jest": "^27.0.5",
|
||||
"ts-node": "^10.2.1",
|
||||
"typescript": "~4.1.6",
|
||||
"unminified-webpack-plugin": "^3.0.0",
|
||||
"webpack": "^5.56.0",
|
||||
"winston": "^3.3.3",
|
||||
"zone.js": "^0.11.4"
|
||||
"eslint": "8.31.0",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
"eslint-plugin-jsdoc": "39.6.4",
|
||||
"fs-extra": "11.1.0",
|
||||
"gulp": "4.0.2",
|
||||
"gulp-rename": "2.0.0",
|
||||
"gulp-replace": "1.1.4",
|
||||
"husky": "8.0.2",
|
||||
"is-ci": "3.0.1",
|
||||
"jest": "27.5.1",
|
||||
"lint-staged": "13.1.0",
|
||||
"lodash": "4.17.21",
|
||||
"minimist": "1.2.7",
|
||||
"prettier": "2.8.1",
|
||||
"rimraf": "3.0.2",
|
||||
"rollup": "3.9.0",
|
||||
"rxjs": "6.6.7",
|
||||
"terser-webpack-plugin": "5.3.6",
|
||||
"ts-jest": "27.1.5",
|
||||
"ts-node": "10.9.1",
|
||||
"typescript": "4.2.4",
|
||||
"unminified-webpack-plugin": "3.0.0",
|
||||
"webpack": "5.74.0",
|
||||
"winston": "3.8.2",
|
||||
"zone.js": "0.11.8"
|
||||
},
|
||||
"jest": {
|
||||
"testEnvironment": "jsdom",
|
||||
|
||||
5
renovate.json
Normal file
5
renovate.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"extends": [
|
||||
"config:base"
|
||||
]
|
||||
}
|
||||
@@ -21,7 +21,8 @@ export function getProgram(rootNames: string[] = createSourceFiles()) {
|
||||
options.inlineSourceMap = true;
|
||||
options.importHelpers = true;
|
||||
options.inlineSources = true;
|
||||
options.enableIvy = false;
|
||||
options.enableIvy = true;
|
||||
options.compilationMode = 'partial';
|
||||
|
||||
delete options.baseUrl;
|
||||
|
||||
@@ -77,38 +78,6 @@ export function generateLegacyBundles() {
|
||||
);
|
||||
}
|
||||
|
||||
// remove reference to @awesome-cordova-plugins/core decorators
|
||||
export function modifyMetadata() {
|
||||
PLUGIN_PATHS.map((p) =>
|
||||
p.replace(join(ROOT, 'src'), join(ROOT, 'dist')).replace('index.ts', 'ngx/index.metadata.json')
|
||||
).forEach((p) => {
|
||||
const content = readJSONSync(p);
|
||||
let _prop: { members: { [x: string]: any[] } };
|
||||
for (const prop in content[0].metadata) {
|
||||
_prop = content[0].metadata[prop];
|
||||
removeIonicNativeDecorators(_prop);
|
||||
|
||||
if (_prop.members) {
|
||||
for (const memberProp in _prop.members) {
|
||||
removeIonicNativeDecorators(_prop.members[memberProp][0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
writeJSONSync(p, content);
|
||||
});
|
||||
}
|
||||
|
||||
function removeIonicNativeDecorators(node: any) {
|
||||
if (node.decorators && node.decorators.length) {
|
||||
node.decorators = node.decorators.filter(
|
||||
(d: { expression: { module: string } }) => d.expression.module !== '@awesome-cordova-plugins/core'
|
||||
);
|
||||
}
|
||||
|
||||
if (node.decorators && !node.decorators.length) delete node.decorators;
|
||||
}
|
||||
|
||||
function createSourceFiles(): string[] {
|
||||
return PLUGIN_PATHS.map((indexPath: string) => {
|
||||
const ngxPath = resolve(indexPath.replace('index.ts', ''), 'ngx'),
|
||||
|
||||
@@ -2,7 +2,6 @@ import {
|
||||
cleanupNgx,
|
||||
generateLegacyBundles,
|
||||
generateDeclarationFiles,
|
||||
modifyMetadata,
|
||||
transpileNgx,
|
||||
transpileNgxCore,
|
||||
} from '../build/ngx';
|
||||
@@ -11,5 +10,4 @@ transpileNgxCore();
|
||||
transpileNgx();
|
||||
generateLegacyBundles();
|
||||
generateDeclarationFiles();
|
||||
modifyMetadata();
|
||||
cleanupNgx();
|
||||
|
||||
@@ -30,8 +30,8 @@ const DIST = resolve(ROOT, 'dist/@awesome-cordova-plugins');
|
||||
|
||||
const PACKAGES = [];
|
||||
|
||||
const MIN_CORE_VERSION = '^5.1.0';
|
||||
const RXJS_VERSION = '^5.5.0 || ^7.3.0';
|
||||
const MIN_CORE_VERSION = '^6.0.1';
|
||||
const RXJS_VERSION = '^5.5.0 || ^6.5.0 || ^7.3.0';
|
||||
|
||||
const PLUGIN_PEER_DEPENDENCIES = {
|
||||
'@awesome-cordova-plugins/core': MIN_CORE_VERSION,
|
||||
|
||||
@@ -61,9 +61,13 @@ export class AdjustConfig {
|
||||
private processName: string = null; // Android only
|
||||
private preinstallTrackingEnabled: boolean = null; // Android only
|
||||
private preinstallFilePath: string = null; // Android only
|
||||
private oaidReadingEnabled: boolean = null; // Android only
|
||||
private allowiAdInfoReading: boolean = null; // iOS only
|
||||
private allowIdfaReading: boolean = null; // iOS only
|
||||
private allowAdServicesInfoReading: boolean = null; // iOS only
|
||||
private coppaCompliantEnabled: boolean = null;
|
||||
private playStoreKidsAppEnabled: boolean = null; // Android only
|
||||
private linkMeEnabled: boolean = null; // iOS only
|
||||
|
||||
private attributionCallback: (attribution: AdjustAttribution) => void = null;
|
||||
private eventTrackingSucceededCallback: (event: AdjustEventSuccess) => void = null;
|
||||
@@ -118,6 +122,14 @@ export class AdjustConfig {
|
||||
this.eventBufferingEnabled = eventBufferingEnabled;
|
||||
}
|
||||
|
||||
setCoppaCompliantEnabled(coppaCompliantEnabled: boolean) {
|
||||
this.coppaCompliantEnabled = coppaCompliantEnabled;
|
||||
}
|
||||
|
||||
setPlayStoreKidsAppEnabled(playStoreKidsAppEnabled: boolean) {
|
||||
this.playStoreKidsAppEnabled = playStoreKidsAppEnabled;
|
||||
}
|
||||
|
||||
setUserAgent(userAgent: string) {
|
||||
this.userAgent = userAgent;
|
||||
}
|
||||
@@ -142,6 +154,10 @@ export class AdjustConfig {
|
||||
this.preinstallFilePath = preinstallFilePath;
|
||||
}
|
||||
|
||||
setOaidReadingEnabled(enableOaidReading: boolean) {
|
||||
this.oaidReadingEnabled = enableOaidReading;
|
||||
}
|
||||
|
||||
setAllowiAdInfoReading(allowiAdInfoReading: boolean) {
|
||||
this.allowiAdInfoReading = allowiAdInfoReading;
|
||||
}
|
||||
@@ -154,6 +170,10 @@ export class AdjustConfig {
|
||||
this.allowAdServicesInfoReading = allowAdServicesInfoReading;
|
||||
}
|
||||
|
||||
setLinkMeEnabled(linkMeEnabled: boolean) {
|
||||
this.linkMeEnabled = linkMeEnabled;
|
||||
}
|
||||
|
||||
setAttributionCallbackListener(attributionCallback: (attribution: AdjustAttribution) => void) {
|
||||
this.attributionCallback = attributionCallback;
|
||||
}
|
||||
@@ -235,6 +255,10 @@ export class AdjustConfig {
|
||||
private hasDeferredDeeplinkCallbackListener() {
|
||||
return this.deferredDeeplinkCallback !== null;
|
||||
}
|
||||
|
||||
private hasConversionValueUpdatedCallbackListener() {
|
||||
return this.conversionValueUpdatedCallback !== null;
|
||||
}
|
||||
}
|
||||
|
||||
export class AdjustAppStoreSubscription {
|
||||
@@ -311,6 +335,7 @@ export class AdjustPlayStoreSubscription {
|
||||
export class AdjustThirdPartySharing {
|
||||
private isEnabled: boolean;
|
||||
private granularOptions: string[] = [];
|
||||
private partnerSharingSettings: any[] = [];
|
||||
|
||||
constructor(isEnabled: boolean) {
|
||||
this.isEnabled = isEnabled;
|
||||
@@ -321,6 +346,12 @@ export class AdjustThirdPartySharing {
|
||||
this.granularOptions.push(key);
|
||||
this.granularOptions.push(value);
|
||||
}
|
||||
|
||||
addPartnerSharingSetting(partnerName: string, key: string, value: boolean): void {
|
||||
this.partnerSharingSettings.push(partnerName);
|
||||
this.partnerSharingSettings.push(key);
|
||||
this.partnerSharingSettings.push(value);
|
||||
}
|
||||
}
|
||||
|
||||
export class AdjustAdRevenue {
|
||||
@@ -382,6 +413,7 @@ export interface AdjustAttribution {
|
||||
costType: string;
|
||||
costAmount: string;
|
||||
costCurrency: string;
|
||||
fbInstallReferrer: string; // Android only
|
||||
}
|
||||
|
||||
export interface AdjustSessionSuccess {
|
||||
@@ -445,7 +477,11 @@ export enum AdjustAdRevenueSource {
|
||||
AdRevenueSourceAppLovinMAX = 'applovin_max_sdk',
|
||||
AdRevenueSourceMopub = 'mopub',
|
||||
AdRevenueSourceAdMob = 'admob_sdk',
|
||||
AdRevenueSourceIronsource = 'ironsource_sdk',
|
||||
AdRevenueSourceIronSource = 'ironsource_sdk',
|
||||
AdRevenueSourceAdMost = "admost_sdk",
|
||||
AdRevenueSourceUnity = "unity_sdk",
|
||||
AdRevenueSourceHeliumChartboost = "helium_chartboost_sdk",
|
||||
AdRevenueSourcePublisher = "publisher_sdk",
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -454,6 +490,7 @@ export enum AdjustAdRevenueSource {
|
||||
* This is the Ionic Cordova SDK of Adjust™. You can read more about Adjust™ at adjust.com.
|
||||
*
|
||||
* Requires Cordova plugin: `com.adjust.sdk`. For more info, please see the [Adjust Cordova SDK](https://github.com/adjust/cordova_sdk)
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Adjust, AdjustConfig, AdjustEnvironment } from '@awesome-cordova-plugins/adjust/ngx';
|
||||
@@ -496,6 +533,7 @@ export enum AdjustAdRevenueSource {
|
||||
})
|
||||
@Injectable()
|
||||
export class Adjust extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* This method initializes Adjust SDK
|
||||
*
|
||||
@@ -614,7 +652,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
||||
gdprForgetMe(): void {}
|
||||
|
||||
/**
|
||||
* You can now notify Adjust when a user has exercised their right to stop sharing their data with partners for marketing purposes, but has allowed it to be shared for statistics purposes.
|
||||
* You can now notify Adjust when a user has exercised their right to stop sharing their data with partners for marketing purposes, but has allowed it to be shared for statistics purposes.
|
||||
* Calling the following method will instruct the Adjust SDK to communicate the user's choice to disable data sharing to the Adjust backend
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
@@ -661,6 +699,12 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Instruct to Adjust SDK to check current state of att_status
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
checkForNewAttStatus(): void {}
|
||||
|
||||
/**
|
||||
* If you want to access information about a user's current attribution whenever you need it, you can make a call to this function
|
||||
*
|
||||
@@ -761,4 +805,14 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
||||
getAppTrackingAuthorizationStatus(): Promise<number> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* To obtain the last deep link which has opened your iOS app, call this function
|
||||
*
|
||||
* @returns {Promise<string>} Returns a promise with iOS deep link string value
|
||||
*/
|
||||
@Cordova()
|
||||
getLastDeeplink(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -67,7 +67,10 @@ export class AndroidPermissions extends AwesomeCordovaNativePlugin {
|
||||
BIND_WALLPAPER: 'android.permission.BIND_WALLPAPER',
|
||||
BLUETOOTH: 'android.permission.BLUETOOTH',
|
||||
BLUETOOTH_ADMIN: 'android.permission.BLUETOOTH_ADMIN',
|
||||
BLUETOOTH_ADVERTISE: 'android.permission.BLUETOOTH_ADVERTISE',
|
||||
BLUETOOTH_CONNECT: 'android.permission.BLUETOOTH_CONNECT',
|
||||
BLUETOOTH_PRIVILEGED: 'android.permission.BLUETOOTH_PRIVILEGED',
|
||||
BLUETOOTH_SCAN: 'android.permission.BLUETOOTH_SCAN',
|
||||
BODY_SENSORS: 'android.permission.BODY_SENSORS',
|
||||
BRICK: 'android.permission.BRICK',
|
||||
BROADCAST_PACKAGE_REMOVED: 'android.permission.BROADCAST_PACKAGE_REMOVED',
|
||||
@@ -123,6 +126,7 @@ export class AndroidPermissions extends AwesomeCordovaNativePlugin {
|
||||
MOUNT_UNMOUNT_FILESYSTEMS: 'android.permission.MOUNT_UNMOUNT_FILESYSTEMS',
|
||||
NFC: 'android.permission.NFC',
|
||||
PERSISTENT_ACTIVITY: 'android.permission.PERSISTENT_ACTIVITY',
|
||||
POST_NOTIFICATIONS: 'android.permission.POST_NOTIFICATIONS',
|
||||
PROCESS_OUTGOING_CALLS: 'android.permission.PROCESS_OUTGOING_CALLS',
|
||||
READ_CALENDAR: 'android.permission.READ_CALENDAR',
|
||||
READ_CALL_LOG: 'android.permission.READ_CALL_LOG',
|
||||
@@ -132,6 +136,9 @@ export class AndroidPermissions extends AwesomeCordovaNativePlugin {
|
||||
READ_HISTORY_BOOKMARKS: 'com.android.browser.permission.READ_HISTORY_BOOKMARKS',
|
||||
READ_INPUT_STATE: 'android.permission.READ_INPUT_STATE',
|
||||
READ_LOGS: 'android.permission.READ_LOGS',
|
||||
READ_MEDIA_AUDIO: 'android.permission.READ_MEDIA_AUDIO',
|
||||
READ_MEDIA_IMAGES: 'android.permission.READ_MEDIA_IMAGES',
|
||||
READ_MEDIA_VIDEO: 'android.permission.READ_MEDIA_VIDEO',
|
||||
READ_PHONE_STATE: 'android.permission.READ_PHONE_STATE',
|
||||
READ_PROFILE: 'android.permission.READ_PROFILE',
|
||||
READ_SMS: 'android.permission.READ_SMS',
|
||||
|
||||
55
src/@awesome-cordova-plugins/plugins/app-review/index.ts
Normal file
55
src/@awesome-cordova-plugins/plugins/app-review/index.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
/**
|
||||
* @name App Review
|
||||
* @description
|
||||
* Cordova plugin to review app
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { AppReview } from '@awesome-cordova-plugins/app-review/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private appReview: AppReview) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.appReview.requestReview()
|
||||
* .then(() => console.log('Success'))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'AppReview',
|
||||
plugin: 'cordova-plugin-app-review',
|
||||
pluginRef: 'cordova.plugins.AppReview',
|
||||
repo: 'https://github.com/chemerisuk/cordova-plugin-app-review',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class AppReview extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Launches in-app review dialog.
|
||||
*
|
||||
* @returns {Promise<void>} Callback when operation is completed
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
requestReview(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Launches App/Play store page with a review form. By default current app screen
|
||||
* is displayed but you can pass a package name string to show another app details.
|
||||
*
|
||||
* @param {string} [packageName] Package name to show instead of the current app.
|
||||
* @returns {Promise<void>} Callback when operation is completed
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
openStoreScreen(packageName?: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
340
src/@awesome-cordova-plugins/plugins/applovin/index.ts
Normal file
340
src/@awesome-cordova-plugins/plugins/applovin/index.ts
Normal file
@@ -0,0 +1,340 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AwesomeCordovaNativePlugin, Cordova, Plugin } from '@awesome-cordova-plugins/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface InitializeConfig {
|
||||
hasUserConsentValue: boolean;
|
||||
isAgeRestrictedUserValue: boolean;
|
||||
isDoNotSellValue: boolean;
|
||||
isTabletValue: boolean;
|
||||
}
|
||||
|
||||
export interface AdInfo {
|
||||
adUnitId: string;
|
||||
creativeId: string;
|
||||
networkName: string;
|
||||
placement: string;
|
||||
revenue: number;
|
||||
}
|
||||
|
||||
export enum AdViewPosition {
|
||||
TOP_CENTER = 'top_center',
|
||||
TOP_RIGHT = 'top_right',
|
||||
CENTERED = 'centered',
|
||||
CENTER_LEFT = 'center_left',
|
||||
CENTER_RIGHT = 'center_right',
|
||||
BOTTOM_LEFT = 'bottom_left',
|
||||
BOTTOM_CENTER = 'bottom_center',
|
||||
BOTTOM_RIGHT = 'bottom_right',
|
||||
}
|
||||
|
||||
export enum ConsentDialogState {
|
||||
UNKNOWN = 0,
|
||||
APPLIES = 1,
|
||||
DOES_NOT_APPLY = 2,
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Applovin
|
||||
* @description
|
||||
* This plugin allows you to easily configure, integrate and interact with Applovin ads.
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Applovin } from '@awesome-cordova-plugins/applovin';
|
||||
*
|
||||
*
|
||||
* constructor(private applovin: Applovin) { }
|
||||
*
|
||||
*
|
||||
* this.applovin.initialize(sdkKey)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
*
|
||||
* this.applovin.loadInterstitial(adUnitId)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
*
|
||||
* this.applovin.showInterstitial(adUnitId, placement)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Applovin',
|
||||
plugin: 'cordova-plugin-applovin-max',
|
||||
pluginRef: 'applovin',
|
||||
repo: 'https://github.com/AppLovin/AppLovin-MAX-Cordova',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class Applovin extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Initialize the AppLovin SDK.
|
||||
*
|
||||
* @param {string} sdkKey The SDK key generated for your AppLovin account.
|
||||
*/
|
||||
@Cordova()
|
||||
initialize(sdkKey: string): Promise<InitializeConfig> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
showMediationDebugger(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
getConsentDialogState(): Promise<ConsentDialogState> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setHasUserConsent(hasUserConsent: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
hasUserConsent(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setIsAgeRestrictedUser(isAgeRestrictedUser: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
isAgeRestrictedUser(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setDoNotSell(isDoNotSell: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
isDoNotSell(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
isTablet(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setUserId(userId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setMuted(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setVerboseLogging(verboseLoggingEnabled: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setTestDeviceAdvertisingIds(advertisingIds: string[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
trackEvent(event: string, parameters?: object): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/** BANNERS */
|
||||
|
||||
@Cordova()
|
||||
createBanner(adUnitId: string, position: AdViewPosition): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setBannerBackgroundColor(adUnitId: string, hexColorCode: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setBannerPlacement(adUnitId: string, placement: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setBannerExtraParameter(adUnitId: string, key: string, value: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
showBanner(adUnitId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
hideBanner(adUnitId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
destroyBanner(adUnitId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/** MRECS */
|
||||
|
||||
@Cordova()
|
||||
createMRec(adUnitId: string, position: AdViewPosition): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setMRecBackgroundColor(adUnitId: string, hexColorCode: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setMRecPlacement(adUnitId: string, placement: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setMRecExtraParameter(adUnitId: string, key: string, value: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
showMRec(adUnitId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
hideMRec(adUnitId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
destroyMRec(adUnitId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/** INTERSTITIALS */
|
||||
|
||||
@Cordova()
|
||||
loadInterstitial(adUnitId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
showInterstitial(adUnitId: string, placement?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setInterstitialExtraParameter(adUnitId: string, key: string, value: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnInterstitialLoadedEvent',
|
||||
})
|
||||
onInterstitialLoaded(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnInterstitialLoadFailedEvent',
|
||||
})
|
||||
onInterstitialLoadFailed(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnInterstitialDisplayedEvent',
|
||||
})
|
||||
onInterstitialDisplayed(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnInterstitialHiddenEvent',
|
||||
})
|
||||
onInterstitialHidden(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnInterstitialAdFailedToDisplayEvent',
|
||||
})
|
||||
onInterstitialAdFailedToDisplay(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
/** REWARDED ADS */
|
||||
|
||||
@Cordova()
|
||||
loadRewardedAd(adUnitId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
showRewardedAd(adUnitId: string, placement?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
setRewardedAdExtraParameter(adUnitId: string, key: string, value: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnRewardedAdLoadedEvent',
|
||||
})
|
||||
onRewardedAdLoaded(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnRewardedAdLoadFailedEvent',
|
||||
})
|
||||
onRewardedAdLoadFailed(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnRewardedAdDisplayedEvent',
|
||||
})
|
||||
onRewardedAdDisplayed(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnRewardedAdHiddenEvent',
|
||||
})
|
||||
onRewardedAdHidden(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'OnRewardedAdAdFailedToDisplayEvent',
|
||||
})
|
||||
onRewardedAdAdFailedToDisplay(): Observable<AdInfo> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -95,10 +95,10 @@ export class FileTransferManager {
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'BackgroundUpload',
|
||||
plugin: 'cordova-plugin-background-upload',
|
||||
plugin: '@spoonconsulting/cordova-plugin-background-upload',
|
||||
pluginRef: 'FileTransferManager',
|
||||
repo: 'https://github.com/spoonconsulting/cordova-plugin-background-upload',
|
||||
install: 'ionic cordova plugin add cordova-plugin-background-upload',
|
||||
install: 'ionic cordova plugin add @spoonconsulting/cordova-plugin-background-upload',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
|
||||
@@ -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).
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, CordovaProperty, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
|
||||
import { AwesomeCordovaNativePlugin, Cordova, CordovaProperty, Plugin } from '@awesome-cordova-plugins/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/* Available status of device */
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -929,6 +929,72 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name hasPermissionBtScan (useful only for Android 12+ / API 31+)
|
||||
* Determine whether scan privileges in Android API 31+
|
||||
* Will return an error if called on iOS or Android versions prior to 12.0.
|
||||
* @returns {Promise<{ hasPermission: boolean }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
hasPermissionBtScan(): Promise<{ hasPermission: boolean }> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name requestPermissionBtScan (useful only for Android 12+ / API 31)
|
||||
* Request scan privileges in Android API 31.
|
||||
* Will return an error if called on iOS or Android versions prior to 12.0.
|
||||
* @returns {Promise<{ requestPermission: boolean }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
requestPermissionBtScan(): Promise<{ requestPermission: boolean }> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name hasPermissionBtConnect (useful only for Android 12+ / API 31)
|
||||
* Determine if device has the permission to connect or not.
|
||||
* Will return an error if called on iOS or Android versions prior to 12.0.
|
||||
* @returns {Promise<{ hasPermission: boolean }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
hasPermissionBtConnect(): Promise<{ hasPermission: boolean }> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name requestPermissionBtConnect (useful only for Android 12+ / API 31)
|
||||
* Prompt permission settings page. requestPermissionBtConnect property returns whether connect permission has been granted or not.
|
||||
* Will return an error if called on iOS or Android versions prior to 12.0.
|
||||
* @returns {Promise<{ requestPermission: boolean }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
requestPermissionBtConnect(): Promise<{ requestPermission: boolean }> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name hasPermissionBtAdvertise (useful only for Android 12+ / API 31)
|
||||
* Determine if device has the permission to advertise or not.
|
||||
* Will return an error if called on iOS or Android versions prior to 12.0.
|
||||
* @returns {Promise<{ hasPermission: boolean }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
hasPermissionBtAdvertise(): Promise<{ hasPermission: boolean }> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name requestPermissionBtAdvertise (useful only for Android 12+ / API 31)
|
||||
* Prompt permission settings page. requestPermissionBtAdvertise property returns whether connect permission has been granted or not.
|
||||
* Will return an error if called on iOS or Android versions prior to 12.0.
|
||||
* @returns {Promise<{ requestPermission: boolean }>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
requestPermissionBtAdvertise(): Promise<{ requestPermission: boolean }> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name initializePeripheral
|
||||
* Initialize Bluetooth on the device. Must be called before anything else.
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
63
src/@awesome-cordova-plugins/plugins/browser-tab/index.ts
Normal file
63
src/@awesome-cordova-plugins/plugins/browser-tab/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
/**
|
||||
* @name Browser Tab
|
||||
* @description
|
||||
* This plugin provides an interface to in-app browser tabs that exist on some mobile platforms, specifically [Custom Tabs](http://developer.android.com/tools/support-library/features.html#custom-tabs) on Android (including the [Chrome Custom Tabs](https://developer.chrome.com/multidevice/android/customtabs) implementation), and [SFSafariViewController](https://developer.apple.com/library/ios/documentation/SafariServices/Reference/SFSafariViewController_Ref/) on iOS.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { BrowserTab } from '@awesome-cordova-plugins/browser-tab/ngx';
|
||||
*
|
||||
* constructor(private browserTab: BrowserTab) {
|
||||
*
|
||||
* browserTab.isAvailable()
|
||||
* .then(isAvailable => {
|
||||
* if (isAvailable) {
|
||||
* browserTab.openUrl('https://ionic.io');
|
||||
* } else {
|
||||
* // open URL with InAppBrowser instead or SafariViewController
|
||||
* }
|
||||
* });
|
||||
* }
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'BrowserTab',
|
||||
plugin: 'cordova-plugin-browsertab',
|
||||
pluginRef: 'cordova.plugins.browsertab',
|
||||
repo: 'https://github.com/google/cordova-plugin-browsertab',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class BrowserTab extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Check if BrowserTab option is available
|
||||
* @return {Promise<any>} Returns a promise that resolves when check is successful and returns true or false
|
||||
*/
|
||||
@Cordova()
|
||||
isAvailable(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens the provided URL using a browser tab
|
||||
* @param {string} url The URL you want to open
|
||||
* @return {Promise<any>} Returns a promise that resolves when check open was successful
|
||||
*/
|
||||
@Cordova()
|
||||
openUrl(url: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes browser tab
|
||||
* @return {Promise<any>} Returns a promise that resolves when close was finished
|
||||
*/
|
||||
@Cordova()
|
||||
close(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,9 @@ export interface CameraPreviewOptions {
|
||||
|
||||
/** Preview box drag across the screen, default 'false' */
|
||||
previewDrag?: boolean;
|
||||
|
||||
/** Capture images to a file and return back the file path instead of returning base64 encoded data. */
|
||||
storeToFile: boolean;
|
||||
|
||||
/** Preview box to the back of the webview (true => back, false => front) , default false */
|
||||
toBack?: boolean;
|
||||
|
||||
@@ -132,10 +132,10 @@ export enum Direction {
|
||||
* [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
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Camera, CameraOptions } from '@awesome-cordova-plugins/camera/ngx';
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
export interface ChooserResult {
|
||||
mediaType: string;
|
||||
name: string;
|
||||
uri: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Chooser
|
||||
* @description
|
||||
* File chooser plugin for Cordova.
|
||||
*
|
||||
* The following must be added to config.xml to prevent crashing when selecting large files on Android:
|
||||
* ```xml
|
||||
* <platform name="android">
|
||||
* <edit-config
|
||||
* file="app/src/main/AndroidManifest.xml"
|
||||
* mode="merge"
|
||||
* target="/manifest/application">
|
||||
* <application android:largeHeap="true" />
|
||||
* </edit-config>
|
||||
* </platform>
|
||||
* ```
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Chooser } from '@awesome-cordova-plugins/chooser-simple-file/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private chooser: Chooser) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.chooser.getFiles()
|
||||
* .then(files => console.log(files ? files.name : 'canceled'))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
* @interfaces
|
||||
* ChooserResult
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Chooser',
|
||||
plugin: 'cordova-plugin-simple-file-chooser',
|
||||
pluginRef: 'chooser',
|
||||
repo: 'https://github.com/hc-oss/cordova-plugin-simple-file-chooser',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@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
|
||||
* data: MIME type, display name, and original URI.
|
||||
*/
|
||||
@Cordova()
|
||||
getFiles(accept?: string): Promise<ChooserResult[] | undefined> {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,13 +121,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;
|
||||
}
|
||||
|
||||
@@ -474,28 +475,6 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set profile attributes from facebook user
|
||||
*
|
||||
* @param profile {any} facebook graph user object
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
profileSetGraphUser(profile: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set profile attributes rom google plus user
|
||||
*
|
||||
* @param profile {any} google plus user object
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
profileGooglePlusUser(profile: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get User Profile Property
|
||||
*
|
||||
@@ -509,6 +488,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated This method is deprecated. Use getCleverTapID() instead.
|
||||
* Get a unique CleverTap identifier suitable for use with install attribution providers.
|
||||
* calls back with unique CleverTap attribution identifier
|
||||
*
|
||||
@@ -520,6 +500,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated This method is deprecated. Use getCleverTapID() instead.
|
||||
* Get User Profile CleverTapID
|
||||
* calls back with CleverTapID or false
|
||||
*
|
||||
@@ -530,6 +511,17 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get User Profile CleverTapID
|
||||
* calls back with CleverTapID
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getCleverTapID(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the property specified by key from the user profile
|
||||
*
|
||||
@@ -601,6 +593,66 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method for incrementing a value for a single-value profile property (if it exists).
|
||||
*
|
||||
* @param key {string}
|
||||
* @param value {number}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
profileIncrementValueBy(key: string,value: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method for decrementing a value for a single-value profile property (if it exists).
|
||||
*
|
||||
* @param key {string}
|
||||
* @param value {number}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
profileDecrementValueBy(key: string,value: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/*******************
|
||||
* In-App Controls
|
||||
******************/
|
||||
|
||||
/**
|
||||
* Suspends and saves inApp notifications until 'resumeInAppNotifications' is called for current session.
|
||||
* Automatically resumes InApp notifications display on CleverTap shared instance creation.
|
||||
* Pending inApp notifications are displayed only for current session.
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
suspendInAppNotifications(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Discards inApp notifications until 'resumeInAppNotifications' is called for current session.
|
||||
* Automatically resumes InApp notifications display on CleverTap shared instance creation.
|
||||
* Pending inApp notifications are not displayed.
|
||||
*/
|
||||
@Cordova()
|
||||
discardInAppNotifications(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resumes displaying inApps notifications and shows pending inApp notifications if any.
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
resumeInAppNotifications(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/*******************
|
||||
* Session
|
||||
******************/
|
||||
@@ -676,6 +728,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
/****************************
|
||||
* Notification Inbox methods
|
||||
****************************/
|
||||
|
||||
/**
|
||||
* Call this method to initialize the App Inbox
|
||||
*/
|
||||
@@ -752,6 +805,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
|
||||
*
|
||||
@@ -785,293 +849,6 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to SetUIEditor Connection
|
||||
*
|
||||
* @param enabled {boolean}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setUIEditorConnectionEnabled(enabled: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register Boolean Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerBooleanVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register Double Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerDoubleVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register Integer Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerIntegerVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register String Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerStringVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register List of Boolean Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerListOfBooleanVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register List of Double Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerListOfDoubleVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register List of Integer Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerListOfIntegerVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register List of String Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerListOfStringVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register Map of Boolean Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerMapOfBooleanVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register Map of Double Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerMapOfDoubleVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register Map of Integer Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerMapOfIntegerVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Register Map of String Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
registerMapOfStringVariable(varName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get Boolean Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @param defaultValue {boolean}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getBooleanVariable(varName: string, defaultValue: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get Double Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @param defaultValue {number}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getDoubleVariable(varName: string, defaultValue: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get Integer Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @param defaultValue {number}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getIntegerVariable(varName: string, defaultValue: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get String Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @param defaultValue {string}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getStringVariable(varName: string, defaultValue: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get List of Boolean Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @param defaultValue {any}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getListOfBooleanVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get List of Double Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @param defaultValue {any}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getListOfDoubleVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get List of Integer Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @param defaultValue {any}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getListOfIntegerVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get List of String Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @param defaultValue {any}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getListOfStringVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to get Map of Boolean Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @param defaultValue {any}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getMapOfBooleanVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get Map of Double Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @param defaultValue {any}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getMapOfDoubleVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get Map of Integer Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @param defaultValue {any}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getMapOfIntegerVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get Map of String Variable
|
||||
*
|
||||
* @param varName {string}
|
||||
* @param defaultValue {any}
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getMapOfStringVariable(varName: string, defaultValue: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this to Get All Display Units
|
||||
*
|
||||
@@ -1208,7 +985,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getString(): Promise<any> {
|
||||
getString(key: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1219,7 +996,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getBoolean(): Promise<any> {
|
||||
getBoolean(key: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1230,7 +1007,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getLong(): Promise<any> {
|
||||
getLong(key: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1241,7 +1018,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getDouble(): Promise<any> {
|
||||
getDouble(key: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
@@ -62,4 +62,12 @@ export class Device extends AwesomeCordovaNativePlugin {
|
||||
/** Get the device hardware serial number. */
|
||||
@CordovaProperty()
|
||||
serial: string;
|
||||
|
||||
/** 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;
|
||||
}
|
||||
|
||||
@@ -66,6 +66,9 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
||||
WRITE_EXTERNAL_STORAGE: 'WRITE_EXTERNAL_STORAGE',
|
||||
READ_EXTERNAL_STORAGE: 'READ_EXTERNAL_STORAGE',
|
||||
BODY_SENSORS: 'BODY_SENSORS',
|
||||
BLUETOOTH_ADVERTISE: "BLUETOOTH_ADVERTISE",
|
||||
BLUETOOTH_SCAN: "BLUETOOTH_SCAN",
|
||||
BLUETOOTH_CONNECT: "BLUETOOTH_CONNECT",
|
||||
};
|
||||
|
||||
@CordovaProperty()
|
||||
@@ -88,12 +91,11 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
||||
};
|
||||
|
||||
/**
|
||||
* iOS ONLY
|
||||
* Location accuracy authorization
|
||||
*/
|
||||
locationAccuracyAuthorization: {
|
||||
FULL: 'full';
|
||||
REDUCED: 'reduced';
|
||||
locationAccuracyAuthorization = {
|
||||
FULL: 'full',
|
||||
REDUCED: 'reduced',
|
||||
};
|
||||
|
||||
permissionGroups = {
|
||||
@@ -114,6 +116,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 = {
|
||||
@@ -154,6 +157,18 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
||||
UNKNOWN: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Access to the photo library (iOS 14+)
|
||||
*
|
||||
* ADD_ONLY - can add to but not read from Photo Library
|
||||
* READ_WRITE - can both add to and read from Photo Library
|
||||
*
|
||||
*/
|
||||
photoLibraryAccessLevel = {
|
||||
ADD_ONLY: 'add_only',
|
||||
READ_WRITE: 'read_write',
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks if app is able to access device location.
|
||||
*
|
||||
@@ -294,11 +309,12 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
||||
* 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.
|
||||
*
|
||||
* @param {string} [mode] iOS only: location authorization mode: "always" or "when_in_use". If not specified, defaults to "when_in_use".
|
||||
* @param {string} [mode] location authorization mode: "always" or "when_in_use". If not specified, defaults to "when_in_use". (this.locationAuthorizationMode)
|
||||
* @param {string} [accuracy] requested location accuracy: "full" or "reduced". If not specified, defaults to "full". (this.locationAccuracyAuthorization)
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ platforms: ['Android', 'iOS'], callbackOrder: 'reverse' })
|
||||
requestLocationAuthorization(mode?: string): Promise<any> {
|
||||
requestLocationAuthorization(mode?: string, accuracy?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -671,6 +687,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.
|
||||
*
|
||||
@@ -814,20 +851,34 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Checks if the application is authorized to use the Camera Roll in Photos app.
|
||||
*
|
||||
* @param accessLevel - (optional) On iOS 14+, specifies the level of access to the photo library to query as a constant in cordova.plugins.diagnostic.photoLibraryAccessLevel`
|
||||
* Possible values are:
|
||||
* ADD_ONLY - can add to but not read from Photo Library
|
||||
* READ_WRITE - can both add to and read from Photo Library
|
||||
* Defaults to ADD_ONLY if not specified
|
||||
* Has no effect on iOS 13 or below
|
||||
*
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova({ platforms: ['iOS'] })
|
||||
isCameraRollAuthorized(): Promise<boolean> {
|
||||
@Cordova({ platforms: ['iOS'], callbackOrder: 'reverse' })
|
||||
isCameraRollAuthorized(accessLevel?: string): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the authorization status for the application to use the Camera Roll in Photos app.
|
||||
*
|
||||
* @param accessLevel - (optional) On iOS 14+, specifies the level of access to the photo library to query as a constant in cordova.plugins.diagnostic.photoLibraryAccessLevel`
|
||||
* Possible values are:
|
||||
* ADD_ONLY - can add to but not read from Photo Library
|
||||
* READ_WRITE - can both add to and read from Photo Library
|
||||
* Defaults to ADD_ONLY if not specified
|
||||
* Has no effect on iOS 13 or below
|
||||
*
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
@Cordova({ platforms: ['iOS'] })
|
||||
getCameraRollAuthorizationStatus(): Promise<string> {
|
||||
@Cordova({ platforms: ['iOS'], callbackOrder: 'reverse' })
|
||||
getCameraRollAuthorizationStatus(accessLevel?: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -836,10 +887,17 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
||||
* Should only be called if authorization status is NOT_REQUESTED.
|
||||
* Calling it when in any other state will have no effect.
|
||||
*
|
||||
* @param accessLevel - (optional) On iOS 14+, specifies the level of access to the photo library to query as a constant in cordova.plugins.diagnostic.photoLibraryAccessLevel`
|
||||
* Possible values are:
|
||||
* ADD_ONLY - can add to but not read from Photo Library
|
||||
* READ_WRITE - can both add to and read from Photo Library
|
||||
* Defaults to ADD_ONLY if not specified
|
||||
* Has no effect on iOS 13 or below
|
||||
*
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ platforms: ['iOS'] })
|
||||
requestCameraRollAuthorization(): Promise<any> {
|
||||
@Cordova({ platforms: ['iOS'], callbackOrder: 'reverse' })
|
||||
requestCameraRollAuthorization(accessLevel?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1006,13 +1064,13 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the location accuracy authorization for the application on iOS 14+. Note: calling on iOS <14 will result in the Promise being rejected.
|
||||
* Returns the location accuracy authorization for the application on iOS 14+ and Android 12+. Note: calling on iOS <14 or Android <12 will always return cordova.plugins.diagnostic.locationAccuracyAuthorization.FULL
|
||||
*
|
||||
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#getlocationaccuracyauthorization)
|
||||
*
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
@Cordova({ platform: ['iOS'] })
|
||||
@Cordova({ platforms: ['iOS', 'Android'] })
|
||||
getLocationAccuracyAuthorization(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ export interface DocumentScannerOptions {
|
||||
* This plugin processes images of documents, compensating for perspective.
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { DocumentScanner, DocumentScannerOptions } from '@awesome-cordova-plugins/document-scanner';
|
||||
* import { DocumentScanner, DocumentScannerOptions } from '@awesome-cordova-plugins/document-scanner/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private documentScanner: DocumentScanner) { }
|
||||
|
||||
209
src/@awesome-cordova-plugins/plugins/dynamsoft-barcode-scanner/index.ts
Executable file
209
src/@awesome-cordova-plugins/plugins/dynamsoft-barcode-scanner/index.ts
Executable file
@@ -0,0 +1,209 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Plugin,
|
||||
Cordova,
|
||||
CordovaProperty,
|
||||
CordovaInstance,
|
||||
InstanceProperty,
|
||||
AwesomeCordovaNativePlugin,
|
||||
} from '@awesome-cordova-plugins/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/**
|
||||
* dceLicense: License of Dynamsoft Camera Enhancer
|
||||
* resolution: use EnumResolution
|
||||
* rotate: convert frame to bitmap and rotate it
|
||||
*/
|
||||
export interface ScanOptions {
|
||||
dceLicense?: string;
|
||||
resolution?: number;
|
||||
rotate?: boolean;
|
||||
}
|
||||
|
||||
export interface FrameResult {
|
||||
frameWidth: number;
|
||||
frameHeight: number;
|
||||
frameRotation: number;
|
||||
results: BarcodeResult[];
|
||||
}
|
||||
|
||||
export interface BarcodeResult {
|
||||
barcodeText: string;
|
||||
barcodeFormat: string;
|
||||
barcodeBytesBase64?: string;
|
||||
x1: number;
|
||||
x2: number;
|
||||
x3: number;
|
||||
x4: number;
|
||||
y1: number;
|
||||
y2: number;
|
||||
y3: number;
|
||||
y4: number;
|
||||
}
|
||||
|
||||
export enum EnumResolution {
|
||||
RESOLUTION_AUTO = 0,
|
||||
RESOLUTION_480P = 1,
|
||||
RESOLUTION_720P = 2,
|
||||
RESOLUTION_1080P = 3,
|
||||
RESOLUTION_2K = 4,
|
||||
RESOLUTION_4K = 5,
|
||||
}
|
||||
|
||||
/**
|
||||
* @name dynamsoft-barcode-scanner
|
||||
* @description
|
||||
* This plugin scans barcodes using Dynamsoft Barcode Reader
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { dynamsoft-barcode-scanner } from '@awesome-cordova-plugins/dynamsoft-barcode-scanner';
|
||||
*
|
||||
*
|
||||
* constructor(private dynamsoft-barcode-scanner: dynamsoft-barcode-scanner) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* await this.dynamsoft-barcode-scanner.init("license");
|
||||
* this.dynamsoft-barcode-scanner.startScanning("license").subscribe(result => {
|
||||
console.log(result);
|
||||
});
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'dynamsoft-barcode-scanner',
|
||||
plugin: 'cordova-plugin-dynamsoft-barcode-reader',
|
||||
pluginRef: 'cordova.plugins.DBR',
|
||||
repo: 'https://github.com/xulihang/cordova-plugin-dynamsoft-barcode-reader',
|
||||
install: '',
|
||||
installVariables: [],
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class BarcodeScanner extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Initialize Dynamsoft Barcode Reader
|
||||
* @param license {string}
|
||||
* @return {Promise<any>} Returns a promise that resolves when the initialization is done
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
init(license: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up runtime settings
|
||||
* @param settings {string} runtime settings template in JSON
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
initRuntimeSettingsWithString(settings?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Output runtime settings to JSON string
|
||||
* @return {Promise<String>} Returns a promise
|
||||
*/
|
||||
@Cordova({ successIndex: 1, errorIndex: 2 })
|
||||
outputSettingsToString(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* destroy Dynamsoft Barcode Reader
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova({ successIndex: 1, errorIndex: 2 })
|
||||
destroy(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* start the camera to scan barcodes
|
||||
* @param options {ScanOptions}
|
||||
* @return {Observable<FrameResult>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
observable: true,
|
||||
})
|
||||
startScanning(options?: ScanOptions): Observable<FrameResult> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* stop scanning
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova({ successIndex: 1, errorIndex: 2 })
|
||||
stopScanning(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* resume scanning
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova({ successIndex: 1, errorIndex: 2 })
|
||||
resumeScanning(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* pause scanning
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova({ successIndex: 1, errorIndex: 2 })
|
||||
pauseScanning(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* get resolution like: 1280x720
|
||||
* @return {Promise<string>} Returns a promise
|
||||
*/
|
||||
@Cordova({ successIndex: 1, errorIndex: 2 })
|
||||
getResolution(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* switch torch
|
||||
* @param desiredStatus {string} on or off
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova({ successIndex: 1, errorIndex: 2 })
|
||||
switchTorch(desiredStatus: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* set zoom
|
||||
* @param factor {number} zoom factor
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova({ successIndex: 1, errorIndex: 2 })
|
||||
setZoom(factor: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* set focus
|
||||
* @param point focus point
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova({ successIndex: 1, errorIndex: 2 })
|
||||
setFocus(point: { x: number; y: number }): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -67,7 +67,7 @@ export interface EmailComposerOptions {
|
||||
* // Returns an array of configured email clients for the device
|
||||
* });
|
||||
*
|
||||
* this.emailComposer.hasClient().then(app, (isValid: boolean) => {
|
||||
* this.emailComposer.hasClient(app).then((isValid: boolean) => {
|
||||
* if (isValid) {
|
||||
* // Now we know we have a valid email client configured
|
||||
* // Not specifying an app will return true if at least one email client is configured
|
||||
@@ -80,7 +80,7 @@ export interface EmailComposerOptions {
|
||||
* }
|
||||
* });
|
||||
*
|
||||
* this.emailComposer.isAvailable().then(app, (available: boolean) => {
|
||||
* this.emailComposer.isAvailable(app).then((available: boolean) => {
|
||||
* if(available) {
|
||||
* // Now we know we can send an email, calls hasClient and hasAccount
|
||||
* // Not specifying an app will return true if at least one email client is configured
|
||||
|
||||
@@ -49,7 +49,7 @@ export interface FacebookLoginResponse {
|
||||
* 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">
|
||||
* ```
|
||||
*
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
43
src/@awesome-cordova-plugins/plugins/file-md5/index.ts
Normal file
43
src/@awesome-cordova-plugins/plugins/file-md5/index.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
/**
|
||||
* @name File MD5
|
||||
* @description
|
||||
* This plugin reads large files in chunks and build the md5sum incrementally.
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { FileMD5 } from '@awesome-cordova-plugins/file-md5/nx';
|
||||
*
|
||||
*
|
||||
* constructor(private fileMD5: FileMD5) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.fileMD5.file(fileEntry)
|
||||
* .then((md5sum: string) => console.log(md5sum))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'FileMD5',
|
||||
plugin: 'cordova-plugin-file-md5',
|
||||
pluginRef: 'md5chksum',
|
||||
repo: 'https://github.com/mramonlopez/cordova-plugin-file-md5',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class FileMD5 extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Get MD5 checksum from a file
|
||||
*
|
||||
* @param fileEntry {FileEntry} File entry is a org.apache.cordova.file.FileEntry
|
||||
* @returns {Promise<any>} Promise with md5sum
|
||||
*/
|
||||
@Cordova()
|
||||
file(fileEntry: any): Promise<any> {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
||||
* NOTE: on iOS in order to collect demographic, age, gender data etc. you should additionally include AdSupport.framework into your project.
|
||||
*
|
||||
* ## Using capacitor?
|
||||
* For Android you'll have to add in __android/app/src/main/AndroidManfiest.xml__ under `<application>`
|
||||
* For Android you'll have to add in __android/app/src/main/AndroidManifest.xml__ under `<application>`
|
||||
* ```
|
||||
* <meta-data
|
||||
* tools:replace="android:value"
|
||||
|
||||
@@ -112,7 +112,26 @@ export interface FirebaseUser {
|
||||
*/
|
||||
name?: string;
|
||||
}
|
||||
|
||||
export interface MessagePayloadAps {
|
||||
alert?: {
|
||||
title: string;
|
||||
body: string;
|
||||
}
|
||||
}
|
||||
export interface MessagePayload {
|
||||
title?: string;
|
||||
body?: string;
|
||||
collapse_key?: string;
|
||||
from?: string;
|
||||
id?: string;
|
||||
messageType?: string;
|
||||
notification_foreground?: string;
|
||||
sent_time?: string;
|
||||
show_notification?: string;
|
||||
ttl?: string;
|
||||
tap?: 'background' | 'foreground';
|
||||
aps?: MessagePayloadAps;
|
||||
}
|
||||
/**
|
||||
* @name Firebase X
|
||||
* @description
|
||||
@@ -237,7 +256,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
||||
@Cordova({
|
||||
observable: true,
|
||||
})
|
||||
onMessageReceived(): Observable<any> {
|
||||
onMessageReceived<T = { [key: string]: string }>(): Observable<MessagePayload & T> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -849,10 +868,11 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
||||
* using a string other than retry to name that event if you are counting a different type of event.
|
||||
*
|
||||
* @param {string} name
|
||||
* @param {string} counterName
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
incrementCounter(name: string): Promise<any> {
|
||||
incrementCounter(name: string, counterName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
69
src/@awesome-cordova-plugins/plugins/gcdwebserver/index.ts
Executable file
69
src/@awesome-cordova-plugins/plugins/gcdwebserver/index.ts
Executable file
@@ -0,0 +1,69 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Plugin,
|
||||
Cordova,
|
||||
CordovaProperty,
|
||||
CordovaInstance,
|
||||
InstanceProperty,
|
||||
AwesomeCordovaNativePlugin,
|
||||
} from '@awesome-cordova-plugins/core';
|
||||
|
||||
export interface ServerOptions {
|
||||
port?: number;
|
||||
folder?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name gcdwebserver
|
||||
* @description
|
||||
* This plugin can start an HTTP server using GCDWebServer
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { GCDWebServer } from '@awesome-cordova-plugins/gcdwebserver';
|
||||
*
|
||||
*
|
||||
* constructor(private gcdwebserver: GCDWebServer) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* await this.gcdwebserver.startServer({});
|
||||
*
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'gcdwebserver',
|
||||
plugin: 'cordova-plugin-gcdwebserver',
|
||||
pluginRef: 'cordova.plugins.GCDServer',
|
||||
repo: 'https://github.com/xulihang/cordova-plugin-gcdwebserver',
|
||||
install: '',
|
||||
installVariables: [],
|
||||
platforms: ['iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class GCDWebServer extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* start the server
|
||||
* @param options {ServerOptions}
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
})
|
||||
startServer(options: ServerOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* stop the server
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova({ successIndex: 1, errorIndex: 2 })
|
||||
stopServer(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -237,6 +237,26 @@ export class HTTP extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure X.509 client certificate authentication. Takes mode and options. mode being one of following values:
|
||||
* none: disable client certificate authentication
|
||||
* systemstore (only on Android): use client certificate installed in the Android system store; user will be presented with a list of all installed certificates
|
||||
* buffer: use given client certificate; you will need to provide an options object
|
||||
*
|
||||
* @see https://github.com/silkimen/cordova-plugin-advanced-http#setclientauthmode
|
||||
* @param {string} mode auth mode
|
||||
* @param {object} options useful for buffer mode
|
||||
* @param {ArrayBuffer} options.rawPkcs ArrayBuffer containing raw PKCS12 container with client certificate and private key
|
||||
* @param {string} options.pkcsPassword password of the PKCS container
|
||||
*/
|
||||
@Cordova()
|
||||
setClientAuthMode(
|
||||
mode: 'none' | 'systemstore ' | 'buffer',
|
||||
options?: { rawPkcs: ArrayBuffer; pkcsPassword: string }
|
||||
): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a POST request
|
||||
*
|
||||
|
||||
@@ -1,17 +1,8 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Plugin,
|
||||
Cordova,
|
||||
CordovaProperty,
|
||||
CordovaInstance,
|
||||
InstanceProperty,
|
||||
AwesomeCordovaNativePlugin,
|
||||
} from '@awesome-cordova-plugins/core';
|
||||
import { kMaxLength } from 'buffer';
|
||||
import { resolve } from 'dns';
|
||||
import { reject } from 'lodash';
|
||||
import { error } from 'console';
|
||||
import { AwesomeCordovaNativePlugin, Cordova, Plugin } from '@awesome-cordova-plugins/core';
|
||||
|
||||
const hypertrackIonicPluginVersion = "0.2.0"
|
||||
// Minimal cordova-plugin-hypertrack-v3 version: 0.5.0
|
||||
@Plugin({
|
||||
pluginName: 'cordova-plugin-hypertrack-v3',
|
||||
plugin: 'cordova-plugin-hypertrack-v3',
|
||||
@@ -50,6 +41,9 @@ interface FailureHandler {
|
||||
interface SuccessHandler {
|
||||
(): any;
|
||||
}
|
||||
interface LocationReceiver {
|
||||
(location: CordovaLatestLocationResult): any;
|
||||
}
|
||||
|
||||
// SDK instance that exposed from Cordova utilizes usage of callbacks, so we
|
||||
// wrap it with adapter to avoid mix of callbacks and Promises
|
||||
@@ -75,17 +69,23 @@ interface HyperTrackCordova {
|
||||
syncDeviceSettings(success: SuccessHandler, error: FailureHandler): void;
|
||||
start(success: SuccessHandler, error: FailureHandler): void;
|
||||
stop(success: SuccessHandler, error: FailureHandler): void;
|
||||
getLatestLocation(success: LocationReceiver, error: FailureHandler): void;
|
||||
getCurrentLocation(success: LocationReceiver, error: FailureHandler): void;
|
||||
}
|
||||
|
||||
export class CoordinatesValidationError extends Error {}
|
||||
|
||||
/** Wrapper class for passing spatial geoposition as a geotag's expected location */
|
||||
export class Coordinates {
|
||||
constructor(latitude: number, longitude: number) {
|
||||
constructor(public latitude: number, public longitude: number) {
|
||||
if (latitude < -90.0 || latitude > 90.0 || longitude < -180.0 || longitude > 180.0) {
|
||||
throw new CoordinatesValidationError('latitude and longitude should be of correct valaues');
|
||||
throw new CoordinatesValidationError('latitude and longitude should be of correct values');
|
||||
}
|
||||
}
|
||||
|
||||
public toString = (): string => {
|
||||
return JSON.stringify(this);
|
||||
}
|
||||
}
|
||||
|
||||
/** A blocker is an obstacle that needs to be resolved to achieve reliable tracking. */
|
||||
@@ -100,6 +100,40 @@ export interface Blocker {
|
||||
resolve: () => void;
|
||||
}
|
||||
|
||||
export type CordovaLatestLocationResult = {
|
||||
type: "location",
|
||||
location: Coordinates,
|
||||
} | {
|
||||
type: "outage",
|
||||
outage: {
|
||||
code: number,
|
||||
name: keyof typeof Outage
|
||||
}
|
||||
}
|
||||
|
||||
export type LocationResult = {
|
||||
type: LocationResultType.LOCATION,
|
||||
value: Coordinates
|
||||
} |
|
||||
{
|
||||
type: LocationResultType.OUTAGE,
|
||||
value: Outage
|
||||
}
|
||||
|
||||
export enum LocationResultType {
|
||||
LOCATION, OUTAGE
|
||||
}
|
||||
|
||||
export enum Outage {
|
||||
MISSING_LOCATION_PERMISSION,
|
||||
MISSING_ACTIVITY_PERMISSION,
|
||||
LOCATION_SERVICE_DISABLED,
|
||||
NOT_TRACKING,
|
||||
START_HAS_NOT_FINISHED,
|
||||
NO_GPS_SIGNAL,
|
||||
RESTART_REQUIRED
|
||||
}
|
||||
|
||||
/**
|
||||
* @usage
|
||||
* ```typescript
|
||||
@@ -141,6 +175,7 @@ export class HyperTrack {
|
||||
* @see {@link https://dashboard.hypertrack.com/setup}.
|
||||
*/
|
||||
static initialize(publishableKey: string): Promise<HyperTrack> {
|
||||
console.log(`Hypertrack Ionic plugin version ${hypertrackIonicPluginVersion}`)
|
||||
return new Promise((resolve, reject) => {
|
||||
new HyperTrackPlugin()
|
||||
.initialize(publishableKey)
|
||||
@@ -185,7 +220,7 @@ export class HyperTrack {
|
||||
*
|
||||
* @param name
|
||||
*/
|
||||
setDeviceName(name: string): Promise<any> {
|
||||
setDeviceName(name: string): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.setDeviceName(
|
||||
name,
|
||||
@@ -200,7 +235,7 @@ export class HyperTrack {
|
||||
*
|
||||
* @param metadata key-value pais of properties.
|
||||
*/
|
||||
setDeviceMetadata(metadata: Object): Promise<any> {
|
||||
setDeviceMetadata(metadata: Object): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.setDeviceMetadata(
|
||||
metadata,
|
||||
@@ -216,7 +251,7 @@ export class HyperTrack {
|
||||
* @param title
|
||||
* @param message
|
||||
*/
|
||||
setTrackingNotificationProperties(title: string, message: string): Promise<any> {
|
||||
setTrackingNotificationProperties(title: string, message: string): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.setTrackingNotificationProperties(
|
||||
title,
|
||||
@@ -233,7 +268,7 @@ export class HyperTrack {
|
||||
* @param geotagData
|
||||
* @param expectedLocation
|
||||
*/
|
||||
addGeotag(geotagData: Object, expectedLocation?: Coordinates): Promise<any> {
|
||||
addGeotag(geotagData: Object, expectedLocation?: Coordinates): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.addGeoTag(
|
||||
geotagData,
|
||||
@@ -245,7 +280,7 @@ export class HyperTrack {
|
||||
}
|
||||
|
||||
/** Pops up permission request dialog, if permissions weren't granted before or does nothing otherwise. */
|
||||
requestPermissionsIfNecessary(): Promise<any> {
|
||||
requestPermissionsIfNecessary(): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.requestPermissionsIfNecessary(
|
||||
() => resolve(),
|
||||
@@ -255,7 +290,7 @@ export class HyperTrack {
|
||||
}
|
||||
|
||||
/** Allows injecting false locations into the SDK, which ignores them by default. */
|
||||
allowMockLocations(): Promise<any> {
|
||||
allowMockLocations(): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.allowMockLocations(
|
||||
() => resolve(),
|
||||
@@ -268,7 +303,7 @@ export class HyperTrack {
|
||||
* Synchronizes tracking state with platform model. This method is used to
|
||||
* harden platform2device communication channel.
|
||||
*/
|
||||
syncDeviceSettings(): Promise<any> {
|
||||
syncDeviceSettings(): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.syncDeviceSettings(
|
||||
() => resolve(),
|
||||
@@ -278,7 +313,7 @@ export class HyperTrack {
|
||||
}
|
||||
|
||||
/** Start tracking. */
|
||||
start(): Promise<any> {
|
||||
start(): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.start(
|
||||
() => resolve(),
|
||||
@@ -288,7 +323,7 @@ export class HyperTrack {
|
||||
}
|
||||
|
||||
/** Stop tracking. */
|
||||
stop(): Promise<any> {
|
||||
stop(): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.stop(
|
||||
() => resolve(),
|
||||
@@ -297,5 +332,49 @@ export class HyperTrack {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves latest device location that was sent by the SDK.
|
||||
* Only available for Android platform.
|
||||
* */
|
||||
getLatestLocation(): Promise<LocationResult> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.getLatestLocation(
|
||||
locationResult => resolve(this.handleLocationResult(locationResult)),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves latest device location from system location provider.
|
||||
* Only available for Android platform.
|
||||
* */
|
||||
getCurrentLocation(): Promise<LocationResult> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.cordovaInstanceHandle.getCurrentLocation(
|
||||
locationResult => resolve(this.handleLocationResult(locationResult)),
|
||||
err => reject(err)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
private handleLocationResult(locationResult: CordovaLatestLocationResult): LocationResult {
|
||||
switch (locationResult.type) {
|
||||
case "location": {
|
||||
return {
|
||||
type: LocationResultType.LOCATION,
|
||||
value: locationResult.location
|
||||
}
|
||||
}
|
||||
case "outage": {
|
||||
const outage = Outage[locationResult.outage.name]
|
||||
return {
|
||||
type: LocationResultType.OUTAGE,
|
||||
value: outage
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private constructor(private cordovaInstanceHandle: HyperTrackCordova) {}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,18 @@ export interface Config {
|
||||
*/
|
||||
host: string;
|
||||
/**
|
||||
* Username or email address for authentication.
|
||||
* Optional parameter. Port of the IMAP server to connect.
|
||||
* Default set to: 993
|
||||
*/
|
||||
port?: number;
|
||||
/**
|
||||
* iOS ONLY
|
||||
* Optional parameter. Encryption type to use.
|
||||
* Default set to: TLS/SSL
|
||||
*/
|
||||
connectionType?: ConnectionType;
|
||||
/**
|
||||
* Username or email address for authentication.
|
||||
*/
|
||||
user: string;
|
||||
/**
|
||||
@@ -31,6 +42,45 @@ export interface Connection {
|
||||
exception?: string;
|
||||
}
|
||||
|
||||
export interface MessageHeaders {
|
||||
/**
|
||||
* Message consecutive number.
|
||||
*/
|
||||
messageNumber: number;
|
||||
/**
|
||||
* The name of the folder where the message is contained.
|
||||
*/
|
||||
folder: string;
|
||||
/**
|
||||
* Sender's data.
|
||||
*/
|
||||
from: Address[];
|
||||
/**
|
||||
* TO recipients data.
|
||||
*/
|
||||
toRecipients: Address[];
|
||||
/**
|
||||
* CC recipients data.
|
||||
*/
|
||||
ccRecipients: Address[];
|
||||
/**
|
||||
* BCC recipients data.
|
||||
*/
|
||||
bccRecipients: Address[];
|
||||
/**
|
||||
* The date when the message was received.
|
||||
*/
|
||||
receivedDate: string;
|
||||
/**
|
||||
* Message's subject header.
|
||||
*/
|
||||
subject: string;
|
||||
/**
|
||||
* Message's active flags.
|
||||
*/
|
||||
flags: string[];
|
||||
}
|
||||
|
||||
export interface Message {
|
||||
/**
|
||||
* Message consecutive number.
|
||||
@@ -45,9 +95,9 @@ export interface Message {
|
||||
*/
|
||||
from: Address[];
|
||||
/**
|
||||
* Optional. All recipients data.
|
||||
* All recipients data.
|
||||
*/
|
||||
allRecipients?: Address[];
|
||||
allRecipients: Address[];
|
||||
/**
|
||||
* TO recipients data.
|
||||
*/
|
||||
@@ -61,13 +111,13 @@ export interface Message {
|
||||
*/
|
||||
bccRecipients: Address[];
|
||||
/**
|
||||
* Optional. Reply data.
|
||||
* Reply data.
|
||||
*/
|
||||
replyTo?: Address[];
|
||||
replyTo: Address[];
|
||||
/**
|
||||
* Optional. Date when the message was sent.
|
||||
* Date when the message was sent.
|
||||
*/
|
||||
sentDate?: string;
|
||||
sentDate: string;
|
||||
/**
|
||||
* The date when the message was received.
|
||||
*/
|
||||
@@ -77,41 +127,46 @@ export interface Message {
|
||||
*/
|
||||
subject: string;
|
||||
/**
|
||||
* Android ONLY
|
||||
* Optional. Short description for the message.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Optional.
|
||||
*
|
||||
*/
|
||||
fileName?: string;
|
||||
fileName: string;
|
||||
/**
|
||||
* Android ONLY
|
||||
* Optional.
|
||||
*/
|
||||
disposition?: string;
|
||||
/**
|
||||
* Message's active flags.
|
||||
*/
|
||||
flags: string;
|
||||
flags: string[];
|
||||
/**
|
||||
* Android ONLY
|
||||
* Optional.
|
||||
*/
|
||||
lineCount?: number;
|
||||
/**
|
||||
* Android ONLY
|
||||
* Optional. All Headers available on a message.
|
||||
*/
|
||||
allMessageHeaders?: object;
|
||||
/**
|
||||
* Android ONLY
|
||||
* Optional. Type of message's content.
|
||||
*/
|
||||
contentType?: string;
|
||||
/**
|
||||
* Optional. Message's body with its content and attachments.
|
||||
* Message's body with its content and attachments.
|
||||
*/
|
||||
bodyContent?: Content[];
|
||||
bodyContent: Content[];
|
||||
/**
|
||||
* Optional. Message's memory size.
|
||||
* Message's memory size.
|
||||
*/
|
||||
size?: number;
|
||||
size: number;
|
||||
}
|
||||
|
||||
export interface Address {
|
||||
@@ -124,9 +179,10 @@ export interface Address {
|
||||
*/
|
||||
personal?: string;
|
||||
/**
|
||||
* Data type.
|
||||
* Android ONLY
|
||||
* Optional. Data type.
|
||||
*/
|
||||
type: string;
|
||||
type?: string;
|
||||
}
|
||||
|
||||
export interface Content {
|
||||
@@ -155,8 +211,24 @@ export interface ModificationResult {
|
||||
modifiedMessages: number[];
|
||||
}
|
||||
|
||||
export enum ConnectionType {
|
||||
/**
|
||||
* Clear-text connection for the protocol.
|
||||
*/
|
||||
Clear = 'Clear',
|
||||
/**
|
||||
* Starts with clear-text connection at the beginning, then switch to encrypted connection using TLS/SSL.
|
||||
*/
|
||||
StartTLS = 'StartTLS',
|
||||
/**
|
||||
* Encrypted connection using TLS/SSL.
|
||||
*/
|
||||
TLSSSL = 'TLS/SSL',
|
||||
}
|
||||
|
||||
export enum Comparison {
|
||||
/**
|
||||
* Android ONLY
|
||||
* The less than or equal to operator.
|
||||
*/
|
||||
LE = 'LE',
|
||||
@@ -173,6 +245,7 @@ export enum Comparison {
|
||||
*/
|
||||
NE = 'NE',
|
||||
/**
|
||||
* Android ONLY
|
||||
* The greater than operator.
|
||||
*/
|
||||
GT = 'GT',
|
||||
@@ -199,6 +272,7 @@ export enum FlagEnum {
|
||||
*/
|
||||
FLAGGED = 'FLAGGED',
|
||||
/**
|
||||
* Android ONLY
|
||||
* "RECENT" message flag
|
||||
*/
|
||||
RECENT = 'RECENT',
|
||||
@@ -207,6 +281,7 @@ export enum FlagEnum {
|
||||
*/
|
||||
SEEN = 'SEEN',
|
||||
/**
|
||||
* Android ONLY
|
||||
* "USER" message flag
|
||||
*/
|
||||
USER = 'USER',
|
||||
@@ -214,15 +289,36 @@ export enum FlagEnum {
|
||||
* "DELETED" message flag. Note: Add this flag to delete the message from the mailbox
|
||||
*/
|
||||
DELETED = 'DELETED',
|
||||
/**
|
||||
* iOS ONLY
|
||||
* "SENT" message flag.
|
||||
*/
|
||||
SENT = 'Sent',
|
||||
/**
|
||||
* iOS ONLY
|
||||
* "FORWARDED" message flag.
|
||||
*/
|
||||
FORWARDED = 'Forwarded',
|
||||
/**
|
||||
* iOS ONLY
|
||||
* "SubmitPending" message flag.
|
||||
*/
|
||||
SubmitPending = 'SubmitPending',
|
||||
/**
|
||||
* iOS ONLY
|
||||
* "SUBMITTED" message flag.
|
||||
*/
|
||||
SUBMITTED = 'Submitted',
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Imap
|
||||
* @description
|
||||
* This plugin will enable an Ionic application to use the IMAP (Internet Message Access Protocol) features.
|
||||
* This plugin is in Beta version and it offers support only for Android.
|
||||
* The plugin uses Java Mail API.
|
||||
* Planned improvements and support for iOS.
|
||||
* This plugin will enable a Cordova application to use the IMAP (Internet Message Access Protocol) features
|
||||
* The plugin offers support for Android and iOS.
|
||||
* To enable the IMAP features on Android, this plugin uses the framework [Java Mail API](https://javaee.github.io/javamail/) and for iOS, it uses the [MailCore 2](http://libmailcore.com/) library.
|
||||
*
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Imap } from '@awesome-cordova-plugins/imap/ngx';
|
||||
@@ -235,6 +331,8 @@ export enum FlagEnum {
|
||||
*
|
||||
* this.imap.connect({
|
||||
* host: 'imap.gmail.com',
|
||||
* port: 993,
|
||||
* connectionType: ConnectionType.TLSSSL // (iOS ONLY) Encryption type to use. Default set to: TLS/SSL
|
||||
* user: 'my_email@gmail.com',
|
||||
* password: 'my-pass'
|
||||
* })
|
||||
@@ -253,10 +351,13 @@ export enum FlagEnum {
|
||||
* .then((res: boolean) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* Note: Connected to an IMAP service is REQUIRED to be able to get data from the below functions.
|
||||
* // Note: Connected to an IMAP service is REQUIRED to be able to get data from the below functions.
|
||||
*
|
||||
*
|
||||
* this.imap.listMailFolders()
|
||||
* // listMailFolders('*') using a '*' pattern will return all folder names
|
||||
* // listMailFolders('INBOX*') using a pattern with a folder name will list all the subfolder names of that folder that match the pattern
|
||||
*
|
||||
* this.imap.listMailFolders('*')
|
||||
* .then((res: boolean) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
@@ -284,7 +385,7 @@ export enum FlagEnum {
|
||||
*
|
||||
*
|
||||
* this.imap.listMessagesHeadersByConsecutiveNumber('INBOX', 1200, 1280)
|
||||
* .then((res: Message[]) => {
|
||||
* .then((res: MessageHeaders[]) => {
|
||||
* // Returns array with messages' headers data
|
||||
* console.log(res)
|
||||
* })
|
||||
@@ -294,7 +395,7 @@ export enum FlagEnum {
|
||||
*
|
||||
*
|
||||
* this.imap.listMessagesHeadersByDate('INBOX', 1601503200000, Comparison.GE)
|
||||
* .then((res: Message[]) => {
|
||||
* .then((res: MessageHeaders[]) => {
|
||||
* // Returns array with messages' headers data
|
||||
* console.log(res)
|
||||
* })
|
||||
@@ -313,6 +414,22 @@ export enum FlagEnum {
|
||||
* });
|
||||
*
|
||||
*
|
||||
* this.imap.getFullMessageDataOnNewSession({
|
||||
* host: 'imap.gmail.com',
|
||||
* port: 993,
|
||||
* connectionType: ConnectionType.TLSSSL // (iOS ONLY) Encryption type to use. Default set to: TLS/SSL
|
||||
* user: 'my_email@gmail.com',
|
||||
* password: 'my-pass'
|
||||
* }, 'INBOX', 1205)
|
||||
* .then((res: Message) => {
|
||||
* // Returns "Message" object with the full message data including attachments.
|
||||
* console.log(res)
|
||||
* })
|
||||
* .catch((error: any) => {
|
||||
* console.error(error)
|
||||
* });
|
||||
*
|
||||
*
|
||||
* this.imap.copyToFolder('INBOX', 'Spam', [1204, 1205, 1206, 1207])
|
||||
* .then((res: boolean) => {
|
||||
* // Returns "true" if the process is successful, else returns "false".
|
||||
@@ -323,8 +440,8 @@ export enum FlagEnum {
|
||||
* });
|
||||
*
|
||||
*
|
||||
* Sets a flag on a message
|
||||
* "setFlag()" can be used for deleting messages setting the Delete flag to "FlagEnum.DELETED"
|
||||
* * Sets a flag on a message
|
||||
* * "setFlag()" can be used for deleting messages setting the Delete flag to "FlagEnum.DELETED"
|
||||
* this.imap.setFlag('INBOX', [1206, 1205, 1204], FlagEnum.SEEN, true)
|
||||
* .then((res: ModificationResult) => {
|
||||
*
|
||||
@@ -344,15 +461,14 @@ export enum FlagEnum {
|
||||
plugin: 'cordova-plugin-imap',
|
||||
pluginRef: 'imap',
|
||||
repo: 'https://github.com/aleksandar888/cordova-plugin-imap.git',
|
||||
platforms: ['Android'],
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class Imap extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* This function "connect(clientData: Config)" tries to connect and authenticate with the IMAP server.
|
||||
*
|
||||
* @param clientData {Config} Connection configuration
|
||||
* @returns {Promise<Connection>} Returns a promise with the connection data
|
||||
* @return {Promise<Connection>} Returns a promise with the connection data
|
||||
*/
|
||||
@Cordova()
|
||||
connect(clientData: Config): Promise<Connection> {
|
||||
@@ -361,8 +477,7 @@ export class Imap extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* "disconnect()" Closes the connection with the server.
|
||||
*
|
||||
* @returns {Promise<boolean>} Returns a promise status.
|
||||
* @return {Promise<boolean>} Returns a promise status.
|
||||
*/
|
||||
@Cordova()
|
||||
disconnect(): Promise<boolean> {
|
||||
@@ -371,8 +486,7 @@ export class Imap extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* "isConnected()" Checks the current state of the connection.
|
||||
*
|
||||
* @returns {Promise<boolean>} Returns a promise with connection status
|
||||
* @return {Promise<boolean>} Returns a promise with connection status
|
||||
*/
|
||||
@Cordova()
|
||||
isConnected(): Promise<boolean> {
|
||||
@@ -382,20 +496,27 @@ export class Imap extends AwesomeCordovaNativePlugin {
|
||||
/** Note: Connected to an IMAP service is REQUIRED to be able to get data from the below functions. */
|
||||
|
||||
/**
|
||||
* "listMailFolders()" Lists the name of all the mail folders in the mailbox.
|
||||
* Returns an array of Folder names based on a regular expression pattern.
|
||||
*
|
||||
* @returns {Promise<string[]>} Returns array with all folder names.
|
||||
* Example:
|
||||
*
|
||||
* listMailFolders('*') using a '*' pattern will return all folder names
|
||||
* listMailFolders('INBOX*') using a pattern with a folder name will list all the subfolder names that match the pattern
|
||||
*
|
||||
*
|
||||
* "listMailFolders(pattern: string)" Lists the name of mail folders in the mailbox.
|
||||
* @param pattern {string} Regular expression pattern.
|
||||
* @return {Promise<string[]>} Returns array of folder names matching the pattern.
|
||||
*/
|
||||
@Cordova()
|
||||
listMailFolders(): Promise<string[]> {
|
||||
listMailFolders(pattern: string): Promise<string[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "getMessageCountByFolderName(folderName: string)" Gets the count of the messages in the folder.
|
||||
*
|
||||
* @param folderName {string} The name of the desired folder.
|
||||
* @returns {Promise<number>} Returns the consecutive number of the last message.
|
||||
* @return {Promise<number>} Returns the consecutive number of the last message.
|
||||
*/
|
||||
@Cordova()
|
||||
getMessageCountByFolderName(folderName: string): Promise<number> {
|
||||
@@ -404,11 +525,10 @@ export class Imap extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* "searchMessagesByDatePeriod(folderName: string, dateInMilliseconds: number, comparison: Comparison)" Returns the messages' consecutive number.
|
||||
*
|
||||
* @param folderName {string} The name of the desired folder
|
||||
* @param dateInMilliseconds {number} Date in milliseconds
|
||||
* @param comparison {Comparison} A comparison operator
|
||||
* @returns {Promise<number[]>} Returns array with the messages' consecutive numbers.
|
||||
* @return {Promise<number[]>} Returns array with the messages' consecutive numbers.
|
||||
*/
|
||||
@Cordova()
|
||||
searchMessagesByDatePeriod(
|
||||
@@ -421,40 +541,37 @@ export class Imap extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* "listMessagesHeadersByConsecutiveNumber(folderName: string, start: number, end: number)" Returns messages' headers data based on a "start" and "end" message consecutive number.
|
||||
*
|
||||
* @param folderName {string} The name of the desired folder
|
||||
* @param start {number} Consecutive number of the first message.
|
||||
* @param end {number} Consecutive number of the last message
|
||||
* @returns {Promise<Message[]>} Returns array with the messages' headers data.
|
||||
* @return {Promise<MessageHeaders[]>} Returns array with the messages' headers data.
|
||||
*/
|
||||
@Cordova()
|
||||
listMessagesHeadersByConsecutiveNumber(folderName: string, start: number, end: number): Promise<Message[]> {
|
||||
listMessagesHeadersByConsecutiveNumber(folderName: string, start: number, end: number): Promise<MessageHeaders[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "listMessagesHeadersByDate(folderName: string, dateInMilliseconds: number, comparison: Comparison)" Returns messages' headers data based on a date.
|
||||
*
|
||||
* @param folderName {string} The name of the desired folder
|
||||
* @param dateInMilliseconds {number} Date in milliseconds.
|
||||
* @param comparison {Comparison} A comparison operator
|
||||
* @returns {Promise<Message[]>} Returns array messages' headers data.
|
||||
* @return {Promise<MessageHeaders[]>} Returns array messages' headers data.
|
||||
*/
|
||||
@Cordova()
|
||||
listMessagesHeadersByDate(
|
||||
folderName: string,
|
||||
dateInMilliseconds: number,
|
||||
comparison: Comparison
|
||||
): Promise<Message[]> {
|
||||
): Promise<MessageHeaders[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "getFullMessageData(folderName: string, messageNumber: number)" Returns the full message's data including its attachments.
|
||||
*
|
||||
* @param folderName {string} The name the message's folder
|
||||
* "getFullMessageData(folderName: string, messageNumber: number)" Returns the full message data including its attachments.
|
||||
* @param folderName {string} The name the message's folder.
|
||||
* @param messageNumber {number} Message's consecutive number.
|
||||
* @returns {Promise<Message>} Returns "Message" object with full message data.
|
||||
* @return {Promise<Message>} Returns "Message" object with full message data.
|
||||
*/
|
||||
@Cordova()
|
||||
getFullMessageData(folderName: string, messageNumber: number): Promise<Message> {
|
||||
@@ -462,12 +579,26 @@ export class Imap extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* "copyToFolder(sourceFolder: string, destinationFolder: string, messageNums: number[])" Copy messages to a desired folder.
|
||||
*
|
||||
* This function "getFullMessageDataOnNewSession(clientData: Config, folderName: string, messageNumber: number)" downloads the full message data using a
|
||||
* separate session with the server. It is suitable for downloading message data while the app is already connected to a third server.
|
||||
* "getFullMessageDataOnNewSession(clientData: Config, folderName: string, messageNumber: number)" Returns the full message data including its attachments.
|
||||
* @param clientData {Config} Connection configuration.
|
||||
* @param folderName {string} The name the message's folder.
|
||||
* @param messageNumber {number} Message's consecutive number.
|
||||
* @return {Promise<Message>} Returns "Message" object with full message data.
|
||||
*/
|
||||
@Cordova()
|
||||
getFullMessageDataOnNewSession(clientData: Config, folderName: string, messageNumber: number): Promise<Message> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* "copyToFolder(sourceFolder: string, destinationFolder: string, messageNums: number[])" Copy messages to a desired folder.
|
||||
* @param sourceFolder {string} The name of the source folder.
|
||||
* @param destinationFolder {string} The name of the destination folder.
|
||||
* @param messageNums {number[]} Array with messages' consecutive numbers or array with single message consecutive number.
|
||||
* @returns {Promise<Message>} Returns boolean status of the process.
|
||||
* @return {Promise<Message>} Returns boolean status of the process.
|
||||
*/
|
||||
@Cordova()
|
||||
copyToFolder(sourceFolder: string, destinationFolder: string, messageNums: number[]): Promise<boolean> {
|
||||
@@ -476,12 +607,11 @@ export class Imap extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* "setFlag(folderName: string, messageNums: number[], flag: FlagEnum, status: boolean)" Set or remove flag from a message
|
||||
*
|
||||
* @param folderName {string} The name of the source folder where the messages are contained.
|
||||
* @param messageNums {number[]} Array with messages' consecutive numbers or array with single message consecutive number
|
||||
* @param flag {FlagEnum} Desired message flag.
|
||||
* @param status {boolean} Set status to "true" to set the flag on a message; or to "false" to remove the flag from the message
|
||||
* @returns {Promise<ModificationResult>} Returns object with status and array with messages' consecutive numbers of the modified messages
|
||||
* @return {Promise<ModificationResult>} Returns object with status and array with messages' consecutive numbers of the modified messages
|
||||
*/
|
||||
@Cordova()
|
||||
setFlag(folderName: string, messageNums: number[], flag: FlagEnum, status: boolean): Promise<ModificationResult> {
|
||||
|
||||
@@ -505,6 +505,7 @@ export class IAPError {
|
||||
* | +--> APPROVED +--------------------------------+--> FINISHED +--> OWNED
|
||||
* | |
|
||||
* +-------------------------------------------------------------+
|
||||
* ```
|
||||
*
|
||||
* #### Notes
|
||||
*
|
||||
@@ -744,7 +745,13 @@ export class InAppPurchase2 extends AwesomeCordovaNativePlugin {
|
||||
products: IAPProducts;
|
||||
|
||||
@CordovaProperty()
|
||||
validator: string | ((url: string | IAPProduct, callback: Function) => void);
|
||||
validator:
|
||||
| string
|
||||
| ((url: string | IAPProduct, callback: Function) => void)
|
||||
| {
|
||||
url: string;
|
||||
headers?: { [token: string]: string };
|
||||
};
|
||||
|
||||
@CordovaProperty()
|
||||
applicationUsername: string | (() => string);
|
||||
@@ -914,4 +921,11 @@ export class InAppPurchase2 extends AwesomeCordovaNativePlugin {
|
||||
/** Opens the Manage Billing page (AppStore, Play, Microsoft, ...), where the user can update his/her payment methods. */
|
||||
@Cordova({ sync: true })
|
||||
manageBilling(): void {}
|
||||
|
||||
/** Open the subscription price change notification workflow. (Play) See: https://developer.android.com/google/play/billing/subscriptions#price-change-communicate */
|
||||
@Cordova({ sync: true })
|
||||
launchPriceChangeConfirmationFlow(
|
||||
productId: string,
|
||||
callback: (status: 'OK' | 'UnknownProduct' | 'UserCanceled') => void
|
||||
): void {}
|
||||
}
|
||||
|
||||
@@ -246,4 +246,14 @@ export class Intercom extends AwesomeCordovaNativePlugin {
|
||||
setBottomPadding(bottomPadding: string | number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Programmatically display a Survey
|
||||
* @param surveyId {string}
|
||||
* @returns {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
displaySurvey(surveyId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-ios-keychain`. For more info, please see the [Keychain plugin docs](https://github.com/ionic-team/cordova-plugin-ios-keychain).
|
||||
*
|
||||
* See also [Secure Storage](https://ionicframework.com/docs/native/secure-storage/) for more supported platforms.
|
||||
* See also [Secure Storage](https://ionic.io/docs/secure-storage) for more supported platforms.
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Keychain } from '@awesome-cordova-plugins/keychain/ngx';
|
||||
@@ -17,7 +17,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.keychain.set(key, value).then(() => {
|
||||
* this.keychain.set(key, value, false).then(() => {
|
||||
* this.keychain.get(key)
|
||||
* .then(value => console.log('Got value', value))
|
||||
* .catch(err => console.error('Error getting', err));
|
||||
@@ -57,7 +57,7 @@ export class Keychain extends AwesomeCordovaNativePlugin {
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse',
|
||||
})
|
||||
set(key: string, value: string | number | boolean, useTouchID?: boolean): Promise<any> {
|
||||
set(key: string, value: string | number | boolean, useTouchID: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -322,8 +322,8 @@ export class LaunchNavigator extends AwesomeCordovaNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 2,
|
||||
errorIndex: 3,
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
})
|
||||
navigate(destination: string | number[], options?: LaunchNavigatorOptions): Promise<any> {
|
||||
return;
|
||||
|
||||
89
src/@awesome-cordova-plugins/plugins/lets-cooee/index.ts
Normal file
89
src/@awesome-cordova-plugins/plugins/lets-cooee/index.ts
Normal file
@@ -0,0 +1,89 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-plugins/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/**
|
||||
* @name Lets Cooee
|
||||
* @description
|
||||
* AI driven Personalised Notifications for Better Customer Engagement
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Cooee } from '@awesome-cordova-plugins/lets-cooee/nx';
|
||||
*
|
||||
*
|
||||
* constructor(private cooee: Cooee) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.cooee.functionName('Hello', 123)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Cooee',
|
||||
plugin: '@letscooee/cordova-plugin',
|
||||
pluginRef: 'cordova.plugins.Cooee',
|
||||
repo: 'https://github.com/letscooee/cordova-plugin-cooee',
|
||||
install: 'ionic cordova plugin add @letscooee/cordova-plugin --variable COOEE_APP_ID=appId',
|
||||
installVariables: ['COOEE_APP_ID'],
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class Cooee extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Send the given user data and user properties to the server.
|
||||
* @return {Promise<any>} Returns a promise so user can be notified.
|
||||
* @param eventName {string} Name of the event
|
||||
* @param eventProperties {Record<string, any>} Properties of the event
|
||||
*/
|
||||
@Cordova()
|
||||
sendEvent(eventName: string, eventProperties: Record<string, any>): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the given user data and user properties to the server.
|
||||
* @return {Promise<any>} Returns a promise so user can be notified.
|
||||
* @param userProfile {Record<string, any>} User data to send to the server
|
||||
*/
|
||||
@Cordova()
|
||||
updateUserProfile(userProfile: Record<string, any>): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the given screen name with every event.
|
||||
* @return {Promise<any>} Returns a promise so user can be notified.
|
||||
* @param screenName {string} Screen name to send to the server
|
||||
*/
|
||||
@Cordova()
|
||||
setCurrentScreen(screenName: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide Cooee's userID assigned to the current user.
|
||||
* @return {Promise<any>} Returns a promise with userId.
|
||||
*/
|
||||
@Cordova()
|
||||
getUserID(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides callback for the onCooeeCTAListener event.
|
||||
* @return {Observable<Any>} Returns an observable record.
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'onCooeeCTAListener',
|
||||
element: document,
|
||||
})
|
||||
addCooeeCTAListener(): Observable<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
87
src/@awesome-cordova-plugins/plugins/magnetometer/index.ts
Normal file
87
src/@awesome-cordova-plugins/plugins/magnetometer/index.ts
Normal file
@@ -0,0 +1,87 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-plugins/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface MagnetometerReading {
|
||||
/**
|
||||
* X reading of magnetometer. (Number)
|
||||
*/
|
||||
x: number;
|
||||
/**
|
||||
* Y reading of magnetometer. (Number)
|
||||
*/
|
||||
y: number;
|
||||
/**
|
||||
* Z reading of magnetometer. (Number)
|
||||
*/
|
||||
z: number;
|
||||
/**
|
||||
* Calculated total - always positive of magnetometer. (Number)
|
||||
*/
|
||||
magnitude: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Device eMagnetometer
|
||||
* @description
|
||||
* Requires Cordova plugin: `cordova-plugin-magnetometer`. For more info, please see the [Device Orientation docs](https://github.com/sdesalas/cordova-plugin-magnetometer).
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* // MagnetometerReading is an interface for compass
|
||||
* import { Magnetometer, MagnetometerReading } from '@awesome-cordova-plugins/device-orientation/ngx';
|
||||
*
|
||||
* constructor(private magnetometer: Magnetometer) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* // Get the device current compass heading
|
||||
* this.magnetometer.getReading().then(
|
||||
* (data: MagnetometerReading) => console.log(data),
|
||||
* (error: any) => console.log(error)
|
||||
* );
|
||||
*
|
||||
* // Watch the device compass heading change
|
||||
* var subscription = this.magnetometer.watchReadings().subscribe(
|
||||
* (data: MagnetometerReading) => console.log(data)
|
||||
* );
|
||||
*
|
||||
* // Stop watching heading change
|
||||
* subscription.unsubscribe();
|
||||
* ```
|
||||
* @interfaces
|
||||
* MagnetometerReading
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Magnetometer',
|
||||
plugin: 'cordova-plugin-magnetometer',
|
||||
pluginRef: 'cordova.plugins.magnetometer',
|
||||
repo: 'https://github.com/sdesalas/cordova-plugin-magnetometer',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class Magnetometer extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Get the current compass reading.
|
||||
* @returns {Promise<MagnetometerReading>}
|
||||
*/
|
||||
@Cordova()
|
||||
getReading(): Promise<MagnetometerReading> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Get the device current heading at a regular interval
|
||||
*
|
||||
* Stop the watch by unsubscribing from the observable
|
||||
* @param {DeviceOrientationCompassOptions} [options] Options for compass. Frequency and Filter. Optional
|
||||
* @returns {Observable<DeviceOrientationCompassHeading>} Returns an observable that contains the compass heading
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse',
|
||||
observable: true,
|
||||
clearFunction: 'stop',
|
||||
})
|
||||
watchReadings(): Observable<MagnetometerReading> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
57
src/@awesome-cordova-plugins/plugins/market/index.ts
Normal file
57
src/@awesome-cordova-plugins/plugins/market/index.ts
Normal file
@@ -0,0 +1,57 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
|
||||
/**
|
||||
* @name Market
|
||||
* @description
|
||||
* Opens an app's page in the market place (Google Play, App Store)
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Market } from '@awesome-cordova-plugins/market/ngx';
|
||||
*
|
||||
* constructor(private market: Market) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.market.open('your.package.name');
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Market',
|
||||
plugin: 'cordova-plugin-market',
|
||||
pluginRef: 'cordova.plugins.market',
|
||||
repo: 'https://github.com/xmartlabs/cordova-plugin-market',
|
||||
platforms: ['Android', 'iOS'],
|
||||
})
|
||||
@Injectable()
|
||||
export class Market extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Opens an app in Google Play / App Store
|
||||
* @param appId {string} Package name
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
callbackStyle: 'object',
|
||||
successName: 'success',
|
||||
errorName: 'failure',
|
||||
})
|
||||
open(appId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Search apps by keyword
|
||||
* @param keyword {string} Keyword
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
callbackStyle: 'object',
|
||||
successName: 'success',
|
||||
errorName: 'failure',
|
||||
platforms: ['Android'],
|
||||
})
|
||||
search(keyword: string): Promise<any> {
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,8 @@ export type Event =
|
||||
| 'userUpdated'
|
||||
| 'personalized'
|
||||
| 'depersonalized'
|
||||
| 'inAppChat.availabilityUpdated'
|
||||
| 'inAppChat.unreadMessageCounterUpdated'
|
||||
| 'deeplink';
|
||||
|
||||
export interface CustomEvent {
|
||||
@@ -32,7 +34,7 @@ export interface Configuration {
|
||||
/**
|
||||
* Message storage save callback
|
||||
*/
|
||||
messageStorage?: string;
|
||||
messageStorage?: CustomMessageStorage;
|
||||
defaultMessageStorage?: boolean;
|
||||
ios?: {
|
||||
notificationTypes?: string[]; // ['alert', 'badge', 'sound']
|
||||
@@ -43,6 +45,15 @@ export interface Configuration {
|
||||
notificationIcon?: string; // a resource name for a status bar icon (without extension), located in '/platforms/android/app/src/main/res/mipmap'
|
||||
multipleNotifications?: boolean; // set to 'true' to enable multiple notifications
|
||||
notificationAccentColor?: string; // set to hex color value in format '#RRGGBB' or '#AARRGGBB'
|
||||
firebaseOptions?: {
|
||||
apiKey: string;
|
||||
applicationId: string;
|
||||
databaseUrl?: string;
|
||||
gaTrackingId?: string;
|
||||
gcmSenderId?: string;
|
||||
storageBucket?: string;
|
||||
projectId: string;
|
||||
};
|
||||
};
|
||||
privacySettings?: {
|
||||
applicationCodePersistingDisabled?: boolean;
|
||||
@@ -52,10 +63,10 @@ export interface Configuration {
|
||||
};
|
||||
notificationCategories?: [
|
||||
{
|
||||
identifier?: string;
|
||||
identifier: string;
|
||||
actions?: [
|
||||
{
|
||||
identifier?: string;
|
||||
identifier: string;
|
||||
title?: string;
|
||||
foreground?: boolean;
|
||||
authenticationRequired?: boolean;
|
||||
@@ -71,7 +82,7 @@ export interface Configuration {
|
||||
}
|
||||
|
||||
export interface UserData {
|
||||
externalUserId: string;
|
||||
externalUserId?: string;
|
||||
firstName?: string;
|
||||
lastName?: string;
|
||||
middleName?: string;
|
||||
@@ -117,6 +128,22 @@ export interface PersonalizeContext {
|
||||
forceDepersonalize?: boolean;
|
||||
}
|
||||
|
||||
export interface GeoData {
|
||||
area: GeoArea;
|
||||
}
|
||||
|
||||
export interface GeoArea {
|
||||
id: string;
|
||||
center: GeoCenter;
|
||||
radius: number;
|
||||
title: string;
|
||||
}
|
||||
|
||||
export interface GeoCenter {
|
||||
lat: number;
|
||||
lon: number;
|
||||
}
|
||||
|
||||
export interface Message {
|
||||
messageId: string;
|
||||
title?: string;
|
||||
@@ -138,12 +165,14 @@ export interface Message {
|
||||
browserUrl?: string;
|
||||
deeplink?: string;
|
||||
webViewUrl?: string;
|
||||
inAppOpenTitle?: string | undefined;
|
||||
inAppDismissTitle?: string;
|
||||
}
|
||||
|
||||
export interface MobileMessagingError {
|
||||
code: string;
|
||||
message: string;
|
||||
description: string;
|
||||
domain?: string;
|
||||
}
|
||||
|
||||
export interface ChatConfig {
|
||||
@@ -174,6 +203,62 @@ export class DefaultMessageStorage {
|
||||
}
|
||||
}
|
||||
|
||||
export class CustomMessageStorage {
|
||||
/**
|
||||
* Will be called by the plugin when messages are received and it's time to save them to the storage
|
||||
*
|
||||
* @param array of message objects to save to storage
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
save(messages: Message[]) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Will be called by the plugin to find a message by message id
|
||||
*
|
||||
* @param callback has to be called on completion with one parameter - found message object
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
find(messageId: string, callback: (message: Message) => void) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Will be called by the plugin to find all messages in the storage
|
||||
*
|
||||
* @param callback has to be called on completion with one parameter - an array of available messages
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
findAll(callback: (messages: Message[]) => void) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Will be called by the plugin when its time to initialize the storage
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
start() {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Will be called by the plugin when its time to deinitialize the storage
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
stop() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
export interface ChatSettingsIOS {
|
||||
title: string;
|
||||
sendButtonColor: string;
|
||||
navigationBarItemsColor: string;
|
||||
navigationBarColor: string;
|
||||
navigationBarTitleColor: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Mobile Messaging
|
||||
* @description
|
||||
@@ -472,4 +557,33 @@ export class MobileMessaging extends AwesomeCordovaNativePlugin {
|
||||
showChat(config?: ChatConfig): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup chat settings for iOS only
|
||||
*
|
||||
* @param settings
|
||||
*/
|
||||
@Cordova()
|
||||
setupiOSChatSettings(settings: ChatSettingsIOS): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns unread in-app chat push messages counter.
|
||||
* The counter increments each time the application receives in-app chat push message
|
||||
* (this usually happens when chat screen is inactive or the application is in background/terminated state).
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
getMessageCounter(onResult: (counter: number) => void) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* MobileMessaging plugin automatically resets the counter to 0 whenever user opens the in-app chat screen.
|
||||
* However, use the following API in case you need to manually reset the counter.
|
||||
*/
|
||||
@Cordova()
|
||||
resetMessageCounter() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
319
src/@awesome-cordova-plugins/plugins/newrelic/index.ts
Normal file
319
src/@awesome-cordova-plugins/plugins/newrelic/index.ts
Normal file
@@ -0,0 +1,319 @@
|
||||
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
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -2,22 +2,6 @@ import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-plugins/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/**
|
||||
* @deprecated use ATTRIBUTION_NETWORK instead
|
||||
*
|
||||
* Enum for attribution networks
|
||||
* @readonly
|
||||
* @enum {number}
|
||||
*/
|
||||
export enum ATTRIBUTION_NETWORKS {
|
||||
APPLE_SEARCH_ADS = 0,
|
||||
ADJUST = 1,
|
||||
APPSFLYER = 2,
|
||||
BRANCH = 3,
|
||||
TENJIN = 4,
|
||||
FACEBOOK = 5,
|
||||
}
|
||||
|
||||
export enum ATTRIBUTION_NETWORK {
|
||||
APPLE_SEARCH_ADS = 0,
|
||||
ADJUST = 1,
|
||||
@@ -71,18 +55,6 @@ export enum BILLING_FEATURE {
|
||||
PRICE_CHANGE_CONFIRMATION,
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use PURCHASE_TYPE instead
|
||||
*
|
||||
* Enum for attribution networks
|
||||
* @readonly
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum ProductType {
|
||||
SUBS = 'subs',
|
||||
INAPP = 'inapp',
|
||||
}
|
||||
|
||||
export enum PRORATION_MODE {
|
||||
UNKNOWN_SUBSCRIPTION_UPGRADE_DOWNGRADE_POLICY = 0,
|
||||
|
||||
@@ -172,6 +144,10 @@ 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,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -211,7 +187,7 @@ export enum INTRO_ELIGIBILITY_STATUS {
|
||||
* constructor(public platform: Platform, private purchases: Purchases) {
|
||||
* platform.ready().then(() => {
|
||||
* this.purchases.setDebugLogsEnabled(true); // Enable to get debug logs
|
||||
* this.purchases.setup("my_api_key", "my_app_user_id");
|
||||
* this.purchases.configure("my_api_key", "my_app_user_id");
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
@@ -229,15 +205,15 @@ export enum INTRO_ELIGIBILITY_STATUS {
|
||||
* PurchasesOfferings
|
||||
* PurchasesOffering
|
||||
* PurchasesPackage
|
||||
* PurchasesProduct
|
||||
* PurchaserInfo
|
||||
* PurchasesStoreProduct
|
||||
* CustomerInfo
|
||||
* PurchasesEntitlementInfos
|
||||
* PurchasesEntitlementInfo
|
||||
* PurchasesTransaction
|
||||
* PurchasesStoreTransaction
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Purchases',
|
||||
plugin: 'cordova-plugin-purchases@2.3.0',
|
||||
plugin: 'cordova-plugin-purchases@3.2.1',
|
||||
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']
|
||||
@@ -246,7 +222,6 @@ export enum INTRO_ELIGIBILITY_STATUS {
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
static ATTRIBUTION_NETWORKS = ATTRIBUTION_NETWORK;
|
||||
/**
|
||||
* Enum for attribution networks
|
||||
*
|
||||
@@ -295,6 +270,8 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
static INTRO_ELIGIBILITY_STATUS = INTRO_ELIGIBILITY_STATUS;
|
||||
|
||||
/**
|
||||
* @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
|
||||
@@ -307,28 +284,14 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
* suite, otherwise it will use standardUserDefaults. Default is null, which will make the SDK use standardUserDefaults.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setup(apiKey: string, appUserID?: string | null, observerMode = false, userDefaultsSuiteName?: string): void {}
|
||||
configure(apiKey: string, appUserID?: string | null, observerMode = false, userDefaultsSuiteName?: string): 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
|
||||
* Sets up Purchases with your API key and an app user id.
|
||||
* @param {PurchasesConfiguration} Object containing configuration parameters
|
||||
*/
|
||||
@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({ apiKey, appUserID, observerMode, userDefaultsSuiteName, useAmazon }: PurchasesConfiguration): void {}
|
||||
|
||||
/**
|
||||
* Gets the Offerings configured in the dashboard
|
||||
@@ -345,22 +308,19 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
*
|
||||
* @param {string[]} productIdentifiers Array of product identifiers
|
||||
* @param {PURCHASE_TYPE} type Optional type of products to fetch, can be inapp or subs. Subs by default
|
||||
* @returns {Promise<PurchasesProduct[]>} Will return a [PurchasesError] if the products are not properly configured in RevenueCat or if there is another error retrieving them.
|
||||
* @returns {Promise<PurchasesStoreProduct[]>} Will return a [PurchasesError] if the products are not properly configured in RevenueCat or if there is another error retrieving them.
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
getProducts(productIdentifiers: string[], type: PURCHASE_TYPE = PURCHASE_TYPE.SUBS): Promise<PurchasesProduct[]> {
|
||||
getProducts(
|
||||
productIdentifiers: string[],
|
||||
type: PURCHASE_TYPE = PURCHASE_TYPE.SUBS
|
||||
): Promise<PurchasesStoreProduct[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {Object} MakePurchaseResponse
|
||||
* @property {string} productIdentifier - The product identifier that has been purchased
|
||||
* @property {PurchaserInfo} purchaserInfo - The new PurchaserInfo after the successful purchase
|
||||
*/
|
||||
|
||||
/**
|
||||
* Make a purchase
|
||||
*
|
||||
@@ -379,7 +339,7 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
productIdentifier: string,
|
||||
upgradeInfo?: UpgradeInfo | null,
|
||||
type: PURCHASE_TYPE = PURCHASE_TYPE.SUBS
|
||||
): Promise<{ productIdentifier: string; purchaserInfo: PurchaserInfo }> {
|
||||
): Promise<{ productIdentifier: string; customerInfo: CustomerInfo }> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -399,17 +359,17 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
purchasePackage(
|
||||
aPackage: PurchasesPackage,
|
||||
upgradeInfo?: UpgradeInfo | null
|
||||
): Promise<{ productIdentifier: string; purchaserInfo: PurchaserInfo }> {
|
||||
): Promise<{ productIdentifier: string; customerInfo: CustomerInfo }> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restores a user's previous purchases and links their appUserIDs to any user's also using those purchases.
|
||||
*
|
||||
* @returns {Promise<PurchaserInfo>} Errors are of type [PurchasesError]
|
||||
* @returns {Promise<CustomerInfo>} Errors are of type [PurchasesError]
|
||||
*/
|
||||
@Cordova()
|
||||
restoreTransactions(): Promise<PurchaserInfo> {
|
||||
restorePurchases(): Promise<CustomerInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -428,7 +388,7 @@ 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 purchaserInfo after logging in, as well as a boolean indicating
|
||||
* @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()
|
||||
@@ -440,45 +400,10 @@ 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<PurchaserInfo>} new purchaser info after resetting.
|
||||
* @returns {Promise<CustomerInfo>} new purchaser info after resetting.
|
||||
*/
|
||||
@Cordova()
|
||||
logOut(): Promise<PurchaserInfo> {
|
||||
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<PurchaserInfo>} 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<PurchaserInfo> {
|
||||
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<PurchaserInfo>} 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<PurchaserInfo> {
|
||||
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<PurchaserInfo>} 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<PurchaserInfo> {
|
||||
logOut(): Promise<CustomerInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -486,25 +411,25 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
* 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<PurchaserInfo>} Errors are of type [PurchasesError] and get normally triggered if there
|
||||
* @returns {Promise<CustomerInfo>} Errors are of type [PurchasesError] and get normally triggered if there
|
||||
* is an error retrieving the purchaser info.
|
||||
*/
|
||||
@Cordova()
|
||||
getPurchaserInfo(): Promise<PurchaserInfo> {
|
||||
getCustomerInfo(): Promise<CustomerInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an observable that can be used to receive updates on the purchaser info
|
||||
*
|
||||
* @returns {Observable<PurchaserInfo>}
|
||||
* @returns {Observable<CustomerInfo>}
|
||||
*/
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'onPurchaserInfoUpdated',
|
||||
event: 'onCustomerInfoUpdated',
|
||||
element: 'window',
|
||||
})
|
||||
onPurchaserInfoUpdated(): Observable<PurchaserInfo> {
|
||||
onCustomerInfoUpdated(): Observable<CustomerInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -542,6 +467,12 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
@Cordova({ sync: true })
|
||||
setAutomaticAppleSearchAdsAttributionCollection(enabled: boolean): void {}
|
||||
|
||||
/**
|
||||
* Enable automatic collection of Apple Search Ads attribution using AdServices. Disabled by default.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
enableAdServicesAttributionTokenCollection(): void {}
|
||||
|
||||
/**
|
||||
* @returns {Promise<boolean>} A boolean indicating if the `appUserID` has been generated
|
||||
* by RevenueCat or not.
|
||||
@@ -596,17 +527,17 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Invalidates the cache for purchaser information.
|
||||
* Invalidates the cache for customer information.
|
||||
*
|
||||
* Most apps will not need to use this method; invalidating the cache can leave your app in an invalid state.
|
||||
* Refer to https://docs.revenuecat.com/docs/purchaserinfo#section-get-user-information for more information on
|
||||
* Refer to https://docs.revenuecat.com/docs/customer-info#section-get-user-information for more information on
|
||||
* using the cache properly.
|
||||
*
|
||||
* This is useful for cases where purchaser information might have been updated outside of the
|
||||
* This is useful for cases where customer information might have been updated outside of the
|
||||
* app, like if a promotional subscription is granted through the RevenueCat dashboard.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
invalidatePurchaserInfoCache(): void {}
|
||||
invalidateCustomerInfoCache(): void {}
|
||||
|
||||
/**
|
||||
* iOS only. Presents a code redemption sheet, useful for redeeming offer codes
|
||||
@@ -661,6 +592,87 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
@Cordova({ sync: true })
|
||||
setPushToken(pushToken: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the Adjust Id for the user
|
||||
* Required for the RevenueCat Adjust integration
|
||||
*
|
||||
* @param adjustID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setAdjustID(adjustID: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the AppsFlyer Id for the user
|
||||
* Required for the RevenueCat AppsFlyer integration
|
||||
*
|
||||
* @param appsflyerID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setAppsflyerID(appsflyerID: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the Facebook SDK Anonymous Id for the user
|
||||
* Recommended for the RevenueCat Facebook integration
|
||||
*
|
||||
* @param fbAnonymousID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setFBAnonymousID(fbAnonymousID: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the mParticle Id for the user
|
||||
* Recommended for the RevenueCat mParticle integration
|
||||
*
|
||||
* @param mparticleID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setMparticleID(mparticleID: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the OneSignal Player Id for the user
|
||||
* Required for the RevenueCat OneSignal integration
|
||||
*
|
||||
* @param onesignalID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setOnesignalID(onesignalID: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the Airship Channel Id for the user
|
||||
* Required for the RevenueCat Airship integration
|
||||
*
|
||||
* @param airshipChannelID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setAirshipChannelID(airshipChannelID: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the Firebase App Instance ID for the user
|
||||
* Required for the RevenueCat Firebase integration
|
||||
*
|
||||
* @param firebaseAppInstanceID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setFirebaseAppInstanceID(firebaseAppInstanceID: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the Mixpanel Distinct ID for the user
|
||||
* Required for the RevenueCat Mixpanel integration
|
||||
*
|
||||
* @param mixpanelDistinctID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setMixpanelDistinctID(mixpanelDistinctID: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the CleverTap ID for the user
|
||||
* Required for the RevenueCat CleverTap integration
|
||||
*
|
||||
* @param cleverTapID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setCleverTapID(cleverTapID: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the install media source for the user
|
||||
*
|
||||
@@ -709,51 +721,6 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
@Cordova({ sync: true })
|
||||
setCreative(creative: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the Adjust Id for the user
|
||||
* Required for the RevenueCat Adjust integration
|
||||
*
|
||||
* @param adjustID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setAdjustID(adjustID: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the AppsFlyer Id for the user
|
||||
* Required for the RevenueCat AppsFlyer integration
|
||||
*
|
||||
* @param appsflyerID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setAppsflyerID(appsflyerID: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the Facebook SDK Anonymous Id for the user
|
||||
* Recommended for the RevenueCat Facebook integration
|
||||
*
|
||||
* @param fbAnonymousID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setFBAnonymousID(fbAnonymousID: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the mParticle Id for the user
|
||||
* Recommended for the RevenueCat mParticle integration
|
||||
*
|
||||
* @param mparticleID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setMparticleID(mparticleID: string | null): void {}
|
||||
|
||||
/**
|
||||
* Subscriber attribute associated with the OneSignal Player Id for the user
|
||||
* Required for the RevenueCat OneSignal integration
|
||||
*
|
||||
* @param onesignalID Empty String or null will delete the subscriber attribute.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setOnesignalID(onesignalID: string | null): void {}
|
||||
|
||||
/**
|
||||
* Automatically collect subscriber attributes associated with the device identifiers.
|
||||
* $idfa, $idfv, $ip on iOS
|
||||
@@ -769,9 +736,8 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
* Note: Billing features are only relevant to Google Play Android users.
|
||||
* For other stores and platforms, billing features won't be checked.
|
||||
*
|
||||
* @param feature An array of feature types to check for support. Feature types must be one of
|
||||
* @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.
|
||||
* @param features
|
||||
* @returns {Promise<boolean>} Or [PurchasesError] if there is an error.
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -787,21 +753,6 @@ export class Purchases extends AwesomeCordovaNativePlugin {
|
||||
@Cordova({ sync: true })
|
||||
setProxyURL(url: string): void {}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use PurchasesProduct instead
|
||||
*/
|
||||
export interface RCProduct {}
|
||||
|
||||
/**
|
||||
* @deprecated use PurchaserInfo instead
|
||||
*/
|
||||
export interface RCPurchaserInfo {}
|
||||
|
||||
/**
|
||||
* @deprecated use PurchasesError instead
|
||||
*/
|
||||
export interface RCError {}
|
||||
/**
|
||||
* The EntitlementInfo object gives you access to all of the information about the status of a user entitlement.
|
||||
*/
|
||||
@@ -875,11 +826,38 @@ export interface PurchasesEntitlementInfos {
|
||||
* Map of active EntitlementInfo (`PurchasesEntitlementInfo`) objects keyed by entitlement identifier.
|
||||
*/
|
||||
readonly active: { [key: string]: PurchasesEntitlementInfo };
|
||||
/**
|
||||
* Dictionary of active ``EntitlementInfo`` objects keyed by their identifiers.
|
||||
* @ Note: When queried from the sandbox environment, it only returns entitlements active in sandbox.
|
||||
* When queried from production, this only returns entitlements active in production.
|
||||
*/
|
||||
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 };
|
||||
}
|
||||
|
||||
export interface PurchaserInfo {
|
||||
export interface PurchasesStoreTransaction {
|
||||
/**
|
||||
* Entitlements attached to this purchaser info
|
||||
* RevenueCat Id associated to the transaction.
|
||||
*/
|
||||
readonly transactionIdentifier: string;
|
||||
/**
|
||||
* Product Id associated with the transaction.
|
||||
*/
|
||||
readonly productIdentifier: string;
|
||||
/**
|
||||
* Purchase date of the transaction in ISO 8601 format.
|
||||
*/
|
||||
readonly purchaseDate: string;
|
||||
}
|
||||
|
||||
export interface CustomerInfo {
|
||||
/**
|
||||
* Entitlements attached to this customer info
|
||||
*/
|
||||
readonly entitlements: PurchasesEntitlementInfos;
|
||||
/**
|
||||
@@ -894,7 +872,7 @@ export interface PurchaserInfo {
|
||||
* Returns all the non-subscription purchases a user has made.
|
||||
* The purchases are ordered by purchase date in ascending order.
|
||||
*/
|
||||
readonly nonSubscriptionTransactions: PurchasesTransaction[];
|
||||
readonly nonSubscriptionTransactions: PurchasesStoreTransaction[];
|
||||
/**
|
||||
* The latest expiration date of all purchased skus
|
||||
*/
|
||||
@@ -943,22 +921,65 @@ export interface PurchaserInfo {
|
||||
readonly managementURL: string | null;
|
||||
}
|
||||
|
||||
export interface PurchasesTransaction {
|
||||
export interface PurchasesIntroPrice {
|
||||
/**
|
||||
* RevenueCat Id associated to the transaction.
|
||||
* Price in the local currency.
|
||||
*/
|
||||
readonly revenueCatId: string;
|
||||
readonly price: number;
|
||||
/**
|
||||
* Product Id associated with the transaction.
|
||||
* Formatted price, including its currency sign, such as €3.99.
|
||||
*/
|
||||
readonly productId: string;
|
||||
readonly priceString: string;
|
||||
/**
|
||||
* Purchase date of the transaction in ISO 8601 format.
|
||||
* Number of subscription billing periods for which the user will be given the discount, such as 3.
|
||||
*/
|
||||
readonly purchaseDate: string;
|
||||
readonly cycles: number;
|
||||
/**
|
||||
* Billing period of the discount, specified in ISO 8601 format.
|
||||
*/
|
||||
readonly period: string;
|
||||
/**
|
||||
* Unit for the billing period of the discount, can be DAY, WEEK, MONTH or YEAR.
|
||||
*/
|
||||
readonly periodUnit: string;
|
||||
/**
|
||||
* Number of units for the billing period of the discount.
|
||||
*/
|
||||
readonly periodNumberOfUnits: number;
|
||||
}
|
||||
|
||||
export interface PurchasesProduct {
|
||||
export interface PurchasesStoreProductDiscount {
|
||||
/**
|
||||
* Identifier of the discount.
|
||||
*/
|
||||
readonly identifier: string;
|
||||
/**
|
||||
* Price in the local currency.
|
||||
*/
|
||||
readonly price: number;
|
||||
/**
|
||||
* Formatted price, including its currency sign, such as €3.99.
|
||||
*/
|
||||
readonly priceString: string;
|
||||
/**
|
||||
* Number of subscription billing periods for which the user will be given the discount, such as 3.
|
||||
*/
|
||||
readonly cycles: number;
|
||||
/**
|
||||
* Billing period of the discount, specified in ISO 8601 format.
|
||||
*/
|
||||
readonly period: string;
|
||||
/**
|
||||
* Unit for the billing period of the discount, can be DAY, WEEK, MONTH or YEAR.
|
||||
*/
|
||||
readonly periodUnit: string;
|
||||
/**
|
||||
* Number of units for the billing period of the discount.
|
||||
*/
|
||||
readonly periodNumberOfUnits: number;
|
||||
}
|
||||
|
||||
export interface PurchasesStoreProduct {
|
||||
/**
|
||||
* Product Id.
|
||||
*/
|
||||
@@ -978,35 +999,19 @@ export interface PurchasesProduct {
|
||||
/**
|
||||
* Formatted price of the item, including its currency sign, such as €3.99.
|
||||
*/
|
||||
readonly price_string: string;
|
||||
readonly priceString: string;
|
||||
/**
|
||||
* Currency code for price and original price.
|
||||
*/
|
||||
readonly currency_code: string;
|
||||
readonly currencyCode: string;
|
||||
/**
|
||||
* Introductory price of a subscription in the local currency.
|
||||
* Introductory price.
|
||||
*/
|
||||
readonly intro_price: number | null;
|
||||
readonly introPrice: PurchasesIntroPrice | null;
|
||||
/**
|
||||
* Formatted introductory price of a subscription, including its currency sign, such as €3.99.
|
||||
* Collection of discount offers for a product. Null for Android.
|
||||
*/
|
||||
readonly intro_price_string: string | null;
|
||||
/**
|
||||
* Billing period of the introductory price, specified in ISO 8601 format.
|
||||
*/
|
||||
readonly intro_price_period: string | null;
|
||||
/**
|
||||
* Number of subscription billing periods for which the user will be given the introductory price, such as 3.
|
||||
*/
|
||||
readonly intro_price_cycles: number | null;
|
||||
/**
|
||||
* Unit for the billing period of the introductory price, can be DAY, WEEK, MONTH or YEAR.
|
||||
*/
|
||||
readonly intro_price_period_unit: string | null;
|
||||
/**
|
||||
* Number of units for the billing period of the introductory price.
|
||||
*/
|
||||
readonly intro_price_period_number_of_units: number | null;
|
||||
readonly discounts: PurchasesStoreProductDiscount[] | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1025,7 +1030,7 @@ export interface PurchasesPackage {
|
||||
/**
|
||||
* Product assigned to this package.
|
||||
*/
|
||||
readonly product: PurchasesProduct;
|
||||
readonly product: PurchasesStoreProduct;
|
||||
/**
|
||||
* Offering this package belongs to.
|
||||
*/
|
||||
@@ -1134,13 +1139,43 @@ export interface IntroEligibility {
|
||||
*/
|
||||
export interface LogInResult {
|
||||
/**
|
||||
* The Purchaser Info for the user.
|
||||
* The Customer Info for the user.
|
||||
*/
|
||||
readonly purchaserInfo: PurchaserInfo;
|
||||
readonly customerInfo: CustomerInfo;
|
||||
/**
|
||||
* True if the call resulted in a new user getting created in the RevenueCat backend.
|
||||
*/
|
||||
readonly created: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds parameters to initialize the SDK.
|
||||
*/
|
||||
export interface PurchasesConfiguration {
|
||||
/**
|
||||
* RevenueCat API Key. Needs to be a string
|
||||
*/
|
||||
apiKey: string;
|
||||
/**
|
||||
* A unique id for identifying the user
|
||||
*/
|
||||
appUserID?: string | null;
|
||||
/**
|
||||
* 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
|
||||
* to acknowledge the purchases yourself.
|
||||
*/
|
||||
observerMode?: boolean;
|
||||
/**
|
||||
* An optional string. iOS-only, will be ignored for Android.
|
||||
* Set this if you would like the RevenueCat SDK to store its preferences in a different NSUserDefaults
|
||||
* suite, otherwise it will use standardUserDefaults. Default is null, which will make the SDK use standardUserDefaults.
|
||||
*/
|
||||
userDefaultsSuiteName?: string;
|
||||
/**
|
||||
* An optional boolean. Android only. Required to configure the plugin to be used in the Amazon Appstore.
|
||||
*/
|
||||
useAmazon?: boolean;
|
||||
}
|
||||
|
||||
export type ShouldPurchasePromoProductListener = (deferredPurchase: () => void) => void;
|
||||
|
||||
@@ -7,7 +7,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
||||
* This plugin retrives the SMS which arrive without requiring READ permissions.
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { SmsRetriever } from '@awesome-cordova-plugins/sms-retriever';
|
||||
* import { SmsRetriever } from '@awesome-cordova-plugins/sms-retriever/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private smsRetriever: SmsRetriever) { }
|
||||
@@ -41,7 +41,7 @@ export class SmsRetriever extends AwesomeCordovaNativePlugin {
|
||||
* @returns {Promise<string>} Returns a promise that resolves when retrives SMS text or TIMEOUT after 5 min.
|
||||
*/
|
||||
@Cordova()
|
||||
startWatching(): Promise<string> {
|
||||
startWatching(): Promise<{ Message: string }> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ export class SocialSharing extends AwesomeCordovaNativePlugin {
|
||||
shareWithOptions(options: {
|
||||
message?: string;
|
||||
subject?: string;
|
||||
files?: string | string[];
|
||||
files?: string[];
|
||||
url?: string;
|
||||
chooserTitle?: string;
|
||||
}): Promise<any> {
|
||||
|
||||
@@ -634,7 +634,7 @@ export type CommandsArray = Array<PrintCommand>;
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.starprnt.portDiscovery('all')
|
||||
* this.starprnt.portDiscovery('All')
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
@@ -880,7 +880,7 @@ export class StarPRNT extends AwesomeCordovaNativePlugin {
|
||||
* @returns {Promise<any>} Success! if printed correctly or error message string returned by the SDK.
|
||||
*/
|
||||
@Cordova()
|
||||
printRawText(port: string, emulation: string, printObj: PrintObj): Promise<any> {
|
||||
printRawText(port: string|null, emulation: string, printObj: PrintObj): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -893,7 +893,7 @@ export class StarPRNT extends AwesomeCordovaNativePlugin {
|
||||
* @returns {Promise<any>} Success! if printed correctly or error message string returned by the SDK.
|
||||
*/
|
||||
@Cordova()
|
||||
printRasterReceipt(port: string, emulation: string, rasterObj: RasterObj): Promise<any> {
|
||||
printRasterReceipt(port: string|null, emulation: string, rasterObj: RasterObj): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -906,7 +906,7 @@ export class StarPRNT extends AwesomeCordovaNativePlugin {
|
||||
* @returns {Promise<any>} Success! if printed correctly or error message string returned by the SDK.
|
||||
*/
|
||||
@Cordova()
|
||||
printImage(port: string, emulation: string, imageObj: ImageObj): Promise<any> {
|
||||
printImage(port: string|null, emulation: string, imageObj: ImageObj): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -918,7 +918,7 @@ export class StarPRNT extends AwesomeCordovaNativePlugin {
|
||||
* @returns {Promise<any>} Success! if opened or error message string returned by the SDK.
|
||||
*/
|
||||
@Cordova()
|
||||
openCashDrawer(port: string, emulation: string): Promise<any> {
|
||||
openCashDrawer(port: string|null, emulation: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -931,7 +931,7 @@ export class StarPRNT extends AwesomeCordovaNativePlugin {
|
||||
* @returns {Promise<any>} Success! if printed correctly or error message string returned by the SDK.
|
||||
*/
|
||||
@Cordova()
|
||||
print(port: string, emulation: string, commandsArray: CommandsArray): Promise<any> {
|
||||
print(port: string|null, emulation: string, commandsArray: CommandsArray): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ export class SumUpKeys {
|
||||
* .then((res: SumUpResponse) => console.log(res))
|
||||
* .catch((error: SumUpResponse) => console.error(error));
|
||||
*
|
||||
* this.sumUp.pay(10.0, 'EUR')
|
||||
* this.sumUp.pay(10.0, 'Transaction title', 'EUR')
|
||||
* .then((res: SumUpPayment) => console.log(res))
|
||||
* .catch((error: SumUpPayment) => console.error(error));
|
||||
*
|
||||
@@ -203,16 +203,38 @@ export class SumUp extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Will setup the SumUP SDK.
|
||||
* This action is required before using other functions.
|
||||
*
|
||||
* @returns {Promise<SumUpResponse>} Return a SumUpResponse object
|
||||
*/
|
||||
@Cordova()
|
||||
setup(): Promise<SumUpResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the SumUp integration using SDK tests.
|
||||
*
|
||||
* @returns {Promise<SumUpResponse>} Return a SumUpResponse object
|
||||
*/
|
||||
@Cordova()
|
||||
test(): Promise<SumUpResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a native SumUp window to proceed a payment. Parameter amount and currencycode are required.
|
||||
* If the Payment was successful it returns an SumUpPayment object with information about the payment.
|
||||
*
|
||||
* @param amount {number}
|
||||
* @param currencycode {string}
|
||||
* @param title {string}
|
||||
* @param currencyCode {string}
|
||||
* @returns {Promise<SumUpResponse>} Return a SumUpResponse object
|
||||
*/
|
||||
@Cordova()
|
||||
pay(amount: number, currencycode: string): Promise<SumUpPayment> {
|
||||
pay(amount: number, title?: string, currencyCode?: string): Promise<SumUpPayment> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,229 +1,372 @@
|
||||
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Plugin,
|
||||
Cordova,
|
||||
CordovaProperty,
|
||||
CordovaInstance,
|
||||
InstanceProperty,
|
||||
AwesomeCordovaNativePlugin,
|
||||
} from '@awesome-cordova-plugins/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface TealConfig {
|
||||
/**
|
||||
* Your Tealium account name
|
||||
*/
|
||||
export enum Collectors {
|
||||
AppData = 'AppData',
|
||||
Connectivity = 'Connectivity',
|
||||
DeviceData = 'DeviceData',
|
||||
Lifecycle = 'Lifecycle',
|
||||
}
|
||||
|
||||
export enum Dispatchers {
|
||||
Collect = 'Collect',
|
||||
TagManagement = 'TagManagement',
|
||||
RemoteCommands = 'RemoteCommands',
|
||||
}
|
||||
|
||||
export enum Expiry {
|
||||
forever = 'forever',
|
||||
untilRestart = 'untilRestart',
|
||||
session = 'session',
|
||||
}
|
||||
|
||||
export enum ConsentPolicy {
|
||||
ccpa = 'ccpa',
|
||||
gdpr = 'gdpr',
|
||||
}
|
||||
|
||||
export interface TealiumDispatch {
|
||||
dataLayer: Map<string, any>;
|
||||
type: string;
|
||||
toJson(): string;
|
||||
}
|
||||
|
||||
export class TealiumView implements TealiumDispatch {
|
||||
public type = 'view';
|
||||
constructor(public viewName: string, public dataLayer: Map<string, any>) {}
|
||||
toJson() {
|
||||
const dictionary: any = {};
|
||||
dictionary['type'] = this.type;
|
||||
dictionary['dataLayer'] = {};
|
||||
this.dataLayer.forEach((k, v) => {
|
||||
dictionary['dataLayer'][k] = v;
|
||||
});
|
||||
dictionary['type'] = this.type;
|
||||
dictionary['viewName'] = this.viewName;
|
||||
return JSON.stringify(dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
export class TealiumEvent implements TealiumDispatch {
|
||||
public type = 'event';
|
||||
constructor(public eventName: string, public dataLayer: Map<string, any>) {}
|
||||
toJson() {
|
||||
const dictionary: any = {};
|
||||
dictionary['type'] = this.type;
|
||||
dictionary['dataLayer'] = {};
|
||||
this.dataLayer.forEach((k, v) => {
|
||||
dictionary['dataLayer'][k] = v;
|
||||
});
|
||||
dictionary['type'] = this.type;
|
||||
dictionary['eventName'] = this.eventName;
|
||||
return JSON.stringify(dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
export class ConsentExpiry {
|
||||
constructor(public time: number, public unit: TimeUnit) {}
|
||||
}
|
||||
|
||||
export enum TimeUnit {
|
||||
minutes = 'minutes',
|
||||
hours = 'hours',
|
||||
days = 'days',
|
||||
months = 'months',
|
||||
}
|
||||
|
||||
export enum ConsentStatus {
|
||||
consented = 'consented',
|
||||
notConsented = 'notConsented',
|
||||
unknown = 'unknown',
|
||||
}
|
||||
|
||||
export enum LogLevel {
|
||||
dev = 'dev',
|
||||
qa = 'qa',
|
||||
prod = 'prod',
|
||||
silent = 'silent',
|
||||
}
|
||||
|
||||
export enum TealiumEnvironment {
|
||||
dev = 'dev',
|
||||
qa = 'qa',
|
||||
prod = 'prod',
|
||||
}
|
||||
|
||||
export enum ConsentCategories {
|
||||
analytics = 'analytics',
|
||||
affiliates = 'affiliates',
|
||||
displayAds = 'display_ads',
|
||||
email = 'email',
|
||||
personalization = 'personalization',
|
||||
search = 'search',
|
||||
social = 'social',
|
||||
bigData = 'big_data',
|
||||
mobile = 'mobile',
|
||||
engagement = 'engagement',
|
||||
monitoring = 'monitoring',
|
||||
crm = 'crm',
|
||||
cdp = 'cdp',
|
||||
cookieMatch = 'cookiematch',
|
||||
misc = 'misc',
|
||||
}
|
||||
|
||||
export interface TealiumConfig {
|
||||
account: string;
|
||||
/**
|
||||
* Your Tealium profile name
|
||||
*/
|
||||
profile: string;
|
||||
/**
|
||||
* Your Tealium environment name (dev, qa, prod)
|
||||
*/
|
||||
environment: string;
|
||||
/**
|
||||
* Arbitrary instance name string. Must be consistent for all calls to Tealium API.
|
||||
*/
|
||||
instance: string;
|
||||
/**
|
||||
* Enables ("true") or disables ("false") lifecycle reporting. Default true if omitted.
|
||||
*/
|
||||
isLifecycleEnabled?: string;
|
||||
/**
|
||||
* Not usually required. Sets a custom URL override for dispatches to UDH.
|
||||
*/
|
||||
collectDispatchURL?: string;
|
||||
/**
|
||||
* Your Tealium UDH profile. Only active if you do not have collectDispatchURL set.
|
||||
*/
|
||||
collectDispatchProfile?: string;
|
||||
/**
|
||||
* Enables ("true") or disables ("false") Crash Reporter module for Android. Default false if omitted.
|
||||
*/
|
||||
isCrashReporterEnabled?: string;
|
||||
environment: TealiumEnvironment;
|
||||
dataSource?: string;
|
||||
collectors: Collectors[];
|
||||
dispatchers: Dispatchers[];
|
||||
customVisitorId?: string;
|
||||
memoryReportingEnabled?: boolean;
|
||||
overrideCollectURL?: string;
|
||||
overrideCollectBatchURL?: string;
|
||||
overrideCollectDomain?: string;
|
||||
overrideLibrarySettingsURL?: string;
|
||||
overrideTagManagementURL?: string;
|
||||
deepLinkTrackingEnabled?: boolean;
|
||||
qrTraceEnabled?: boolean;
|
||||
loglevel?: LogLevel;
|
||||
consentLoggingEnabled?: boolean;
|
||||
consentPolicy?: ConsentPolicy;
|
||||
consentExpiry?: ConsentExpiry;
|
||||
lifecycleAutotrackingEnabled?: boolean;
|
||||
useRemoteLibrarySettings?: boolean;
|
||||
visitorServiceEnabled?: boolean;
|
||||
visitorServiceRefreshInterval?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @paid
|
||||
* @name Tealium
|
||||
* @description
|
||||
* This plugin provides a TypeScript wrapper around the [Tealium](https://www.tealium.com) Cordova plugin for Ionic Native.
|
||||
* This plugin does provides a wrapper around the Tealium Cordova Plugin for Ionic Native.
|
||||
*
|
||||
* For full documentation, see [https://docs.tealium.com/platforms/cordova/](https://docs.tealium.com/platforms/cordova/)
|
||||
*
|
||||
* For full documentation, see [https://community.tealiumiq.com/t5/Mobile-Libraries/Tealium-for-Cordova/ta-p/17618](https://community.tealiumiq.com/t5/Mobile-Libraries/Tealium-for-Cordova/ta-p/17618)
|
||||
* @usage
|
||||
* ```
|
||||
* import { Tealium, TealConfig } from '@awesome-cordova-plugins/tealium/ngx';
|
||||
* ```typescript
|
||||
* import { Tealium } from '@awesome-cordova-plugins/tealium/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private tealium: Tealium) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* let tealConfig: TealConfig = {
|
||||
* account: "<your-account>",
|
||||
* profile: "<your-profile>",
|
||||
* environment: "<your-environment>", // usually "dev", "qa" or "prod"
|
||||
* isLifecycleEnabled: "true", // pass "false" to disable lifecycle tracking
|
||||
* isCrashReporterEnabled: "false", // pass "true" to enable crash reporter (Android only)
|
||||
* instance: "<your-instance-name" // an arbitrary instance name. use the same instance name for all subsequent API calls
|
||||
* }
|
||||
* let config: TealiumConfig = {
|
||||
* account: <your_tealium_account>,
|
||||
* profile: <your_tealium_profile>,
|
||||
* environment: TealiumEnvironment.dev,
|
||||
* dispatchers: [Dispatchers.Collect, Dispatchers.RemoteCommands, Dispatchers.TagManagement],
|
||||
* collectors: [Collectors.AppData, Collectors.DeviceData, Collectors.Lifecycle, Collectors.Connectivity],
|
||||
* consentLoggingEnabled: true,
|
||||
* consentPolicy: ConsentPolicy.gdpr,
|
||||
* visitorServiceEnabled: true,
|
||||
* // visitorServiceRefreshInterval: '1',
|
||||
* consentExpiry: new ConsentExpiry(3, TimeUnit.minutes),
|
||||
* };
|
||||
*
|
||||
* this.tealium.init(tealConfig).then(()=>{
|
||||
* this.tealium.trackView({"screen_name": "homescreen"});
|
||||
* });
|
||||
* Tealium.initialize(config);
|
||||
*
|
||||
* ```
|
||||
* @interfaces
|
||||
* TealConfig
|
||||
*/
|
||||
|
||||
@Plugin({
|
||||
pluginName: 'Tealium',
|
||||
plugin: 'tealium-cordova-plugin', // npm package name, example: cordova-plugin-camera
|
||||
pluginRef: 'window.tealium', // the variable reference to call the plugin, example: navigator.geolocation
|
||||
plugin: 'tealium-cordova-plugin', // npm package name
|
||||
pluginRef: 'tealium', // the variable reference to call the plugin
|
||||
repo: 'https://github.com/Tealium/cordova-plugin', // the github repository URL for the plugin
|
||||
platforms: ['Android', 'iOS'], // Array of platforms supported, example: ['Android', 'iOS']
|
||||
install: '', // OPTIONAL install command, in case the plugin requires variables
|
||||
installVariables: [], // OPTIONAL the plugin requires variables
|
||||
platforms: ['Android', 'iOS'], // Array of platforms supported
|
||||
})
|
||||
@Injectable()
|
||||
export class Tealium extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* This function initializes the Tealium Cordova plugin.
|
||||
* This should usually be done inside the "deviceReady" handler.
|
||||
*
|
||||
* @param config {TealConfig}
|
||||
* @returns {Promise<any>} Returns a promise that resolves when something happens
|
||||
* This function initializes the Tealium Cordova Plugin
|
||||
* @param config {TealiumConfig}
|
||||
* @param callback
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
init(config: TealConfig): Promise<any> {
|
||||
initialize(config: TealiumConfig, callback?: Function): Promise<any> {
|
||||
return; // We add return; here to avoid any IDE / Compiler errors
|
||||
}
|
||||
|
||||
/**
|
||||
* This function tracks a view event in the Tealium Cordova plugin
|
||||
*
|
||||
* @param dataObject {any} The JSON data object containing your key-value pairs
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @returns {Promise<any>} Returns a promise that resolves when something happens
|
||||
* This function tracks an event
|
||||
* @param dispatch {TealiumDispatch} Dispatch containing event data
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
trackView(dataObject: any, instanceName: string): Promise<any> {
|
||||
track(dispatch: TealiumDispatch): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function tracks a link event in the Tealium Cordova plugin
|
||||
*
|
||||
* @param dataObject {any} The JSON data object containing your key-value pairs
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @returns {Promise<any>} Returns a promise that resolves when something happens
|
||||
* This function terminatest the Tealium instance
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
trackEvent(dataObject: any, instanceName: string): Promise<any> {
|
||||
terminateInstance(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function tracks a custom event in the Tealium Cordova plugin
|
||||
*
|
||||
* @param eventType {string} The event type, link or view
|
||||
* @param dataObject {any} The JSON data object containing your key-value pairs
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @returns {Promise<any>} Returns a promise that resolves when something happens
|
||||
* Adds data to data layer
|
||||
* @param data A map containing the key-value pairs to be added to data layer
|
||||
* @param expiry When the data should expire. Choose `Expiry.session` if unsure.
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
track(eventType: string, dataObject: any, instanceName: string): Promise<any> {
|
||||
addData(data: Map<string, any>, expiry: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function adds data to the Tealium persistent data store
|
||||
*
|
||||
* @param keyName {string} The key name that this data will be stored under for later retrieval
|
||||
* @param value {any} The value to be stored as persistent data
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @returns {Promise<any>} Returns a promise that resolves when something happens
|
||||
* @param key The key of the data to retrieve from the data layer
|
||||
* @param callback
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
addPersistent(keyName: string, value: string | string[] | any, instanceName: string): Promise<any> {
|
||||
getData(key: string, callback?: Function): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function adds data to the Tealium volatile data store
|
||||
*
|
||||
* @param keyName {string} The key name that this data will be stored under for later retrieval
|
||||
* @param value {any} The value to be stored as volatile data
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @returns {Promise<any>} Returns a promise that resolves when something happens
|
||||
* Removes data from the data layer
|
||||
* @param keys The keys of the data to be removed
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
addVolatile(keyName: string, value: string | string[], instanceName: string): Promise<any> {
|
||||
removeData(keys: string[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function removes data from the Tealium volatile data store
|
||||
*
|
||||
* @param keyName {string} The key name that this data will removed from the Tealium data store
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @returns {Promise<any>} Returns a promise that resolves when something happens
|
||||
* Retrieves the user's consent status
|
||||
* @param callback
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
removeVolatile(keyName: string, instanceName: string): Promise<any> {
|
||||
getConsentStatus(callback?: Function): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function removes data from the Tealium persistent data store
|
||||
*
|
||||
* @param keyName {string} The key name that this data will removed from the Tealium data store
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @returns {Promise<any>} Returns a promise that resolves when something happens
|
||||
* Sets the user's consent status
|
||||
* @param consentStatus
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
removePersistent(keyName: string, instanceName: string): Promise<any> {
|
||||
setConsentStatus(consentStatus: ConsentStatus): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function retrieves a value from the Tealium Persistent data store
|
||||
*
|
||||
* @param keyName {string} The key name that this data will retrieved from the Tealium data store
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @param callback {any} A callback function that will be called when the data has been retrieved
|
||||
* @returns {Promise<any>} Returns a promise that resolves when something happens
|
||||
* Retrieves the user's consent categories
|
||||
* @param callback
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
getPersistent(keyName: string, instanceName: string, callback: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* This function retrieves a value from the Tealium Volatile data store
|
||||
*
|
||||
* @param keyName {string} The key name that this data will retrieved from the Tealium data store
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @param callback {any} A callback function that will be called when the data has been retrieved
|
||||
* @returns {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
getVolatile(keyName: string, instanceName: string, callback: any): Promise<any> {
|
||||
getConsentCategories(callback?: Function): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function adds a remote command for later execution
|
||||
*
|
||||
* @param commandName {string} The command name for this Remote Command
|
||||
* @param instanceName {string} Your arbitrary Tealium instance name provided at init time
|
||||
* @param callback {any} A callback function that will be called when the data has been retrieved
|
||||
* @returns {Promise<any>} Returns a promise that resolves when something happens
|
||||
* Sets the user's consent categories
|
||||
* @param categories
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
addRemoteCommand(commandName: string, instanceName: string, callback: any): Promise<any> {
|
||||
setConsentCategories(categories: ConsentCategories[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function retrieves the Tealium Visitor ID
|
||||
*
|
||||
* @returns {Promise<any>} Returns a promise that resolves when something happens
|
||||
* Joins a trace session weith the specified Trace ID
|
||||
* @param id Trace ID
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
getVisitorId(): Promise<any> {
|
||||
joinTrace(id: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Leaves a trace session
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
leaveTrace(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the Tealium Visitor ID
|
||||
* @param callback
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
getVisitorId(callback?: Function): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a listener to be called when the AudienceStream visitor profile is updated
|
||||
* @param callback
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
setVisitorServiceListener(callback?: Function): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a listener to be called when the consent has expired
|
||||
* @param callback
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
setConsentExpiryListener(callback?: Function): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a remote command for later execution
|
||||
* @param id The ID used to invoke the remote command
|
||||
* @param callback
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
addRemoteCommand(id: string, callback?: Function): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a previously-added remote command
|
||||
* @param id The ID of remote command to be removed
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
removeRemoteCommand(id: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all listeners
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
removeListeners(): 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;
|
||||
}
|
||||
}
|
||||
@@ -1635,4 +1635,41 @@ export class UnviredCordovaSDK extends AwesomeCordovaNativePlugin {
|
||||
decrypt(stringToBeDecrypted: string): Promise<UnviredResult> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Supported in browser platform only.
|
||||
* You can make use of this api in order to receive push notifications. No input required.
|
||||
* Upon succesful registration you will get a |evtSource| object on which various events are received.
|
||||
* Usage:
|
||||
* ```
|
||||
* this.unviredSDK.registerForPushNotification((evtSource) => {
|
||||
* evtSource.onopen = function(event) {
|
||||
* console.log(" onopen registerForPushNotification ==========")
|
||||
* };
|
||||
* evtSource.onerror = function(err) {
|
||||
* console.log(" onerror registerForPushNotification ==========")
|
||||
* };
|
||||
* evtSource.onmessage = function(event) {
|
||||
* console.log(" onmessage registerForPushNotification ==========")
|
||||
* }
|
||||
* },
|
||||
* (error) => {
|
||||
* console.log(" error registerForPushNotification ==========")
|
||||
* console.log(error)
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
@Cordova()
|
||||
registerForPushNotification(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Regenerates the JWT token used for communicating with the UMP server.
|
||||
* The updated token will be available via the registered NotificationListener's callback |JWTTokenReceived|
|
||||
*/
|
||||
@Cordova()
|
||||
refreshJWTToken(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,42 @@ import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-plugins/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/**
|
||||
* Interface for UAirship Tag Editor
|
||||
*/
|
||||
export interface TagGroupEditor {
|
||||
addTags(): void;
|
||||
removeTags(): void;
|
||||
apply(): void;
|
||||
addTags(tagGroup: string, tags: string[]): TagGroupEditor;
|
||||
removeTags(tagGroup: string, tags: string[]): TagGroupEditor;
|
||||
apply(success: () => void, failure: (message: string) => void): TagGroupEditor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface for UAirship Attributes Editor
|
||||
*/
|
||||
export interface AttributesEditor {
|
||||
setAttribute(name: string, value: string | number | boolean | Date): AttributesEditor;
|
||||
removeAttribute(name: string): AttributesEditor;
|
||||
apply(success: () => void, failure: (message: string) => void): AttributesEditor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface for UAirship ChannelSubscriptionList Editor
|
||||
*/
|
||||
export interface ChannelSubscriptionListEditor {
|
||||
subscribe(subscriptionListID: string): ChannelSubscriptionListEditor;
|
||||
unsubscribe(subscriptionListID: string): ChannelSubscriptionListEditor;
|
||||
apply(success: () => void, failure: (message: string) => void): ChannelSubscriptionListEditor;
|
||||
}
|
||||
|
||||
export type ContactSubscriptionScope = 'app' | 'email' | 'push' | 'sms';
|
||||
|
||||
/**
|
||||
* Interface for UAirship ContactSubscriptionList Editor
|
||||
*/
|
||||
export interface ContactSubscriptionListEditor {
|
||||
subscribe(subscriptionListID: string, contactScope: ContactSubscriptionScope): ContactSubscriptionListEditor;
|
||||
unsubscribe(subscriptionListID: string, contactScope: ContactSubscriptionScope): ContactSubscriptionListEditor;
|
||||
apply(success: () => void, failure: (message: string) => void): ContactSubscriptionListEditor;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -214,6 +246,7 @@ export class UrbanAirShip extends AwesomeCordovaNativePlugin {
|
||||
* new config will not be used until the next app start.
|
||||
*
|
||||
* @param {object} config The Urban Airship config.
|
||||
* @param {string} config.site Sets the cloud site, must be either EU or US.
|
||||
* @param {object} config.development The Urban Airship development config.
|
||||
* @param {string} config.development.appKey The development appKey.
|
||||
* @param {string} config.development.appSecret The development appSecret.
|
||||
@@ -504,7 +537,7 @@ export class UrbanAirShip extends AwesomeCordovaNativePlugin {
|
||||
* @param {string} failure.message The error message.
|
||||
*/
|
||||
@Cordova()
|
||||
getNamedUser(): Promise<any> {
|
||||
getNamedUser(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -538,24 +571,90 @@ export class UrbanAirShip extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Creates an editor to modify the named user tag groups.
|
||||
*
|
||||
* @returns {TagGroupEditor} A tag group editor instance.
|
||||
*/
|
||||
@Cordova()
|
||||
@Cordova({ sync: true })
|
||||
editNamedUserTagGroups(): TagGroupEditor {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an editor to modify the channel tag groups.
|
||||
*
|
||||
* @returns {TagGroupEditor} A tag group editor instance.
|
||||
*/
|
||||
@Cordova()
|
||||
@Cordova({ sync: true })
|
||||
editChannelTagGroups(): TagGroupEditor {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an editor to modify the channel attributes.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
editChannelAttributes(): AttributesEditor {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an editor to modify the named user attributes.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
editNamedUserAttributes(): AttributesEditor {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an editor to modify the channel subscription lists.
|
||||
*
|
||||
* @returns {ChannelSubscriptionListEditor} A subscription list editor instance.
|
||||
* @since 13.3.0
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
editChannelSubscriptionLists(): ChannelSubscriptionListEditor {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an editor to modify the contact subscription lists.
|
||||
*
|
||||
* @returns {ContactSubscriptionListEditor} A subscription list editor instance.
|
||||
* @since 13.3.0
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
editContactSubscriptionLists(): ContactSubscriptionListEditor {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current set of subscription lists for the current channel,
|
||||
* optionally applying pending subscription list changes that will be applied during the next channel update.
|
||||
* An empty set indicates that this contact is not subscribed to any lists.
|
||||
*
|
||||
* @param {Function} [success] Success callback.
|
||||
* @param {string} failure.message The error message.
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 1,
|
||||
})
|
||||
getChannelSubscriptionLists(): Promise<string[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current set of subscription lists for the current contact,
|
||||
* optionally applying pending subscription list changes that will be applied during the next contact update.
|
||||
* An empty set indicates that this contact is not subscribed to any lists.
|
||||
*
|
||||
* @param {Function} [success] Success callback.
|
||||
* @param {string} failure.message The error message.
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 1,
|
||||
})
|
||||
getContactSubscriptionLists(): Promise<string[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets an associated identifier for the Connect data stream.
|
||||
*
|
||||
@@ -566,7 +665,7 @@ export class UrbanAirShip extends AwesomeCordovaNativePlugin {
|
||||
* @param {string} failure.message The error message.
|
||||
*/
|
||||
@Cordova()
|
||||
setAssociatedIdentifier(key: string, identifier: string): Promise<any> {
|
||||
setAssociatedIdentifier(key: string, identifier: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -592,6 +691,7 @@ export class UrbanAirShip extends AwesomeCordovaNativePlugin {
|
||||
* @param {boolean} success.enabled Flag indicating if location is enabled or not.
|
||||
* @param {function(message)} [failure] Failure callback.
|
||||
* @param {string} failure.message The error message.
|
||||
* @deprecated removed in version 8.0
|
||||
*/
|
||||
@Cordova()
|
||||
isLocationEnabled(): Promise<any> {
|
||||
@@ -605,6 +705,7 @@ export class UrbanAirShip extends AwesomeCordovaNativePlugin {
|
||||
* @param {Function} [success] Success callback.
|
||||
* @param {function(message)} [failure] Failure callback.
|
||||
* @param {string} failure.message The error message.
|
||||
* @deprecated removed in version 8.0
|
||||
*/
|
||||
@Cordova()
|
||||
setBackgroundLocationEnabled(enabled: boolean): Promise<any> {
|
||||
@@ -618,6 +719,7 @@ export class UrbanAirShip extends AwesomeCordovaNativePlugin {
|
||||
* @param {boolean} success.enabled Flag indicating if background location updates are enabled or not.
|
||||
* @param {function(message)} [failure] Failure callback.
|
||||
* @param {string} failure.message The error message.
|
||||
* @deprecated removed in version 8.0
|
||||
*/
|
||||
@Cordova()
|
||||
isBackgroundLocationEnabled(): Promise<any> {
|
||||
@@ -666,6 +768,7 @@ export class UrbanAirShip extends AwesomeCordovaNativePlugin {
|
||||
* @param {Function} [success] Success callback.
|
||||
* @param {function(message)} [failure] Failure callback.
|
||||
* @param {string} failure.message The error message.
|
||||
* @deprecated removed in version 10.0
|
||||
*/
|
||||
@Cordova()
|
||||
dismissOverlayInboxMessage(): Promise<any> {
|
||||
@@ -752,6 +855,7 @@ export class UrbanAirShip extends AwesomeCordovaNativePlugin {
|
||||
* @param {Function} [success] Success callback.
|
||||
* @param {function(message)} [failure] Failure callback.
|
||||
* @param {string} failure.message The error message.
|
||||
* @deprecated removed in version 10.0
|
||||
*/
|
||||
@Cordova()
|
||||
overlayInboxMessage(messageId: string): Promise<any> {
|
||||
@@ -946,4 +1050,135 @@ export class UrbanAirShip extends AwesomeCordovaNativePlugin {
|
||||
addCustomEvent(event: object): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates screen tracking for a specific app screen, must be called once per tracked screen.
|
||||
*
|
||||
* @param {string} screen The screen's string identifier.
|
||||
* @param {Function} [success] Success callback.
|
||||
* @param {function(message)} [failure] Failure callback.
|
||||
* @param {string} failure.message The error message.
|
||||
* @since 11.0.0
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
trackScreen(screen: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables features, adding them to the set of currently enabled features.
|
||||
*
|
||||
* @param {Array<string>} features The features to enable.
|
||||
* @param {Function} [success] Success callback.
|
||||
* @param {function(message)} [failure] Failure callback.
|
||||
* @param {string} failure.message The error message.
|
||||
* @since 13.0.0
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
enableFeature(features: string[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disables features, removing them from the set of currently enabled features.
|
||||
*
|
||||
* @param {Array<string>} features The features to disable.
|
||||
* @param {Function} [success] Success callback.
|
||||
* @param {function(message)} [failure] Failure callback.
|
||||
* @param {string} failure.message The error message.
|
||||
* @since 13.0.0
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
disableFeature(features: string[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the current enabled features, replacing any currently enabled features with the given set.
|
||||
*
|
||||
* @param {Array<string>} features The features to set as enabled.
|
||||
* @param {Function} [success] Success callback.
|
||||
* @param {function(message)} [failure] Failure callback.
|
||||
* @param {string} failure.message The error message.
|
||||
* @since 13.0.0
|
||||
*/
|
||||
setEnabledFeatures(features: string[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current enabled features.
|
||||
*
|
||||
* @param {Function} [success] Success callback.
|
||||
* @param {function(message)} [failure] Failure callback.
|
||||
* @param {string} failure.message The error message.
|
||||
* @since 13.0.0
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 1,
|
||||
})
|
||||
getEnabledFeatures(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if all of the given features are enabled.
|
||||
*
|
||||
* @param {Array<string>} features The features to check.
|
||||
* @param {Function} [success] Success callback.
|
||||
* @param {function(message)} [failure] Failure callback.
|
||||
* @param {string} failure.message The error message.
|
||||
* @since 13.0.0
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
isFeatureEnabled(features: string[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the configuration of the Preference Center with the given ID trough a callback method.
|
||||
*
|
||||
* @param {string} preferenceCenterId The preference center ID.
|
||||
* @param {Function} [success] Success callback.
|
||||
* @param {function(message)} [failure] Failure callback.
|
||||
* @param {string} failure.message The error message.
|
||||
* @since 13.3.0
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
getPreferenceCenterConfig(preferenceCenterId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens the Preference Center with the given preferenceCenterId.
|
||||
*
|
||||
* @param {string} prenferenceCenterId The preference center ID.
|
||||
* @param {Function} [success] Success callback.
|
||||
* @param {function(message)} [failure] Failure callback.
|
||||
* @param {string} failure.message The error message.
|
||||
* @since 13.0.0
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
openPreferenceCenter(prenferenceCenterId: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user