mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-02-04 00:06:19 +08:00
Compare commits
266 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d0f665f6fc | ||
|
|
0254cf730e | ||
|
|
92a99145f8 | ||
|
|
a22ee6ed2b | ||
|
|
1aa89ae311 | ||
|
|
6f4d23d072 | ||
|
|
ecd451ceb3 | ||
|
|
bddc221b60 | ||
|
|
27e844cbc2 | ||
|
|
b8695220ea | ||
|
|
364b30af59 | ||
|
|
860d79828d | ||
|
|
9057dc2c93 | ||
|
|
5223dc7dd5 | ||
|
|
bb77620d0d | ||
|
|
b280ef4c55 | ||
|
|
8e79890251 | ||
|
|
f4a4bb9e55 | ||
|
|
d108776981 | ||
|
|
8a65cc943a | ||
|
|
d2e4d3e5ce | ||
|
|
3440dca70f | ||
|
|
499cc5c075 | ||
|
|
f2961fb4bb | ||
|
|
48082eeaef | ||
|
|
4c56d227a8 | ||
|
|
2fd4885fb1 | ||
|
|
7d756394dd | ||
|
|
f4b03bcce4 | ||
|
|
01bfa5cc5e | ||
|
|
996bf00e85 | ||
|
|
30360fe29d | ||
|
|
88bf517697 | ||
|
|
e6ac206b8d | ||
|
|
00ef998ee5 | ||
|
|
f81e181588 | ||
|
|
08332b7c02 | ||
|
|
86cca49236 | ||
|
|
2718bccccc | ||
|
|
042e36de08 | ||
|
|
ec933011e6 | ||
|
|
2312665792 | ||
|
|
eae8c1000c | ||
|
|
509bd72dde | ||
|
|
fe38903e4b | ||
|
|
1ebf447240 | ||
|
|
4788104931 | ||
|
|
fdd38b97b6 | ||
|
|
409a985142 | ||
|
|
8534061b2f | ||
|
|
275741faed | ||
|
|
4c5d70eacd | ||
|
|
0b43c69993 | ||
|
|
fb5d47bff2 | ||
|
|
7033a1822e | ||
|
|
a840a03e33 | ||
|
|
fb540f7774 | ||
|
|
cb4d5b5064 | ||
|
|
265b4ba02f | ||
|
|
5fc13abb10 | ||
|
|
b7a4e44308 | ||
|
|
a1fb93707f | ||
|
|
a575233f23 | ||
|
|
66f2e155f0 | ||
|
|
5f16fcd292 | ||
|
|
fc6d1d0c7f | ||
|
|
acec6cfb18 | ||
|
|
f5d94d824d | ||
|
|
70d4fcd30e | ||
|
|
5cea6141c4 | ||
|
|
cb543b9841 | ||
|
|
3f172cc2b8 | ||
|
|
98b463b0d3 | ||
|
|
8940301e87 | ||
|
|
493405426c | ||
|
|
fcec2d16b3 | ||
|
|
d9ded4d164 | ||
|
|
141f0e6e41 | ||
|
|
199380c0c3 | ||
|
|
a46e308ea8 | ||
|
|
fb0ee819be | ||
|
|
1b6506f53a | ||
|
|
d539eb4f62 | ||
|
|
cfcd8d16a6 | ||
|
|
6bc1b932c8 | ||
|
|
650615e883 | ||
|
|
8b3b2a4b27 | ||
|
|
2b347fe889 | ||
|
|
8032429faa | ||
|
|
4cb97eeec4 | ||
|
|
1d878c6902 | ||
|
|
e65ce4a879 | ||
|
|
bfa4f62e2b | ||
|
|
1af96d1369 | ||
|
|
dcce3489f4 | ||
|
|
3a5c790a56 | ||
|
|
73493e222f | ||
|
|
26447d22ea | ||
|
|
a55bb60d70 | ||
|
|
4d1e0e6949 | ||
|
|
189570d255 | ||
|
|
64ca73e5cc | ||
|
|
4337515961 | ||
|
|
c0d4a2ee34 | ||
|
|
1f7e6a5d02 | ||
|
|
fd81a5e5b7 | ||
|
|
f3b8e34091 | ||
|
|
5cc91bc79a | ||
|
|
e37a7221b1 | ||
|
|
016023a7bb | ||
|
|
852df98647 | ||
|
|
7696706080 | ||
|
|
2c0aa4f124 | ||
|
|
8bcbc955e0 | ||
|
|
3bb6b59112 | ||
|
|
f6e77db7b0 | ||
|
|
acc587aca2 | ||
|
|
c77bdf17c1 | ||
|
|
0c9bf3bf49 | ||
|
|
f54b9e0797 | ||
|
|
7e08680d31 | ||
|
|
de83edb99b | ||
|
|
fac94485a0 | ||
|
|
9c9ed3518f | ||
|
|
a0779de633 | ||
|
|
50408b08c6 | ||
|
|
767391a4b4 | ||
|
|
a2f5acb48c | ||
|
|
3a3e9338e7 | ||
|
|
8badd2943a | ||
|
|
9a46ab1a6d | ||
|
|
952a5c8e11 | ||
|
|
2a995d94ec | ||
|
|
941d394da9 | ||
|
|
cc1f25c38c | ||
|
|
7aa08109ce | ||
|
|
8ce541ff9a | ||
|
|
75190f5166 | ||
|
|
c697139089 | ||
|
|
717f6864f3 | ||
|
|
e9fa3ee6f2 | ||
|
|
28ce962677 | ||
|
|
f576c5f11e | ||
|
|
f488a75e26 | ||
|
|
55fb503d81 | ||
|
|
afe95a6752 | ||
|
|
2ca8bda8f7 | ||
|
|
2b684fadb1 | ||
|
|
7f2da56a28 | ||
|
|
4a546bd11a | ||
|
|
a0f5254988 | ||
|
|
8521b32306 | ||
|
|
d52278b2d1 | ||
|
|
2fadb6b0e1 | ||
|
|
ad11ed21ac | ||
|
|
5857b9654c | ||
|
|
92d5764e01 | ||
|
|
a4db080786 | ||
|
|
54ac2bfdf5 | ||
|
|
9274083b24 | ||
|
|
d04396e631 | ||
|
|
c4b4584d2d | ||
|
|
1fc09098fe | ||
|
|
b217bdb62a | ||
|
|
1b60247807 | ||
|
|
b75f40c76e | ||
|
|
09ca1a1843 | ||
|
|
6cbb226ed2 | ||
|
|
ed80933b6c | ||
|
|
300d7c229c | ||
|
|
43442ac4ea | ||
|
|
12f2782fef | ||
|
|
a586734b92 | ||
|
|
f58183260d | ||
|
|
a3c49fd17a | ||
|
|
6ee94b93ba | ||
|
|
a0ec1252e0 | ||
|
|
dfb0aa3d5d | ||
|
|
312c126cc8 | ||
|
|
b79c8b1ea0 | ||
|
|
49e81cc414 | ||
|
|
2942ebfae4 | ||
|
|
4ae35cba9a | ||
|
|
bb7b516c50 | ||
|
|
c0b092b242 | ||
|
|
a2fe674a3f | ||
|
|
f12da1f4f5 | ||
|
|
0e7bec3633 | ||
|
|
7588eaf9fd | ||
|
|
c5a9d0d258 | ||
|
|
18e4a9cda6 | ||
|
|
26f63c744d | ||
|
|
1cb4c989f9 | ||
|
|
c80d081c92 | ||
|
|
3e0a7395ca | ||
|
|
4c6dc71cbe | ||
|
|
81a10280cc | ||
|
|
56e4a7827f | ||
|
|
c4fe2b7203 | ||
|
|
0dc320bbd2 | ||
|
|
b4201e1b52 | ||
|
|
9a4bef34bb | ||
|
|
2bc8bdc49c | ||
|
|
e363d98bd8 | ||
|
|
980447673b | ||
|
|
7afed90b56 | ||
|
|
0634e64b58 | ||
|
|
a42e7b8258 | ||
|
|
5b5c6e61ac | ||
|
|
79037743b8 | ||
|
|
ed36dc492d | ||
|
|
1f31954cb3 | ||
|
|
4601ea3e01 | ||
|
|
45c64b0394 | ||
|
|
591c290dbd | ||
|
|
66b9d1a011 | ||
|
|
25ef7c98bc | ||
|
|
19ddf3fb93 | ||
|
|
20a3791a88 | ||
|
|
9800271352 | ||
|
|
e288a5d757 | ||
|
|
ab7c7fa491 | ||
|
|
9e306e7de1 | ||
|
|
92e0cb2385 | ||
|
|
0800f4a414 | ||
|
|
e47774b771 | ||
|
|
c0ce17b170 | ||
|
|
c518c8114d | ||
|
|
21dc1f9a56 | ||
|
|
7ea51fcf06 | ||
|
|
c063652800 | ||
|
|
9024ea516a | ||
|
|
e92b7aeb74 | ||
|
|
dc51c3e1e8 | ||
|
|
4859387925 | ||
|
|
10787c8056 | ||
|
|
f874185a35 | ||
|
|
00e34877f3 | ||
|
|
4de49c37dd | ||
|
|
bd4b2e2bb4 | ||
|
|
aa138c4cfe | ||
|
|
4e60c631ae | ||
|
|
767d3b3dd4 | ||
|
|
39be27566b | ||
|
|
029f82f1fd | ||
|
|
6a19509ded | ||
|
|
c75aeb9c39 | ||
|
|
dcd95582d2 | ||
|
|
354af9fe6f | ||
|
|
49d7ca7375 | ||
|
|
8d91856103 | ||
|
|
5221c8cf41 | ||
|
|
d827db27b0 | ||
|
|
b9e46730e3 | ||
|
|
fcda5ffcab | ||
|
|
6fde61d69c | ||
|
|
c8ff885023 | ||
|
|
06654afae3 | ||
|
|
e1a25af0b5 | ||
|
|
419b68217e | ||
|
|
cd97375e63 | ||
|
|
b0dea6dc58 | ||
|
|
7e090cc6f2 | ||
|
|
c2029f7927 | ||
|
|
5b1bdc37e0 | ||
|
|
e3e8c85087 |
31
.github/workflows/nodejs.yml
vendored
Normal file
31
.github/workflows/nodejs.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Node CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
- name: Build
|
||||
run: npm run build
|
||||
- name: Test
|
||||
run: npm run test
|
||||
- name: Readmes
|
||||
run: npm run readmes
|
||||
env:
|
||||
CI: true
|
||||
38
.github/workflows/npmpublish.yml
vendored
Normal file
38
.github/workflows/npmpublish.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Node.js Package
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
- name: Build
|
||||
run: npm run build
|
||||
- name: Test
|
||||
run: npm run test
|
||||
- name: Readmes
|
||||
run: npm run readmes
|
||||
|
||||
publish-npm:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- run: npm ci
|
||||
- run: npm run shipit
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,6 +4,7 @@ node_modules/
|
||||
.tmp
|
||||
aot/
|
||||
scripts/ionic-native-bower
|
||||
scripts/docs-json/*.json
|
||||
dist/
|
||||
src/@ionic-native/plugins/**/ngx
|
||||
*.d.ts
|
||||
|
||||
2171
CHANGELOG.md
2171
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
@@ -88,8 +88,6 @@ It's just a stub. The `return` is only there to keep the TypeScript type-checker
|
||||
|
||||
By default, the `@Cordova` decorator wraps the plugin callbacks in a Promise that resolves when the success callback is called and rejects when the error callback is called. It also ensures that Cordova and the underlying plugin are available, and prints helpful diagnostics if they aren't.
|
||||
|
||||
You'll also notice that `getCurrentPosition` is a static method. That's because the plugin class is just a utility class to call the underlying Cordova plugin methods, it's not an instance and has no state.
|
||||
|
||||
Next, let's look at the `watchPosition` method.
|
||||
|
||||
```
|
||||
|
||||
@@ -3,7 +3,7 @@ jobs:
|
||||
build:
|
||||
working_directory: ~/ionic-native/
|
||||
docker:
|
||||
- image: node:10
|
||||
- image: node:12
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
key: node_modules_{{ checksum "package.json" }}
|
||||
- run:
|
||||
name: Install node modules
|
||||
command: npm i
|
||||
command: npm ci
|
||||
- save_cache:
|
||||
key: node_modules_{{ checksum "package.json" }}
|
||||
paths:
|
||||
|
||||
13827
package-lock.json
generated
13827
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
64
package.json
64
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ionic-native",
|
||||
"version": "5.2.0",
|
||||
"version": "5.18.0",
|
||||
"description": "Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support",
|
||||
"homepage": "https://ionicframework.com/",
|
||||
"author": "Ionic Team <hi@ionic.io> (https://ionic.io)",
|
||||
@@ -17,49 +17,51 @@
|
||||
"npmpub": "ts-node -P scripts/tsconfig.json scripts/tasks/publish",
|
||||
"lint": "gulp lint",
|
||||
"readmes": "gulp readmes",
|
||||
"docs-json": "ts-node -P scripts/tsconfig.json scripts/docs-json",
|
||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
|
||||
"postchangelog": "git commit -am \"chore(): update changelog\"",
|
||||
"shipit": "npm run build && npm run readmes && npm run npmpub"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/common": "^7.2.5",
|
||||
"@angular/compiler": "^7.2.5",
|
||||
"@angular/compiler-cli": "^7.2.5",
|
||||
"@angular/core": "^7.2.5",
|
||||
"@angular/common": "^8.2.14",
|
||||
"@angular/compiler": "^8.2.14",
|
||||
"@angular/compiler-cli": "^8.2.14",
|
||||
"@angular/core": "^8.2.14",
|
||||
"@types/cordova": "0.0.34",
|
||||
"@types/fs-extra": "^5.0.5",
|
||||
"@types/jest": "^24.0.6",
|
||||
"@types/lodash": "^4.14.121",
|
||||
"@types/node": "^10.12.26",
|
||||
"@types/rimraf": "^2.0.2",
|
||||
"@types/webpack": "^4.4.24",
|
||||
"ajv": "^6.9.1",
|
||||
"async-promise-queue": "^1.0.4",
|
||||
"conventional-changelog-cli": "^2.0.12",
|
||||
"cz-conventional-changelog": "^2.1.0",
|
||||
"dgeni": "^0.4.11",
|
||||
"@types/fs-extra": "^8.0.1",
|
||||
"@types/jest": "^24.0.23",
|
||||
"@types/lodash": "^4.14.149",
|
||||
"@types/node": "^12.12.14",
|
||||
"@types/rimraf": "^2.0.3",
|
||||
"@types/webpack": "^4.41.0",
|
||||
"ajv": "^6.10.2",
|
||||
"async-promise-queue": "^1.0.5",
|
||||
"conventional-changelog-cli": "^2.0.28",
|
||||
"cz-conventional-changelog": "^3.0.2",
|
||||
"dgeni": "^0.4.12",
|
||||
"dgeni-packages": "0.16.10",
|
||||
"fs-extra": "^7.0.1",
|
||||
"gulp": "3.9.1",
|
||||
"gulp-rename": "^1.4.0",
|
||||
"fs-extra": "^8.1.0",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-rename": "^2.0.0",
|
||||
"gulp-replace": "^1.0.0",
|
||||
"gulp-tslint": "^8.1.3",
|
||||
"jest": "^24.1.0",
|
||||
"lodash": "^4.17.11",
|
||||
"gulp-tslint": "^8.1.4",
|
||||
"jest": "^24.9.0",
|
||||
"lodash": "^4.17.15",
|
||||
"minimist": "1.2.0",
|
||||
"natives": "^1.1.6",
|
||||
"rimraf": "^2.6.3",
|
||||
"rxjs": "^6.4.0",
|
||||
"ts-jest": "^24.0.0",
|
||||
"ts-node": "^8.0.2",
|
||||
"tslint": "^5.12.1",
|
||||
"rimraf": "^3.0.0",
|
||||
"rxjs": "^6.5.3",
|
||||
"ts-jest": "^24.2.0",
|
||||
"ts-node": "^8.5.2",
|
||||
"tslint": "^5.20.1",
|
||||
"tslint-ionic-rules": "0.0.21",
|
||||
"typescript": "3.2.4",
|
||||
"uglifyjs-webpack-plugin": "^2.1.1",
|
||||
"typedoc": "^0.15.3",
|
||||
"typescript": "~3.5.3",
|
||||
"uglifyjs-webpack-plugin": "^2.2.0",
|
||||
"unminified-webpack-plugin": "^2.0.0",
|
||||
"webpack": "^4.29.5",
|
||||
"webpack": "^4.41.2",
|
||||
"winston": "^3.2.1",
|
||||
"zone.js": "^0.8.29"
|
||||
"zone.js": "^0.9.1"
|
||||
},
|
||||
"jest": {
|
||||
"transform": {
|
||||
|
||||
101
scripts/docs-json/index.ts
Normal file
101
scripts/docs-json/index.ts
Normal file
@@ -0,0 +1,101 @@
|
||||
import * as fs from 'fs-extra';
|
||||
import { Application } from 'typedoc';
|
||||
import { basename, dirname, resolve } from 'path';
|
||||
import { runInNewContext } from 'vm';
|
||||
|
||||
interface Plugin {
|
||||
packageName: string;
|
||||
displayName: string;
|
||||
description: string;
|
||||
platforms: string[];
|
||||
usage: string;
|
||||
repo: string;
|
||||
installVariables: string[];
|
||||
cordovaPlugin: {
|
||||
name: string;
|
||||
};
|
||||
}
|
||||
|
||||
const rootDir = resolve(__dirname, '../..');
|
||||
const typedocTmp = resolve(__dirname, 'typedoc.tmp.json');
|
||||
const pluginsDir = resolve(rootDir, 'src/@ionic-native/plugins');
|
||||
const typedoc = new Application({
|
||||
mode: 'modules',
|
||||
tsconfig: resolve(rootDir, 'tsconfig.json'),
|
||||
ignoreCompilerErrors: true
|
||||
});
|
||||
|
||||
run(pluginsDir);
|
||||
|
||||
async function run(pluginsDir: string) {
|
||||
const typedocData = await generateTypedoc(pluginsDir);
|
||||
const modules = typedocData.children.filter(isModule);
|
||||
const plugins = modules.filter(hasPlugin).map(processPlugin);
|
||||
await fs.outputJson(resolve(__dirname, 'plugins.json'), plugins, {
|
||||
spaces: 2
|
||||
});
|
||||
}
|
||||
|
||||
async function generateTypedoc(root: string, outputPath = typedocTmp) {
|
||||
const pluginDirs = await fs.readdir(root);
|
||||
const paths = pluginDirs.map(dir => resolve(root, dir, 'index.ts'));
|
||||
typedoc.generateJson(paths, outputPath);
|
||||
return fs.readJson(outputPath);
|
||||
}
|
||||
|
||||
function processPlugin(pluginModule): Plugin {
|
||||
const pluginClass = pluginModule.children.find(isPlugin);
|
||||
const decorator = getPluginDecorator(pluginClass);
|
||||
const packageName = `@ionic-native/${basename(dirname(pluginModule.originalName))}`;
|
||||
const displayName = getTag(pluginClass, 'name');
|
||||
const usage = getTag(pluginClass, 'usage');
|
||||
const description = getTag(pluginClass, 'description');
|
||||
return {
|
||||
packageName,
|
||||
displayName,
|
||||
description,
|
||||
usage,
|
||||
platforms: decorator.platforms,
|
||||
repo: decorator.repo,
|
||||
installVariables: decorator.installVariables,
|
||||
cordovaPlugin: {
|
||||
name: decorator.plugin
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Typedoc only gives us the Plugin decorator internals
|
||||
* as a string. So, rather than try to parse that with a RegExp,
|
||||
* we evaluate it using Node's vm module.
|
||||
*/
|
||||
const getPluginDecorator = (child: any) => {
|
||||
if (isPlugin(child)) {
|
||||
const decorator = child.decorators.find(d => d.name === 'Plugin');
|
||||
return runInNewContext(`(${decorator.arguments.config})`);
|
||||
}
|
||||
};
|
||||
|
||||
const getTag = (child: any, tagName: string): string => {
|
||||
if (hasTags(child)) {
|
||||
const tag = child.comment.tags.find(t => t.tag === tagName);
|
||||
if (tag) {
|
||||
return tag.text;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const isModule = (child: any): boolean =>
|
||||
child.kind === 1;
|
||||
|
||||
const isClass = (child: any): boolean =>
|
||||
child.kind === 128;
|
||||
|
||||
const isPlugin = (child: any): boolean =>
|
||||
isClass(child) && hasTags(child) && Array.isArray(child.decorators) && child.decorators.some(d => d.name === 'Plugin');
|
||||
|
||||
const hasPlugin = (child: any): boolean =>
|
||||
child.children.some(isPlugin);
|
||||
|
||||
const hasTags = (child: any): boolean =>
|
||||
child.comment && Array.isArray(child.comment.tags);
|
||||
3
scripts/docs-json/readme.md
Normal file
3
scripts/docs-json/readme.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# docs-json
|
||||
|
||||
This script reads and generates [typedoc](https://github.com/TypeStrong/typedoc) data for each of the plugins in `src/@ionic-native/plugins`. That data is then formatted and output as `plugins.json` in this directory.
|
||||
@@ -6,35 +6,27 @@ const config = require('./config.json'),
|
||||
Dgeni = require('dgeni');
|
||||
|
||||
module.exports = gulp => {
|
||||
gulp.task('docs', [], () => {
|
||||
gulp.task('docs', () => {
|
||||
try {
|
||||
const ionicPackage = require('./dgeni/dgeni-config')(
|
||||
projectPackage.version
|
||||
),
|
||||
const ionicPackage = require('./dgeni/dgeni-config')(projectPackage.version),
|
||||
dgeni = new Dgeni([ionicPackage]);
|
||||
|
||||
return dgeni
|
||||
.generate()
|
||||
.then(docs => console.log(docs.length + ' docs generated'));
|
||||
return dgeni.generate().then(docs => console.log(docs.length + ' docs generated'));
|
||||
} catch (err) {
|
||||
console.log(err.stack);
|
||||
}
|
||||
});
|
||||
|
||||
gulp.task('readmes', [], function() {
|
||||
gulp.task('readmes', () => {
|
||||
fs.copySync(
|
||||
path.resolve(__dirname, '..', '..', 'README.md'),
|
||||
path.resolve(__dirname, '..', '..', config.pluginDir, 'core', 'README.md')
|
||||
);
|
||||
|
||||
try {
|
||||
const ionicPackage = require('./dgeni/dgeni-readmes-config')(
|
||||
projectPackage.version
|
||||
),
|
||||
const ionicPackage = require('./dgeni/dgeni-readmes-config')(projectPackage.version),
|
||||
dgeni = new Dgeni([ionicPackage]);
|
||||
return dgeni
|
||||
.generate()
|
||||
.then(docs => console.log(docs.length + ' README files generated'));
|
||||
return dgeni.generate().then(docs => console.log(docs.length + ' README files generated'));
|
||||
} catch (err) {
|
||||
console.log(err.stack);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ const DIST = path.resolve(ROOT, 'dist/@ionic-native');
|
||||
const PACKAGES = [];
|
||||
|
||||
const MIN_CORE_VERSION = '^5.1.0';
|
||||
const RXJS_VERSION = '^6.3.0';
|
||||
const RXJS_VERSION = '^5.5.0 || ^6.5.0';
|
||||
|
||||
const PLUGIN_PEER_DEPENDENCIES = {
|
||||
'@ionic-native/core': MIN_CORE_VERSION,
|
||||
|
||||
@@ -43,9 +43,7 @@ import { Observable } from 'rxjs';
|
||||
installVariables: [], // OPTIONAL the plugin requires variables
|
||||
platforms: [] // Array of platforms supported, example: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class {{ PluginName }} extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
|
||||
@@ -43,9 +43,7 @@ import { Observable } from 'rxjs';
|
||||
installVariables: [], // OPTIONAL the plugin requires variables
|
||||
platforms: [] // Array of platforms supported, example: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class {{ PluginName }} extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,23 +1,26 @@
|
||||
export function checkReady() {
|
||||
const DEVICE_READY_TIMEOUT = 5000;
|
||||
if (typeof process === 'undefined') {
|
||||
const win: any = typeof window !== 'undefined' ? window : {};
|
||||
const DEVICE_READY_TIMEOUT = 5000;
|
||||
|
||||
// To help developers using cordova, we listen for the device ready event and
|
||||
// log an error if it didn't fire in a reasonable amount of time. Generally,
|
||||
// when this happens, developers should remove and reinstall plugins, since
|
||||
// an inconsistent plugin is often the culprit.
|
||||
const before = Date.now();
|
||||
// To help developers using cordova, we listen for the device ready event and
|
||||
// log an error if it didn't fire in a reasonable amount of time. Generally,
|
||||
// when this happens, developers should remove and reinstall plugins, since
|
||||
// an inconsistent plugin is often the culprit.
|
||||
const before = Date.now();
|
||||
|
||||
let didFireReady = false;
|
||||
document.addEventListener('deviceready', () => {
|
||||
console.log(`Ionic Native: deviceready event fired after ${Date.now() - before} ms`);
|
||||
didFireReady = true;
|
||||
});
|
||||
let didFireReady = false;
|
||||
win.document.addEventListener('deviceready', () => {
|
||||
console.log(`Ionic Native: deviceready event fired after ${Date.now() - before} ms`);
|
||||
didFireReady = true;
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
if (!didFireReady && window.cordova) {
|
||||
console.warn(
|
||||
`Ionic Native: deviceready did not fire within ${DEVICE_READY_TIMEOUT}ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.`
|
||||
);
|
||||
}
|
||||
}, DEVICE_READY_TIMEOUT);
|
||||
setTimeout(() => {
|
||||
if (!didFireReady && win.cordova) {
|
||||
console.warn(
|
||||
`Ionic Native: deviceready did not fire within ${DEVICE_READY_TIMEOUT}ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.`
|
||||
);
|
||||
}
|
||||
}, DEVICE_READY_TIMEOUT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,9 +20,10 @@ export function getPromise<T>(callback: (resolve: Function, reject?: Function) =
|
||||
}
|
||||
};
|
||||
|
||||
if (window.angular) {
|
||||
if (typeof window !== 'undefined' && window.angular) {
|
||||
const doc = window.document;
|
||||
const injector = window.angular
|
||||
.element(document.querySelector('[ng-app]') || document.body)
|
||||
.element(doc.querySelector('[ng-app]') || doc.body)
|
||||
.injector();
|
||||
if (injector) {
|
||||
const $q = injector.get('$q');
|
||||
@@ -143,12 +144,12 @@ function wrapObservable(pluginObj: any, methodName: string, args: any[], opts: a
|
||||
/**
|
||||
* Wrap the event with an observable
|
||||
* @private
|
||||
* @param event even name
|
||||
* @param event event name
|
||||
* @param element The element to attach the event listener to
|
||||
* @returns {Observable}
|
||||
*/
|
||||
function wrapEventObservable(event: string, element: any): Observable<any> {
|
||||
element = element ? get(window, element) : window;
|
||||
element = (typeof window !== 'undefined' && element) ? get(window, element) : element || (typeof window !== 'undefined' ? window : {});
|
||||
return fromEvent(element, event);
|
||||
}
|
||||
|
||||
@@ -185,7 +186,7 @@ export function checkAvailability(
|
||||
pluginInstance = getPlugin(pluginRef);
|
||||
|
||||
if (!pluginInstance || (!!methodName && typeof pluginInstance[methodName] === 'undefined')) {
|
||||
if (!window.cordova) {
|
||||
if (typeof window === 'undefined' || !window.cordova) {
|
||||
cordovaWarn(pluginName, methodName);
|
||||
return ERR_CORDOVA_NOT_AVAILABLE;
|
||||
}
|
||||
@@ -306,7 +307,10 @@ export function callInstance(
|
||||
}
|
||||
|
||||
export function getPlugin(pluginRef: string): any {
|
||||
return get(window, pluginRef);
|
||||
if (typeof window !== 'undefined') {
|
||||
return get(window, pluginRef);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
export function get(element: Element | Window, path: string) {
|
||||
@@ -346,20 +350,22 @@ export function pluginWarn(pluginName: string, plugin?: string, method?: string)
|
||||
* @param method
|
||||
*/
|
||||
export function cordovaWarn(pluginName: string, method?: string): void {
|
||||
if (method) {
|
||||
console.warn(
|
||||
'Native: tried calling ' +
|
||||
pluginName +
|
||||
'.' +
|
||||
method +
|
||||
', but Cordova is not available. Make sure to include cordova.js or run in a device/simulator'
|
||||
);
|
||||
} else {
|
||||
console.warn(
|
||||
'Native: tried accessing the ' +
|
||||
pluginName +
|
||||
' plugin but Cordova is not available. Make sure to include cordova.js or run in a device/simulator'
|
||||
);
|
||||
if (typeof process === 'undefined') {
|
||||
if (method) {
|
||||
console.warn(
|
||||
'Native: tried calling ' +
|
||||
pluginName +
|
||||
'.' +
|
||||
method +
|
||||
', but Cordova is not available. Make sure to include cordova.js or run in a device/simulator'
|
||||
);
|
||||
} else {
|
||||
console.warn(
|
||||
'Native: tried accessing the ' +
|
||||
pluginName +
|
||||
' plugin but Cordova is not available. Make sure to include cordova.js or run in a device/simulator'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,10 @@ export class IonicNativePlugin {
|
||||
* Returns the original plugin object
|
||||
*/
|
||||
static getPlugin(): any {
|
||||
return get(window, this.pluginRef);
|
||||
if (typeof window !== 'undefined') {
|
||||
return get(window, this.pluginRef);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,7 @@ declare const window: any;
|
||||
* creates Angular 1 services of the form $cordovaSERVICE, ex: $cordovaStatusBar.
|
||||
*/
|
||||
export function initAngular1(plugins: any) {
|
||||
if (window.angular) {
|
||||
if (typeof window !== 'undefined' && window.angular) {
|
||||
const ngModule = window.angular.module('ionic.native', []);
|
||||
|
||||
for (const name in plugins) {
|
||||
|
||||
@@ -20,7 +20,7 @@ export function get(element: Element | Window, path: string) {
|
||||
*/
|
||||
export function getPromise(callback: Function = () => {}): Promise<any> {
|
||||
const tryNativePromise = () => {
|
||||
if (window.Promise) {
|
||||
if (typeof Promise === 'function' || (typeof window !== 'undefined' && window.Promise)) {
|
||||
return new Promise<any>((resolve, reject) => {
|
||||
callback(resolve, reject);
|
||||
});
|
||||
|
||||
@@ -301,9 +301,7 @@ export interface DataCaptureResult {
|
||||
install: 'ionic cordova plugin add cordova-plugin-abbyy-rtr-sdk',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AbbyyRTR extends IonicNativePlugin {
|
||||
/**
|
||||
* Opens a modal dialog with controls for the Text Capture scenario.
|
||||
|
||||
@@ -95,9 +95,7 @@ export interface ActionSheetOptions {
|
||||
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-actionsheet',
|
||||
platforms: ['Android', 'Browser', 'iOS', 'Windows', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class ActionSheet extends IonicNativePlugin {
|
||||
/**
|
||||
* Convenience property to select an Android theme value
|
||||
|
||||
@@ -295,9 +295,7 @@ export enum AdjustLogLevel {
|
||||
repo: 'https://github.com/adjust/cordova_sdk',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Adjust extends IonicNativePlugin {
|
||||
/**
|
||||
* This method initializes Adjust SDK
|
||||
|
||||
@@ -114,9 +114,7 @@ export interface AdMobFreeRewardVideoConfig {
|
||||
repo: 'https://github.com/ratson/cordova-plugin-admob-free',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AdMobFree extends IonicNativePlugin {
|
||||
/**
|
||||
* Convenience object to get event names
|
||||
|
||||
@@ -72,9 +72,7 @@ export class RewardVideo {
|
||||
pluginRef: 'admob',
|
||||
repo: 'https://github.com/admob-plus/admob-plus',
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AdMob extends IonicNativePlugin {
|
||||
banner = new Banner();
|
||||
interstitial = new Interstitial();
|
||||
|
||||
@@ -140,9 +140,7 @@ export interface AdExtras {
|
||||
repo: 'https://github.com/floatinghotpot/cordova-admob-pro',
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AdMobPro extends IonicNativePlugin {
|
||||
AD_POSITION: {
|
||||
NO_CHANGE: number;
|
||||
|
||||
@@ -239,9 +239,7 @@ export interface AdmobOptions {
|
||||
repo: 'https://github.com/appfeel/admob-google-cordova',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Admob extends IonicNativePlugin {
|
||||
/**
|
||||
* This enum represents AdMob's supported ad sizes.
|
||||
|
||||
@@ -54,9 +54,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
platforms: ['Android', 'iOS'],
|
||||
install: 'ionic cordova plugin add cordova-plugin-aes256-encryption'
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AES256 extends IonicNativePlugin {
|
||||
/**
|
||||
* This function used to perform the aes256 encryption
|
||||
|
||||
@@ -15,7 +15,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
* constructor(private alipay: Alipay) {
|
||||
*
|
||||
* //alipayOrder is a string that has been generated and signed by the server side.
|
||||
* this.alipay.pay(alipayOrder)
|
||||
* this.alipay.pay(alipayOrder, success, error)
|
||||
* .then(result => {
|
||||
* console.log(result); // Success
|
||||
* })
|
||||
@@ -30,15 +30,13 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
@Plugin({
|
||||
pluginName: 'Alipay',
|
||||
plugin: 'cordova-plugin-gubnoi-alipay',
|
||||
pluginRef: 'Alipay',
|
||||
pluginRef: 'cordova.plugins.alipay',
|
||||
repo: 'https://github.com/jing-zhou/cordova-plugin-alipay',
|
||||
install: 'ionic cordova plugin add cordova-plugin-gubnoi-alipay --variable APP_ID=your_app_id',
|
||||
installVariables: ['APP_ID'],
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Alipay extends IonicNativePlugin {
|
||||
/**
|
||||
* Open Alipay to perform App pay
|
||||
@@ -46,7 +44,7 @@ export class Alipay extends IonicNativePlugin {
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the success return, or rejects with an error.
|
||||
*/
|
||||
@Cordova()
|
||||
pay(order: string): Promise<any> {
|
||||
pay(order: string, success?: (res?: any) => void, error?: (err?: any) => void): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,9 +60,7 @@ import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-nati
|
||||
repo: 'https://github.com/appfeel/analytics-google',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AnalyticsFirebase extends IonicNativePlugin {
|
||||
/**
|
||||
* This enum represents AnalyticsFirebase default events.
|
||||
|
||||
@@ -180,9 +180,7 @@ export interface AndroidExoPlayerControllerConfig {
|
||||
repo: 'https://github.com/frontyard/cordova-plugin-exoplayer',
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AndroidExoplayer extends IonicNativePlugin {
|
||||
/**
|
||||
* Show the player.
|
||||
|
||||
@@ -157,9 +157,7 @@ export interface AFADeleteOptions {
|
||||
repo: 'https://github.com/mjwheatley/cordova-plugin-android-fingerprint-auth',
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AndroidFingerprintAuth extends IonicNativePlugin {
|
||||
/**
|
||||
* Convenience property containing all possible errors
|
||||
|
||||
@@ -55,9 +55,7 @@ export enum AndroidSystemUiFlags {
|
||||
repo: 'https://github.com/mesmotronic/cordova-plugin-fullscreen',
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AndroidFullScreen extends IonicNativePlugin {
|
||||
/**
|
||||
* Is this plugin supported?
|
||||
|
||||
@@ -35,9 +35,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
repo: 'https://github.com/NeoLSN/cordova-plugin-android-permissions',
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AndroidPermissions extends IonicNativePlugin {
|
||||
PERMISSION: any = {
|
||||
ACCESS_CHECKIN_PROPERTIES: 'android.permission.ACCESS_CHECKIN_PROPERTIES',
|
||||
@@ -206,20 +204,20 @@ export class AndroidPermissions extends IonicNativePlugin {
|
||||
/**
|
||||
* Check permission
|
||||
* @param {string} permission The name of the permission
|
||||
* @return {Promise<any>} Returns a promise
|
||||
* @return {Promise<AndroidPermissionResponse>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
checkPermission(permission: string): Promise<any> {
|
||||
checkPermission(permission: string): Promise<AndroidPermissionResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request permission
|
||||
* @param {string} permission The name of the permission to request
|
||||
* @return {Promise<any>}
|
||||
* @return {Promise<AndroidPermissionResponse>}
|
||||
*/
|
||||
@Cordova()
|
||||
requestPermission(permission: string): Promise<any> {
|
||||
requestPermission(permission: string): Promise<AndroidPermissionResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -236,10 +234,14 @@ export class AndroidPermissions extends IonicNativePlugin {
|
||||
/**
|
||||
* This function still works now, will not support in the future.
|
||||
* @param {string} permission The name of the permission
|
||||
* @return {Promise<any>} Returns a promise
|
||||
* @return {Promise<AndroidPermissionResponse>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
hasPermission(permission: string): Promise<any> {
|
||||
hasPermission(permission: string): Promise<AndroidPermissionResponse> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
export interface AndroidPermissionResponse {
|
||||
hasPermission: boolean;
|
||||
}
|
||||
|
||||
51
src/@ionic-native/plugins/anyline/index.ts
Normal file
51
src/@ionic-native/plugins/anyline/index.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface AnylineOptions {
|
||||
// Valid License Key
|
||||
licenseKey: string;
|
||||
|
||||
// Scanning options
|
||||
config: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Anyline
|
||||
* @description
|
||||
* Anyline provides an easy-to-use SDK for applications to enable Optical Character Recognition (OCR) on mobile devices.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Anyline } from '@ionic-native/anyline/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private anyline: Anyline) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.anyline.scan(options)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Anyline',
|
||||
plugin: 'io-anyline-cordova',
|
||||
pluginRef: 'Anyline',
|
||||
repo: 'https://github.com/Anyline/anyline-ocr-cordova-module',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Anyline extends IonicNativePlugin {
|
||||
/**
|
||||
* Scan
|
||||
* @param options {AnylineOptions} Scanning options
|
||||
* @return {Promise<any>} Returns a promise that resolves when Code is captured
|
||||
*/
|
||||
@Cordova()
|
||||
scan(options: AnylineOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -39,9 +39,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
repo: 'https://github.com/ohh2ahh/AppAvailability',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AppAvailability extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,9 +42,7 @@ export interface StringMap {
|
||||
'https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-analytics',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AppCenterAnalytics extends IonicNativePlugin {
|
||||
/**
|
||||
* Tracks an custom event.
|
||||
|
||||
@@ -66,9 +66,7 @@ export interface AppCenterCrashReportDevice {
|
||||
'https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-crashes',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AppCenterCrashes extends IonicNativePlugin {
|
||||
/**
|
||||
* App Center Crashes provides you with an API to generate a test crash for easy testing of the SDK.
|
||||
|
||||
@@ -33,9 +33,7 @@ import { Observable } from 'rxjs';
|
||||
'https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-push',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AppCenterPush extends IonicNativePlugin {
|
||||
/**
|
||||
* Subscribe to an event
|
||||
|
||||
@@ -42,9 +42,7 @@ export interface AppLauncherOptions {
|
||||
repo: 'https://github.com/nchutchind/cordova-plugin-app-launcher',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AppLauncher extends IonicNativePlugin {
|
||||
/**
|
||||
* Check if any apps are installed that can launch via a specified URI or Package Name.
|
||||
|
||||
@@ -29,9 +29,7 @@ import { Injectable } from '@angular/core';
|
||||
repo: 'https://github.com/tomloprod/cordova-plugin-appminimize',
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AppMinimize extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
|
||||
@@ -35,9 +35,7 @@ import { Injectable } from '@angular/core';
|
||||
'Windows Phone'
|
||||
]
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AppPreferences extends IonicNativePlugin {
|
||||
/**
|
||||
* Get a preference value
|
||||
|
||||
@@ -80,6 +80,12 @@ export interface AppRateCustomLocale {
|
||||
|
||||
/** Feedback prompt title */
|
||||
feedbackPromptTitle?: string;
|
||||
|
||||
/** Feedback prompt message */
|
||||
appRatePromptMessage?: string;
|
||||
|
||||
/** Feedback prompt message */
|
||||
feedbackPromptMessage?: string;
|
||||
}
|
||||
|
||||
export interface AppRateCallbacks {
|
||||
@@ -175,9 +181,7 @@ export interface AppUrls {
|
||||
repo: 'https://github.com/pushandplay/cordova-plugin-apprate',
|
||||
platforms: ['Android', 'BlackBerry 10', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AppRate extends IonicNativePlugin {
|
||||
/**
|
||||
* Configure various settings for the Rating View.
|
||||
|
||||
@@ -47,9 +47,7 @@ export interface AppUpdateOptions {
|
||||
repo: 'https://github.com/vaenow/cordova-plugin-app-update',
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AppUpdate extends IonicNativePlugin {
|
||||
/**
|
||||
* Check and update
|
||||
|
||||
@@ -32,9 +32,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
repo: 'https://github.com/whiteoctober/cordova-plugin-app-version',
|
||||
platforms: ['Android', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AppVersion extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
|
||||
@@ -153,9 +153,7 @@ export interface ISelectedShippingContact {
|
||||
repo: 'https://github.com/samkelleher/cordova-plugin-applepay',
|
||||
platforms: ['iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class ApplePay extends IonicNativePlugin {
|
||||
/**
|
||||
* Detects if the current device supports Apple Pay and has any capable cards registered.
|
||||
|
||||
@@ -21,7 +21,7 @@ export interface CardData {
|
||||
paymentNetwork?: string;
|
||||
}
|
||||
|
||||
export interface EligibilityData {
|
||||
export interface PairedDevicesFlags {
|
||||
isInWallet: boolean;
|
||||
isInWatch: boolean;
|
||||
FPANID: string;
|
||||
@@ -31,10 +31,6 @@ export interface WatchExistData {
|
||||
isWatchPaired: boolean;
|
||||
}
|
||||
|
||||
export interface CardPrimarySuffixData {
|
||||
primaryAccountSuffix: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Apple Wallet
|
||||
* @description
|
||||
@@ -60,14 +56,13 @@ export interface CardPrimarySuffixData {
|
||||
* // Catch {{err}} here
|
||||
* });
|
||||
*
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* // Simple call to check existence and ellibagility to add a card
|
||||
* this.appleWallet.isCardExistInWalletOrWatch(data: CardPrimarySuffixData)
|
||||
* .then((res: EligibilityData) => {
|
||||
* // object contains boolean values that ensure that card is already exists in wallet or paired-watch
|
||||
* // Simple call to check Card Eligibility
|
||||
* this.appleWallet.checkCardEligibility(primaryAccountIdentifier: string)
|
||||
* .then((res: boolean) => {
|
||||
* // Expect res to be boolean
|
||||
* })
|
||||
* .catch((err) => {
|
||||
* // Catch {{err}} here
|
||||
@@ -77,10 +72,36 @@ export interface CardPrimarySuffixData {
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* // Simple call to checkCardEligibilityBySuffix
|
||||
* this.appleWallet.checkCardEligibilityBySuffix(cardSuffix: string)
|
||||
* .then((res: boolean) => {
|
||||
* // Expect res to be boolean
|
||||
* })
|
||||
* .catch((err) => {
|
||||
* // Catch {{err}} here
|
||||
* });
|
||||
*
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* // Simple call to check out if there is any paired Watches so that you can toggle visibility of 'Add to Watch' button
|
||||
* this.appleWallet.isPairedWatchExist()
|
||||
* this.appleWallet.checkPairedDevices()
|
||||
* .then((res: WatchExistData) => {
|
||||
* // object contains boolean value that ensure that there is already a paired Watch
|
||||
* // object contains boolean flags showing paired devices
|
||||
* })
|
||||
* .catch((err) => {
|
||||
* // Catch {{err}} here
|
||||
* });
|
||||
*
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
*
|
||||
* // Simple call to check paired devices with a card by its suffix
|
||||
* this.appleWallet.checkPairedDevicesBySuffix(cardSuffix: string)
|
||||
* .then((res: PairedDevicesFlags) => {
|
||||
* // object contains boolean values that ensure that card is already exists in wallet or paired-watch
|
||||
* })
|
||||
* .catch((err) => {
|
||||
* // Catch {{err}} here
|
||||
@@ -121,9 +142,8 @@ export interface CardPrimarySuffixData {
|
||||
* EncryptedCardData
|
||||
* SignatureCertificatesData
|
||||
* CardData
|
||||
* EligibilityData
|
||||
* PairedDevicesFlags
|
||||
* WatchExistData
|
||||
* CardPrimarySuffixData
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'AppleWallet',
|
||||
@@ -132,9 +152,7 @@ export interface CardPrimarySuffixData {
|
||||
repo: 'https://github.com/tomavic/cordova-apple-wallet',
|
||||
platforms: ['iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AppleWallet extends IonicNativePlugin {
|
||||
/**
|
||||
* Simple call to determine if the current device supports Apple Pay and has a supported card installed.
|
||||
@@ -146,12 +164,22 @@ export class AppleWallet extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple call to check existence and ellibagility to add a card
|
||||
* @param {CardPrimarySuffixData} data
|
||||
* @return {Promise<EligibilityData>}
|
||||
* Simple call to check Card Eligibility
|
||||
* @param {string} primaryAccountIdentifier
|
||||
* @return {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
isCardExistInWalletOrWatch(data: CardPrimarySuffixData): Promise<EligibilityData> {
|
||||
checkCardEligibility(primaryAccountIdentifier: string): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple call to checkCardEligibilityBySuffix
|
||||
* @param {string} cardSuffix
|
||||
* @return {Promise<PairedDevicesFlags>}
|
||||
*/
|
||||
@Cordova()
|
||||
checkCardEligibilityBySuffix(cardSuffix: string): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -160,7 +188,17 @@ export class AppleWallet extends IonicNativePlugin {
|
||||
* @return {Promise<WatchExistData>}
|
||||
*/
|
||||
@Cordova()
|
||||
isPairedWatchExist(): Promise<WatchExistData> {
|
||||
checkPairedDevices(): Promise<WatchExistData> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple call to check paired devices with a card by its suffix
|
||||
* @param {string} cardSuffix
|
||||
* @return {Promise<PairedDevicesFlags>}
|
||||
*/
|
||||
@Cordova()
|
||||
checkPairedDevicesBySuffix(cardSuffix: string): Promise<PairedDevicesFlags> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,9 +27,7 @@ import { Observable } from 'rxjs';
|
||||
repo: 'https://github.com/appodeal/appodeal-cordova-plugin',
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Appodeal extends IonicNativePlugin {
|
||||
// available types of advertisements
|
||||
readonly AD_TYPES = {
|
||||
|
||||
@@ -77,9 +77,7 @@ export interface AppsflyerInviteOptions {
|
||||
platforms: ['iOS', 'Android'],
|
||||
install: 'Add to config.xml like stated on github and then start'
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Appsflyer extends IonicNativePlugin {
|
||||
/**
|
||||
* initialize the SDK
|
||||
|
||||
@@ -47,9 +47,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
repo: 'https://github.com/clovelCed/cordova-plugin-audiomanagement',
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class AudioManagement extends IonicNativePlugin {
|
||||
/**
|
||||
* Sets the `AudioManagement.AudioMode` for the device.
|
||||
|
||||
@@ -29,9 +29,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
repo: 'https://github.com/ToniKorin/cordova-plugin-autostart',
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Autostart extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
|
||||
@@ -59,9 +59,7 @@ export interface BackgroundFetchConfig {
|
||||
repo: 'https://github.com/transistorsoft/cordova-plugin-background-fetch',
|
||||
platforms: ['iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class BackgroundFetch extends IonicNativePlugin {
|
||||
|
||||
|
||||
|
||||
@@ -499,7 +499,7 @@ export declare enum BackgroundGeolocationIOSActivity {
|
||||
* BackgroundGeolocation must be called within app.ts and or before Geolocation. Otherwise the platform will not ask you for background tracking permission.
|
||||
*
|
||||
* ```typescript
|
||||
* import { BackgroundGeolocation, BackgroundGeolocationConfig, BackgroundGeolocationResponse } from '@ionic-native/background-geolocation';
|
||||
* import { BackgroundGeolocation, BackgroundGeolocationConfig, BackgroundGeolocationEvents, BackgroundGeolocationResponse } from '@ionic-native/background-geolocation/ngx';
|
||||
*
|
||||
* constructor(private backgroundGeolocation: BackgroundGeolocation) { }
|
||||
*
|
||||
@@ -516,7 +516,7 @@ export declare enum BackgroundGeolocationIOSActivity {
|
||||
* this.backgroundGeolocation.configure(config)
|
||||
* .then(() => {
|
||||
*
|
||||
* this.backgroundGeolocation.on('location').subscribe((location: BackgroundGeolocationResponse) => {
|
||||
* this.backgroundGeolocation.on(BackgroundGeolocationEvents.location).subscribe((location: BackgroundGeolocationResponse) => {
|
||||
* console.log(location);
|
||||
*
|
||||
* // IMPORTANT: You must execute the finish method here to inform the native plugin that you're finished,
|
||||
@@ -540,14 +540,12 @@ export declare enum BackgroundGeolocationIOSActivity {
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'BackgroundGeolocation',
|
||||
plugin: 'cordova-plugin-mauron85-background-geolocation@alpha',
|
||||
plugin: '@mauron85/cordova-plugin-background-geolocation',
|
||||
pluginRef: 'BackgroundGeolocation',
|
||||
repo: 'https://github.com/mauron85/cordova-plugin-background-geolocation',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
/**
|
||||
* Configure the plugin.
|
||||
|
||||
@@ -76,9 +76,7 @@ export interface BackgroundModeConfiguration {
|
||||
repo: 'https://github.com/katzer/cordova-plugin-background-mode',
|
||||
platforms: ['AmazonFire OS', 'Android', 'Browser', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class BackgroundMode extends IonicNativePlugin {
|
||||
/**
|
||||
* Enable the background mode.
|
||||
@@ -93,8 +91,37 @@ export class BackgroundMode extends IonicNativePlugin {
|
||||
* Disable the background mode.
|
||||
* Once the background mode has been disabled, the app will be paused when in background.
|
||||
*/
|
||||
@Cordova()
|
||||
disable(): Promise<any> {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
disable(): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable or disable the background mode.
|
||||
*
|
||||
* @param enable {boolean} The status to set for.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
setEnabled(enable: boolean): void {}
|
||||
|
||||
/**
|
||||
* Fire event with given arguments.
|
||||
*
|
||||
* @param event {string} event The event's name.
|
||||
* @param args {array} The callback's arguments.
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
fireEvent(event: string, ...args: any[]): string {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -121,17 +148,15 @@ export class BackgroundMode extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Override the default title, ticker and text.
|
||||
* Overwrite the default settings.
|
||||
* Available only for Android platform.
|
||||
* @param {BackgroundModeConfiguration} options List of option to configure. See table below
|
||||
* @param overrides {BackgroundModeConfiguration} Dict of options to be overridden.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
platforms: ['Android']
|
||||
})
|
||||
setDefaults(options?: BackgroundModeConfiguration): Promise<any> {
|
||||
return;
|
||||
}
|
||||
setDefaults(overrides?: BackgroundModeConfiguration): void {}
|
||||
|
||||
/**
|
||||
* Modify the displayed information.
|
||||
@@ -145,7 +170,8 @@ export class BackgroundMode extends IonicNativePlugin {
|
||||
configure(options?: BackgroundModeConfiguration): void {}
|
||||
|
||||
/**
|
||||
* Listen for events that the plugin fires. Available events are `enable`, `disable`, `activate`, `deactivate` and `failure`.
|
||||
* Register callback for given event.
|
||||
* > Available events are `enable`, `disable`, `activate`, `deactivate` and `failure`.
|
||||
* @param event {string} Event name
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
@@ -158,6 +184,17 @@ export class BackgroundMode extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Listen for events that the plugin fires. Available events are `enable`, `disable`, `activate`, `deactivate` and `failure`.
|
||||
* @param event {string} Event name
|
||||
* @param callback {function} The function to be exec as callback.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
un(event: string, callback: (...args: any[]) => void): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Android allows to programmatically move from foreground to background.
|
||||
*/
|
||||
@@ -204,15 +241,14 @@ export class BackgroundMode extends IonicNativePlugin {
|
||||
excludeFromTaskList(): void {}
|
||||
|
||||
/**
|
||||
* The method works async instead of isActive() or isEnabled().
|
||||
* If the screen is off.
|
||||
* @param fn {function} Callback function to invoke with boolean arg.
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova({
|
||||
platforms: ['Android']
|
||||
})
|
||||
isScreenOff(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
isScreenOff(fn: (arg0: boolean) => void): void {}
|
||||
|
||||
/**
|
||||
* Turn screen on
|
||||
@@ -231,4 +267,13 @@ export class BackgroundMode extends IonicNativePlugin {
|
||||
sync: true
|
||||
})
|
||||
unlock(): void {}
|
||||
|
||||
/**
|
||||
* Disables battery optimazation mode for the app (android only)
|
||||
*/
|
||||
@Cordova({
|
||||
platforms: ['Android'],
|
||||
sync: true
|
||||
})
|
||||
disableBatteryOptimizations(): void {}
|
||||
}
|
||||
|
||||
@@ -31,9 +31,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
repo: 'https://github.com/mebibou/cordova-plugin-backlight',
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Backlight extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,9 +28,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
repo: 'https://github.com/katzer/cordova-plugin-badge',
|
||||
platforms: ['Android', 'Browser', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Badge extends IonicNativePlugin {
|
||||
/**
|
||||
* Clear the badge of the app icon.
|
||||
|
||||
@@ -108,9 +108,7 @@ export interface NotificationData {
|
||||
repo: 'https://github.com/Ti-webdev/cordova-plugin-push-baidu.git',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class BaiduPush extends IonicNativePlugin {
|
||||
/**
|
||||
* This method registers the device to Baidu Cloud Push services.
|
||||
|
||||
@@ -108,9 +108,7 @@ export interface BarcodeScanResult {
|
||||
repo: 'https://github.com/phonegap/phonegap-plugin-barcodescanner',
|
||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class BarcodeScanner extends IonicNativePlugin {
|
||||
Encode: {
|
||||
TEXT_TYPE: string;
|
||||
|
||||
@@ -39,9 +39,7 @@ export interface Base64ToGalleryOptions {
|
||||
repo: 'https://github.com/Nexxa/cordova-base64-to-gallery',
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Base64ToGallery extends IonicNativePlugin {
|
||||
/**
|
||||
* Converts a base64 string to an image file in the device gallery
|
||||
|
||||
@@ -31,9 +31,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
repo: 'https://github.com/hazemhagrass/phonegap-base64',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Base64 extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
|
||||
@@ -47,9 +47,7 @@ export interface BatteryStatusResponse {
|
||||
repo: 'https://github.com/apache/cordova-plugin-battery-status',
|
||||
platforms: ['iOS', 'Android', 'Windows', 'Browser']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class BatteryStatus extends IonicNativePlugin {
|
||||
/**
|
||||
* Watch the change in battery level
|
||||
|
||||
102
src/@ionic-native/plugins/biocatch/index.ts
Normal file
102
src/@ionic-native/plugins/biocatch/index.ts
Normal file
@@ -0,0 +1,102 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name BioCatch
|
||||
* @description
|
||||
* BioCatch SDK Cordova support
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { BioCatch } from '@ionic-native/biocatch';
|
||||
*
|
||||
*
|
||||
* constructor(private biocatch: BioCatch) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.biocatch.start('customer-session-1', 'http://example.com', 'some-public-key')
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'BioCatch',
|
||||
plugin: 'cordova-plugin-biocatch',
|
||||
pluginRef: 'BioCatch',
|
||||
repo: 'https://bitbucket.org/carlos_orellana/ionic-plugin',
|
||||
platforms: ['iOS', 'Android'],
|
||||
})
|
||||
@Injectable()
|
||||
export class BioCatch extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Start a session
|
||||
* @param customerSessionID {String} Customer session id
|
||||
* @param wupUrl {String} WUP server URL
|
||||
* @param publicKey {String} Public Key
|
||||
* @return {Promise<void>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
start(customerSessionID: string | null, wupUrl: string, publicKey: string | null): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pause the session
|
||||
* @return {Promise<void>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
pause(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resume the session
|
||||
* @return {Promise<void>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
resume(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop the session
|
||||
* @return {Promise<void>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
stop(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the session
|
||||
* @return {Promise<void>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
resetSession(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the session context
|
||||
* @param contextName {String} Context name
|
||||
* @return {Promise<void>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
changeContext(contextName: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the customer session ID
|
||||
* @param customerSessionID {String}
|
||||
* @return {Promise<void>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
updateCustomerSessionID(customerSessionID: string | null): Promise<void> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
59
src/@ionic-native/plugins/biometric-wrapper/index.ts
Normal file
59
src/@ionic-native/plugins/biometric-wrapper/index.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name BiometricWrapper
|
||||
* @description
|
||||
* This plugin capture biometric(Iris and Fingerprint) and validate the user.
|
||||
* May be used in Banking domain
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { BiometricWrapper } from '@ionic-native/biometric-wrapper/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private biometricWrapper: BiometricWrapper) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.biometricWrapper.activateIris({'PID_XML': '<pid-xml/>'})
|
||||
* .then((res: any) => )
|
||||
* .catch((error: any) => );
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
|
||||
|
||||
@Plugin({
|
||||
pluginName: 'BiometricWrapper',
|
||||
plugin: 'cordova-plugin-biometric',
|
||||
pluginRef: 'cordova.plugins.BiometricWrapper',
|
||||
repo: '',
|
||||
install: '',
|
||||
installVariables: [],
|
||||
platforms: ['Android']
|
||||
})
|
||||
|
||||
@Injectable()
|
||||
export class BiometricWrapper extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* This function activate iris activity
|
||||
* @return {Promise<any>} Returns a promise that resolves when iris data captured
|
||||
*/
|
||||
@Cordova()
|
||||
activateIris(args: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function activate fingerprint activity
|
||||
* @return {Promise<any>} Returns a promise that resolves when FP data captured
|
||||
*/
|
||||
@Cordova()
|
||||
activateFingerprint(args: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -182,9 +182,7 @@ export interface BLEScanOptions {
|
||||
repo: 'https://github.com/don/cordova-plugin-ble-central',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class BLE extends IonicNativePlugin {
|
||||
/**
|
||||
* Scan and discover BLE peripherals for the specified amount of time.
|
||||
|
||||
@@ -198,6 +198,13 @@ export interface DocumentVerificationOverlaySettingsCtor {
|
||||
new(): DocumentVerificationOverlaySettings;
|
||||
}
|
||||
|
||||
export interface BlinkCardOverlaySettings extends OverlaySettings {
|
||||
glareMessage: string;
|
||||
}
|
||||
export interface BlinkCardOverlaySettingsCtor {
|
||||
new(): BlinkCardOverlaySettings;
|
||||
}
|
||||
|
||||
export interface RecognizerResult {
|
||||
resultState: RecognizerResultState;
|
||||
}
|
||||
@@ -837,47 +844,26 @@ export interface EgyptIdFrontRecognizer extends Recognizer<EgyptIdFrontRecognize
|
||||
}
|
||||
export interface EgyptIdFrontRecognizerCtor extends RecognizerCtor<EgyptIdFrontRecognizer> {}
|
||||
|
||||
export interface ElitePaymentCardBackRecognizerResult extends RecognizerResult {
|
||||
cardNumber: string;
|
||||
cvv: string;
|
||||
fullDocumentImage: string;
|
||||
inventoryNumber: string;
|
||||
validThru: Date;
|
||||
}
|
||||
export interface ElitePaymentCardBackRecognizerResultCtor extends RecognizerResultCtor<ElitePaymentCardBackRecognizerResult> {}
|
||||
|
||||
export interface ElitePaymentCardBackRecognizer extends Recognizer<ElitePaymentCardBackRecognizerResult> {
|
||||
anonymizeCardNumber: boolean;
|
||||
anonymizeCvv: boolean;
|
||||
detectGlare: boolean;
|
||||
extractCvv: boolean;
|
||||
extractInventoryNumber: boolean;
|
||||
extractValidThru: boolean;
|
||||
fullDocumentImageDpi: number;
|
||||
fullDocumentImageExtensionFactors: ImageExtensionFactors;
|
||||
returnFullDocumentImage: boolean;
|
||||
}
|
||||
|
||||
export interface ElitePaymentCardCombinedRecognizerResult extends RecognizerResult {
|
||||
export interface BlinkCardEliteRecognizerResult extends RecognizerResult {
|
||||
cardNumber: string;
|
||||
cvv: string;
|
||||
digitalSignature: string;
|
||||
digitalSignatureVersion: string;
|
||||
documentDataMatch: boolean;
|
||||
fullDocumentImage: string;
|
||||
fullDocumentBackImage: string;
|
||||
fullDocumentFrontImage: string;
|
||||
inventoryNumber: string;
|
||||
owner: string;
|
||||
scanningFirstSideDone: boolean;
|
||||
validThru: Date;
|
||||
}
|
||||
export interface ElitePaymentCardCombinedRecognizerResultCtor extends RecognizerResultCtor<ElitePaymentCardCombinedRecognizerResult> {}
|
||||
export interface BlinkCardEliteRecognizerResultCtor extends RecognizerResultCtor<BlinkCardEliteRecognizerResult> {}
|
||||
|
||||
export interface ElitePaymentCardCombinedRecognizer extends Recognizer<ElitePaymentCardCombinedRecognizerResult> {
|
||||
export interface BlinkCardEliteRecognizer extends Recognizer<BlinkCardEliteRecognizerResult> {
|
||||
anonymizeCardNumber: boolean;
|
||||
anonymizeCvv: boolean;
|
||||
anonymizeOwner: boolean;
|
||||
detectGlare: boolean;
|
||||
extractCvv: boolean;
|
||||
extractInventoryNumber: boolean;
|
||||
extractOwner: boolean;
|
||||
extractValidThru: boolean;
|
||||
@@ -886,20 +872,7 @@ export interface ElitePaymentCardCombinedRecognizer extends Recognizer<ElitePaym
|
||||
returnFullDocumentImage: boolean;
|
||||
signResult: boolean;
|
||||
}
|
||||
|
||||
export interface ElitePaymentCardFrontRecognizerResult extends RecognizerResult {
|
||||
fullDocumentImage: string;
|
||||
owner: string;
|
||||
}
|
||||
export interface ElitePaymentCardFrontRecognizerResultCtor extends RecognizerResultCtor<ElitePaymentCardFrontRecognizerResult> {}
|
||||
|
||||
export interface ElitePaymentCardFrontRecognizer extends Recognizer<ElitePaymentCardFrontRecognizerResult> {
|
||||
anonymizeOwner: boolean;
|
||||
detectGlare: boolean;
|
||||
extractOwner: boolean;
|
||||
fullDocumentImageDpi: number;
|
||||
fullDocumentImageExtensionFactors: ImageExtensionFactors;
|
||||
}
|
||||
export interface BlinkCardEliteRecognizerCtor extends RecognizerCtor<BlinkCardEliteRecognizer> {}
|
||||
|
||||
export interface EudlRecognizerResult extends RecognizerResult {
|
||||
address: string;
|
||||
@@ -1731,24 +1704,7 @@ export interface NewZealandDlFrontRecognizer extends Recognizer<NewZealandDlFron
|
||||
}
|
||||
export interface NewZealandDlFrontRecognizerCtor extends RecognizerCtor<NewZealandDlFrontRecognizer> {}
|
||||
|
||||
export interface PaymentCardBackRecognizerResult extends RecognizerResult {
|
||||
cvv: string;
|
||||
fullDocumentImage: string;
|
||||
inventoryNumber: string;
|
||||
}
|
||||
export interface PaymentCardBackRecognizerResultCtor extends RecognizerResultCtor<PaymentCardBackRecognizerResult> {}
|
||||
|
||||
export interface PaymentCardBackRecognizer extends Recognizer<PaymentCardBackRecognizerResult> {
|
||||
anonymizeCvv: boolean;
|
||||
detectGlare: boolean;
|
||||
extractInventoryNumber: boolean;
|
||||
fullDocumentImageDpi: number;
|
||||
fullDocumentImageExtensionFactors: ImageExtensionFactors;
|
||||
returnFullDocumentImage: boolean;
|
||||
}
|
||||
export interface PaymentCardBackRecognizerCtor extends RecognizerCtor<PaymentCardBackRecognizer> {}
|
||||
|
||||
export interface PaymentCardCombinedRecognizerResult extends RecognizerResult {
|
||||
export interface BlinkCardRecognizerResult extends RecognizerResult {
|
||||
cardNumber: string;
|
||||
cvv: string;
|
||||
digitalSignature: string;
|
||||
@@ -1757,16 +1713,19 @@ export interface PaymentCardCombinedRecognizerResult extends RecognizerResult {
|
||||
fullDocumentBackImage: string;
|
||||
fullDocumentFrontImage: string;
|
||||
inventoryNumber: string;
|
||||
issuer: string;
|
||||
owner: string;
|
||||
scanningFirstSideDone: boolean;
|
||||
validThru: Date;
|
||||
}
|
||||
export interface PaymentCardCombinedRecognizerResultCtor extends RecognizerResultCtor<PaymentCardCombinedRecognizerResult> {}
|
||||
export interface BlinkCardRecognizerResultCtor extends RecognizerResultCtor<BlinkCardRecognizerResult> {}
|
||||
|
||||
export interface PaymentCardCombinedRecognizer extends Recognizer<PaymentCardCombinedRecognizerResult> {
|
||||
export interface BlinkCardRecognizer extends Recognizer<BlinkCardRecognizerResult> {
|
||||
anonymizeCardNumber: boolean;
|
||||
anonymizeCvv: boolean;
|
||||
anonymizeOwner: boolean;
|
||||
detectGlare: boolean;
|
||||
extractCvv: boolean;
|
||||
extractInventoryNumber: boolean;
|
||||
extractOwner: boolean;
|
||||
extractValidThru: boolean;
|
||||
@@ -1775,27 +1734,7 @@ export interface PaymentCardCombinedRecognizer extends Recognizer<PaymentCardCom
|
||||
returnFullDocumentImage: boolean;
|
||||
signResult: boolean;
|
||||
}
|
||||
export interface PaymentCardCombinedRecognizerCtor extends RecognizerCtor<PaymentCardCombinedRecognizer> {}
|
||||
|
||||
export interface PaymentCardFrontRecognizerResult extends RecognizerResult {
|
||||
cardNumber: string;
|
||||
fullDocumentImage: string;
|
||||
owner: string;
|
||||
validThru: Date;
|
||||
}
|
||||
export interface PaymentCardFrontRecognizerResultCtor extends RecognizerResultCtor<PaymentCardFrontRecognizerResult> {}
|
||||
|
||||
export interface PaymentCardFrontRecognizer extends Recognizer<PaymentCardFrontRecognizerResult> {
|
||||
anonymizeCardNumber: boolean;
|
||||
anonymizeOwner: boolean;
|
||||
detectGlare: boolean;
|
||||
extractOwner: boolean;
|
||||
extractValidThru: boolean;
|
||||
fullDocumentImageDpi: number;
|
||||
fullDocumentImageExtensionFactors: ImageExtensionFactors;
|
||||
returnFullDocumentImage: boolean;
|
||||
}
|
||||
export interface PaymentCardFrontRecognizerCtor extends RecognizerCtor<PaymentCardFrontRecognizer> {}
|
||||
export interface BlinkCardRecognizerCtor extends RecognizerCtor<BlinkCardRecognizer> {}
|
||||
|
||||
export interface Pdf417RecognizerResult extends RecognizerResult {
|
||||
barcodeType: string;
|
||||
@@ -2738,6 +2677,40 @@ export interface UsdlCombinedRecognizerCtor extends RecognizerCtor<UsdlCombinedR
|
||||
* this.barcodeStringData = barcodeRecognizer.result.stringData;
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* const overlaySettings = new this.blinkId.BlinkCardOverlaySettings();
|
||||
* const recognizer = new this.blinkId.BlinkCardRecognizer();
|
||||
* recognizer.returnFullDocumentImage = false;
|
||||
* recognizer.detectGlare = true;
|
||||
* recognizer.extractCvv = true;
|
||||
* recognizer.extractValidThru = true;
|
||||
* recognizer.extractOwner = true;
|
||||
*
|
||||
* const recognizerCollection = new this.blinkId.RecognizerCollection([recognizer]);
|
||||
* const canceled = await this.blinkId.scanWithCamera(
|
||||
* overlaySettings,
|
||||
* recognizerCollection,
|
||||
* {
|
||||
* ios: '', //iOS License Key
|
||||
* android: '' //Android License Key
|
||||
* },
|
||||
* );
|
||||
*
|
||||
* if (!canceled) {
|
||||
* if (recognizer.result.resultState === RecognizerResultState.valid) {
|
||||
* const results = recognizer.result;
|
||||
*
|
||||
* if (results.resultState === RecognizerResultState.valid) {
|
||||
* const ccInfo = {
|
||||
* cardNumber: Number(results.cardNumber),
|
||||
* expirationMonth: Number(results.validThru.month),
|
||||
* expirationYear: Number(results.validThru.year),
|
||||
* cvv: Number(results.cvv)
|
||||
* };
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
@@ -2749,13 +2722,11 @@ export interface UsdlCombinedRecognizerCtor extends RecognizerCtor<UsdlCombinedR
|
||||
'ionic cordova plugin add blinkid-cordova --variable CAMERA_USAGE_DESCRIPTION="Enable your camera so that you can scan your ID to validate your account"',
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class BlinkId extends IonicNativePlugin {
|
||||
/**
|
||||
* Opens the camera dialog and attempts to scan a barcode/document
|
||||
* @param overlaySettings {OverlaySettings} for camera overla customization
|
||||
* @param overlaySettings {OverlaySettings} for camera overlay customization
|
||||
* @param recognizerCollection {RecognizerCollection} collection of recognizers to scan with
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@@ -2775,6 +2746,7 @@ export class BlinkId extends IonicNativePlugin {
|
||||
@CordovaProperty() BarcodeOverlaySettings: BarcodeOverlaySettingsCtor;
|
||||
@CordovaProperty() DocumentOverlaySettings: DocumentOverlaySettingsCtor;
|
||||
@CordovaProperty() DocumentVerificationOverlaySettings: DocumentVerificationOverlaySettingsCtor;
|
||||
@CordovaProperty() BlinkCardOverlaySettings: BlinkCardOverlaySettingsCtor;
|
||||
|
||||
@CordovaProperty() RecognizerCollection: RecognizerCollectionCtor;
|
||||
|
||||
@@ -2797,6 +2769,10 @@ export class BlinkId extends IonicNativePlugin {
|
||||
@CordovaProperty() AustriaIdFrontRecognizer: AustriaIdFrontRecognizerCtor;
|
||||
@CordovaProperty() AustriaPassportRecognizerResult: AustriaPassportRecognizerResultCtor;
|
||||
@CordovaProperty() AustriaPassportRecognizer: AustriaPassportRecognizerCtor;
|
||||
@CordovaProperty() BlinkCardEliteRecognizer: BlinkCardEliteRecognizerCtor;
|
||||
@CordovaProperty() BlinkCardEliteRecognizerResult: BlinkCardEliteRecognizerResultCtor;
|
||||
@CordovaProperty() BlinkCardRecognizerResult: BlinkCardRecognizerResultCtor;
|
||||
@CordovaProperty() BlinkCardRecognizer: BlinkCardRecognizerCtor;
|
||||
@CordovaProperty() ColombiaDlFrontRecognizerResult: ColombiaDlFrontRecognizerResultCtor;
|
||||
@CordovaProperty() ColombiaIdBackRecognizerResult: ColombiaIdBackRecognizerResultCtor;
|
||||
@CordovaProperty() ColombiaIdBackRecognizer: ColombiaIdBackRecognizerCtor;
|
||||
@@ -2814,9 +2790,6 @@ export class BlinkId extends IonicNativePlugin {
|
||||
@CordovaProperty() DocumentFaceRecognizerResult: DocumentFaceRecognizerResultCtor;
|
||||
@CordovaProperty() EgyptIdFrontRecognizerResult: EgyptIdFrontRecognizerResultCtor;
|
||||
@CordovaProperty() EgyptIdFrontRecognizer: EgyptIdFrontRecognizerCtor;
|
||||
@CordovaProperty() ElitePaymentCardBackRecognizerResult: ElitePaymentCardBackRecognizerResultCtor;
|
||||
@CordovaProperty() ElitePaymentCardCombinedRecognizerResult: ElitePaymentCardCombinedRecognizerResultCtor;
|
||||
@CordovaProperty() ElitePaymentCardFrontRecognizerResult: ElitePaymentCardFrontRecognizerResultCtor;
|
||||
@CordovaProperty() EudlRecognizerResult: EudlRecognizerResultCtor;
|
||||
@CordovaProperty() GermanyCombinedRecognizerResult: GermanyCombinedRecognizerResultCtor;
|
||||
@CordovaProperty() GermanyCombinedRecognizer: GermanyCombinedRecognizerCtor;
|
||||
@@ -2870,12 +2843,6 @@ export class BlinkId extends IonicNativePlugin {
|
||||
@CordovaProperty() MyKadFrontRecognizer: MyKadFrontRecognizerCtor;
|
||||
@CordovaProperty() NewZealandDlFrontRecognizerResult: NewZealandDlFrontRecognizerResultCtor;
|
||||
@CordovaProperty() NewZealandDlFrontRecognizer: NewZealandDlFrontRecognizerCtor;
|
||||
@CordovaProperty() PaymentCardBackRecognizerResult: PaymentCardBackRecognizerResultCtor;
|
||||
@CordovaProperty() PaymentCardBackRecognizer: PaymentCardBackRecognizerCtor;
|
||||
@CordovaProperty() PaymentCardCombinedRecognizerResult: PaymentCardCombinedRecognizerResultCtor;
|
||||
@CordovaProperty() PaymentCardCombinedRecognizer: PaymentCardCombinedRecognizerCtor;
|
||||
@CordovaProperty() PaymentCardFrontRecognizerResult: PaymentCardFrontRecognizerResultCtor;
|
||||
@CordovaProperty() PaymentCardFrontRecognizer: PaymentCardFrontRecognizerCtor;
|
||||
@CordovaProperty() Pdf417RecognizerResult: Pdf417RecognizerResultCtor;
|
||||
@CordovaProperty() Pdf417Recognizer: Pdf417RecognizerCtor;
|
||||
@CordovaProperty() PolandCombinedRecognizerResult: PolandCombinedRecognizerResultCtor;
|
||||
|
||||
@@ -59,9 +59,7 @@ export interface BlinkUpWPSOptions {
|
||||
repo: 'https://github.com/SensorShare/cordova-plugin-blinkup',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class BlinkUp extends IonicNativePlugin {
|
||||
/**
|
||||
* startBlinkUp - starts the blinkup process
|
||||
|
||||
@@ -82,6 +82,8 @@ export interface ScanParams {
|
||||
matchNum?: BluetoothMatchNum;
|
||||
/** Defaults to All Matches. Available from API21 / API 23. (Android) */
|
||||
callbackType?: BluetoothCallbackType;
|
||||
/** True/false to show only connectable devices, rather than all devices ever seen, defaults to false (Windows) */
|
||||
isConnectable?: boolean;
|
||||
}
|
||||
|
||||
export interface NotifyParams {
|
||||
@@ -425,28 +427,26 @@ export interface AdapterInfo {
|
||||
installVariables: [], // OPTIONAL the plugin requires variables
|
||||
platforms: ['Android', 'iOS'] // Array of platforms supported, example: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class BluetoothLE extends IonicNativePlugin {
|
||||
/**
|
||||
* @name initialize
|
||||
* Initialize Bluetooth on the device
|
||||
* @param {InitParams} [params]
|
||||
* @returns {(Promise<{ status: 'enabled' | 'disabled'}>)} The callback that is passed initialize status (enabled/disabled)
|
||||
* @returns {(Observable<{ status: 'enabled' | 'disabled'}>)} The callback that is passed initialize status (enabled/disabled)
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
initialize(params?: InitParams): Promise<{ status: 'enabled' | 'disabled' }> {
|
||||
@Cordova({ successIndex: 0, errorIndex: 2, observable: true })
|
||||
initialize(params?: InitParams): Observable<{ status: 'enabled' | 'disabled' }> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name enable (Android)
|
||||
* Enable Bluetooth on the device. Android support only
|
||||
* @returns {Promise<{ status: boolean }>}
|
||||
* @returns void
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse', sync: true })
|
||||
enable(): Promise<{ status: boolean }> {
|
||||
enable() {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -482,10 +482,10 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
* Android API >= 23 also requires location services to be enabled. Use isLocationEnabled to determine whether location services are enabled.
|
||||
* If not enabled, use requestLocation to prompt the location services settings page.
|
||||
* @param {ScanParams} params Scan params
|
||||
* @returns {(Observable<{ status: ScanStatus }>)}
|
||||
* @returns {(Observable< ScanStatus >)}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse', observable: true })
|
||||
startScan(params: ScanParams): Observable<{ status: ScanStatus }> {
|
||||
startScan(params: ScanParams): Observable< ScanStatus > {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -561,7 +561,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
connect(params: {
|
||||
address: string;
|
||||
autoConnect?: boolean;
|
||||
}): Observable<{ status: DeviceInfo }> {
|
||||
}): Observable< DeviceInfo > {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -581,10 +581,10 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
* Disconnect from a Bluetooth LE device.
|
||||
* Note: It's simpler to just call close(). Starting with iOS 10, disconnecting before closing seems required!
|
||||
* @param {{address: string}} params The address/identifier
|
||||
* @returns {Promise<{ status: DeviceInfo }>}
|
||||
* @returns {Promise<DeviceInfo>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
disconnect(params: { address: string }): Promise<{ status: DeviceInfo }> {
|
||||
disconnect(params: { address: string }): Promise<DeviceInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -594,10 +594,10 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
* Prior to 2.7.0, you needed to disconnect to the device before closing, but this is no longer the case.
|
||||
* Starting with iOS 10, disconnecting before closing seems required!
|
||||
* @param {{ address: string }} params The address/identifier
|
||||
* @returns {Promise<{ status: DeviceInfo }>}
|
||||
* @returns {Promise<DeviceInfo>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
close(params: { address: string }): Promise<{ status: DeviceInfo }> {
|
||||
close(params: { address: string }): Promise<DeviceInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -611,7 +611,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
* Subsequent discover events will make use of this cache.
|
||||
* If your device's services change, set the clearCache parameter to force Android to re-discover services.
|
||||
* @param {{ address: string, clearCache: boolean }} params The address/identifier
|
||||
* @returns {Promise<{ device: Device }>}
|
||||
* @returns {Promise<Device>}
|
||||
* success: device object (contains array of service objects)
|
||||
* error: The callback that will be triggered when the unbond operation fails
|
||||
*/
|
||||
@@ -619,7 +619,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
discover(params: {
|
||||
address: string;
|
||||
clearCache?: boolean;
|
||||
}): Promise<{ device: Device }> {
|
||||
}): Promise<Device> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -628,13 +628,13 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
* Discover the device's services.
|
||||
* Not providing an array of services will return all services and take longer to discover. iOS support only.
|
||||
* @param {{address: string, services: string[]}} params
|
||||
* @returns {Promise<{ services: Services }>}
|
||||
* @returns {Promise<Services>}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
services(params: {
|
||||
address: string;
|
||||
services?: string[];
|
||||
}): Promise<{ services: Services }> {
|
||||
}): Promise<Services> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -749,10 +749,10 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
* @name rssi
|
||||
* Read RSSI of a connected device. RSSI is also returned with scanning.
|
||||
* @param {{ address: string }} params
|
||||
* @returns {Promise<{ rssi: RSSI }>}
|
||||
* @returns {Promise< RSSI >}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
rssi(params: { address: string }): Promise<{ rssi: RSSI }> {
|
||||
rssi(params: { address: string }): Promise< RSSI > {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -760,10 +760,10 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
* @name mtu (Android, Android 5+)
|
||||
* Set MTU of a connected device. Android only.
|
||||
* @param {{ address: string, mtu: number }} params
|
||||
* @returns {Promise<{ mtu: MTU }>}
|
||||
* @returns {Promise< MTU >}
|
||||
*/
|
||||
@Cordova({ callbackOrder: 'reverse' })
|
||||
mtu(params: { address: string; mtu?: number }): Promise<{ mtu: MTU }> {
|
||||
mtu(params: { address: string; mtu?: number }): Promise< MTU > {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1059,7 +1059,7 @@ export class BluetoothLE extends IonicNativePlugin {
|
||||
@CordovaProperty()
|
||||
SCAN_MODE_LOW_LATENCY: number;
|
||||
@CordovaProperty()
|
||||
MATCH_MODE_AGRESSIVE: number;
|
||||
MATCH_MODE_AGGRESSIVE: number;
|
||||
@CordovaProperty()
|
||||
MATCH_MODE_STICKY: number;
|
||||
@CordovaProperty()
|
||||
|
||||
@@ -37,9 +37,7 @@ import { Observable } from 'rxjs';
|
||||
pluginRef: 'bluetoothSerial',
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class BluetoothSerial extends IonicNativePlugin {
|
||||
/**
|
||||
* Connect to a Bluetooth device
|
||||
|
||||
@@ -204,9 +204,7 @@ export interface PaymentUIResult {
|
||||
'ionic cordova plugin add https://github.com/taracque/cordova-plugin-braintree',
|
||||
installVariables: []
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Braintree extends IonicNativePlugin {
|
||||
/**
|
||||
* Used to initialize the Braintree client. This function must be called before other methods can be used.
|
||||
|
||||
@@ -82,9 +82,7 @@ export interface BranchUniversalObject {
|
||||
'https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking',
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class BranchIo extends IonicNativePlugin {
|
||||
/**
|
||||
* for development and debugging only
|
||||
|
||||
@@ -28,9 +28,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
repo: 'https://github.com/mgcrea/cordova-plugin-brightness',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Brightness extends IonicNativePlugin {
|
||||
/**
|
||||
* Sets the brightness of the display.
|
||||
|
||||
@@ -30,9 +30,7 @@ import { Observable } from 'rxjs';
|
||||
repo: 'https://github.com/bsorrentino/cordova-broadcaster',
|
||||
platforms: ['Android', 'iOS', 'Browser']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Broadcaster extends IonicNativePlugin {
|
||||
/**
|
||||
* This function listen to an event sent from the native code
|
||||
|
||||
@@ -31,9 +31,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
repo: 'https://github.com/google/cordova-plugin-browsertab',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class BrowserTab extends IonicNativePlugin {
|
||||
/**
|
||||
* Check if BrowserTab option is available
|
||||
|
||||
@@ -87,9 +87,7 @@ export interface NameOrOptions {
|
||||
repo: 'https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Calendar extends IonicNativePlugin {
|
||||
/**
|
||||
* This function checks if we have permission to read/write from/to the calendar.
|
||||
@@ -477,6 +475,21 @@ export class Calendar extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete an event by id.
|
||||
*
|
||||
* @param {string} [id] The event id
|
||||
* @param {Date} [fromDate] The date where it start deleting from
|
||||
* @return Returns a Promise
|
||||
*/
|
||||
@Cordova()
|
||||
deleteEventById(
|
||||
id: string,
|
||||
fromDate?: Date
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Open the calendar at the specified date.
|
||||
* @param {Date} date The date you want to open the calendar on
|
||||
|
||||
@@ -48,9 +48,7 @@ export interface CallDirectoryLog {
|
||||
installVariables: ['EXT_NAME', 'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'],
|
||||
platforms: ['iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class CallDirectory extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
|
||||
@@ -31,9 +31,7 @@ export interface CallLogObject {
|
||||
repo: 'https://github.com/creacore-team/cordova-plugin-calllog',
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class CallLog extends IonicNativePlugin {
|
||||
/**
|
||||
* This function return the call logs
|
||||
|
||||
@@ -29,9 +29,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
repo: 'https://github.com/Rohfosho/CordovaCallNumberPlugin',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class CallNumber extends IonicNativePlugin {
|
||||
/**
|
||||
* Calls a phone number
|
||||
|
||||
@@ -113,6 +113,14 @@ export interface CameraPreviewPictureOptions {
|
||||
* this.picture = 'assets/img/test.jpg';
|
||||
* });
|
||||
*
|
||||
* // take a snap shot
|
||||
* this.cameraPreview.takeSnapshot(this.pictureOpts).then((imageData) => {
|
||||
* this.picture = 'data:image/jpeg;base64,' + imageData;
|
||||
* }, (err) => {
|
||||
* console.log(err);
|
||||
* this.picture = 'assets/img/test.jpg';
|
||||
* });
|
||||
*
|
||||
*
|
||||
* // Switch camera
|
||||
* this.cameraPreview.switchCamera();
|
||||
@@ -138,9 +146,7 @@ export interface CameraPreviewPictureOptions {
|
||||
'https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class CameraPreview extends IonicNativePlugin {
|
||||
FOCUS_MODE = {
|
||||
FIXED: 'fixed',
|
||||
@@ -247,6 +253,20 @@ export class CameraPreview extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Take a snapshot of preview window (size specified in startCamera options)
|
||||
* @param {CameraPreviewPictureOptions} [options] quality of the picture to take
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
})
|
||||
takeSnapshot(options?: CameraPreviewPictureOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Set camera color effect.
|
||||
@@ -458,4 +478,13 @@ export class CameraPreview extends IonicNativePlugin {
|
||||
onBackButton(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return in use device camera fov
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getHorizontalFOV(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,9 +171,7 @@ export enum Direction {
|
||||
repo: 'https://github.com/apache/cordova-plugin-camera',
|
||||
platforms: ['Android', 'Browser', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Camera extends IonicNativePlugin {
|
||||
/**
|
||||
* Constant for possible destination types
|
||||
@@ -213,11 +211,11 @@ export class Camera extends IonicNativePlugin {
|
||||
* Convenience constant
|
||||
*/
|
||||
PictureSourceType = {
|
||||
/** Choose image from picture library (same as SAVEDPHOTOALBUM for Android) */
|
||||
/** Choose image from picture library (same as PHOTOLIBRARY for Android) */
|
||||
PHOTOLIBRARY: 0,
|
||||
/** Take picture from camera */
|
||||
CAMERA: 1,
|
||||
/** Choose image from picture library (same as PHOTOLIBRARY for Android) */
|
||||
/** Choose image from picture library (same as SAVEDPHOTOALBUM for Android) */
|
||||
SAVEDPHOTOALBUM: 2
|
||||
};
|
||||
|
||||
|
||||
@@ -173,9 +173,7 @@ export interface CardIOResponse {
|
||||
repo: 'https://github.com/card-io/card.io-Cordova-Plugin',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class CardIO extends IonicNativePlugin {
|
||||
/**
|
||||
* Check whether card scanning is currently available. (May vary by
|
||||
|
||||
@@ -52,9 +52,7 @@ export interface ChooserResult {
|
||||
repo: 'https://github.com/cyph/cordova-plugin-chooser',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Chooser extends IonicNativePlugin {
|
||||
/**
|
||||
* Displays native prompt for user to select a file.
|
||||
@@ -63,7 +61,7 @@ export class Chooser extends IonicNativePlugin {
|
||||
* base64-encoded data: URI, MIME type, display name, and original URI.
|
||||
*/
|
||||
@Cordova()
|
||||
getFile(accept: string): Promise<ChooserResult | undefined> {
|
||||
getFile(accept?: string): Promise<ChooserResult | undefined> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,9 +251,7 @@ export interface CCKQuantityItem {
|
||||
repo: 'https://github.com/sebastianbaar/cordova-plugin-classkit.git',
|
||||
platforms: ['iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class ClassKit extends IonicNativePlugin {
|
||||
/**
|
||||
* Init contexts defined in XML file 'CCK-contexts.xml'
|
||||
|
||||
@@ -23,9 +23,7 @@ declare var clevertap: any;
|
||||
repo: 'https://github.com/CleverTap/clevertap-cordova',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class CleverTap extends IonicNativePlugin {
|
||||
/**
|
||||
* notify device ready
|
||||
|
||||
@@ -36,9 +36,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
repo: 'https://github.com/ihadeed/cordova-clipboard',
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Clipboard extends IonicNativePlugin {
|
||||
/**
|
||||
* Copies the given text
|
||||
|
||||
@@ -38,9 +38,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
installVariables: ['ANDROID_BACKUP_SERVICE_KEY'],
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class CloudSettings extends IonicNativePlugin {
|
||||
/**
|
||||
* Indicates if any stored cloud settings currently exist for the current user.
|
||||
|
||||
@@ -486,9 +486,7 @@ export interface DownloadProgress {
|
||||
repo: 'https://github.com/Microsoft/cordova-plugin-code-push',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class CodePush extends IonicNativePlugin {
|
||||
/**
|
||||
* Get the current package information.
|
||||
|
||||
@@ -32,9 +32,7 @@ import { Observable } from 'rxjs';
|
||||
repo: 'https://github.com/TobyEb/cordova-plugin-colored-browser-tabs',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class ColoredBrowserTabs extends IonicNativePlugin {
|
||||
/**
|
||||
* Call this method to open the tab
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
/**
|
||||
* @name Couchbase Lite
|
||||
* @description
|
||||
* Plugin to install Couchbase Lite in your PhoneGap app on iOS or Android
|
||||
* Plugin to install Couchbase Lite in your PhoneGap app on iOS or Android <docs-card href="https://ionicframework.com/integrations/couchbase-lite" ionicon="alert">This Plugin is no longer supported by Couchbase. Please see our Couchbase Lite Integration</docs-card>
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
@@ -118,9 +118,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
repo: 'https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class CouchbaseLite extends IonicNativePlugin {
|
||||
/**
|
||||
* Get the database url
|
||||
|
||||
@@ -34,9 +34,7 @@ export interface CropOptions {
|
||||
repo: 'https://github.com/jeduan/cordova-plugin-crop',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Crop extends IonicNativePlugin {
|
||||
/**
|
||||
* Crops an image
|
||||
|
||||
@@ -152,9 +152,7 @@ export interface DatePickerOptions {
|
||||
repo: 'https://github.com/VitaliiBlagodir/cordova-plugin-datepicker',
|
||||
platforms: ['Android', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class DatePicker extends IonicNativePlugin {
|
||||
/**
|
||||
* @hidden
|
||||
|
||||
@@ -41,9 +41,7 @@ import { Observable } from 'rxjs';
|
||||
repo: 'https://github.com/akofman/cordova-plugin-dbmeter',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class DBMeter extends IonicNativePlugin {
|
||||
/**
|
||||
* Starts listening
|
||||
|
||||
@@ -33,6 +33,9 @@ export interface DeeplinkOptions {
|
||||
* @description This plugin handles deeplinks on iOS and Android for both custom URL scheme links
|
||||
* and Universal App Links.
|
||||
*
|
||||
* Please read the [ionic plugin deeplinks docs](https://github.com/ionic-team/ionic-plugin-deeplinks) for iOS and Android integration.
|
||||
* You must add `universal-links` to your `config.xml` and set up Apple App Site Association (AASA) for iOS and Asset Links for Android.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Deeplinks } from '@ionic-native/deeplinks/ngx';
|
||||
@@ -93,9 +96,7 @@ export interface DeeplinkOptions {
|
||||
],
|
||||
platforms: ['Android', 'Browser', 'iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Deeplinks extends IonicNativePlugin {
|
||||
/**
|
||||
* Define a set of paths to match against incoming deeplinks.
|
||||
|
||||
@@ -35,14 +35,12 @@ export interface AndroidAccount {
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'DeviceAccounts',
|
||||
plugin: 'cordova-device-accounts',
|
||||
pluginRef: 'plugins.DeviceAccounts',
|
||||
repo: 'https://github.com/danielsogl/cordova-device-accounts',
|
||||
plugin: 'cordova-device-accounts-v2',
|
||||
pluginRef: 'DeviceAccounts',
|
||||
repo: 'https://github.com/xUnholy/cordova-device-accounts-v2',
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class DeviceAccounts extends IonicNativePlugin {
|
||||
/**
|
||||
* Gets all accounts registered on the Android Device
|
||||
@@ -80,4 +78,23 @@ export class DeviceAccounts extends IonicNativePlugin {
|
||||
getEmail(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get permissions for access to email registered on Android device 8.0+
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
@Cordova()
|
||||
getPermissions(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get permissions for access to email registered on Android device 8.0+ for requested type
|
||||
* @param {string} type
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
@Cordova()
|
||||
getPermissionsByType(type: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,9 +47,7 @@ export interface DeviceFeedbackStatus {
|
||||
repo: 'https://github.com/VVelda/device-feedback',
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class DeviceFeedback extends IonicNativePlugin {
|
||||
/**
|
||||
* Provide sound feedback to user, nevertheless respect user's settings and current active device profile as native feedback do.
|
||||
|
||||
@@ -80,9 +80,7 @@ export interface DeviceMotionAccelerometerOptions {
|
||||
'Windows Phone 8'
|
||||
]
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class DeviceMotion extends IonicNativePlugin {
|
||||
/**
|
||||
* Get the current acceleration along the x, y, and z axes.
|
||||
|
||||
@@ -86,9 +86,7 @@ export interface DeviceOrientationCompassOptions {
|
||||
'Windows Phone'
|
||||
]
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class DeviceOrientation extends IonicNativePlugin {
|
||||
/**
|
||||
* Get the current compass heading.
|
||||
|
||||
@@ -26,9 +26,7 @@ declare const window: any;
|
||||
repo: 'https://github.com/apache/cordova-plugin-device',
|
||||
platforms: ['Android', 'Browser', 'iOS', 'macOS', 'Windows']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Device extends IonicNativePlugin {
|
||||
|
||||
/** Get the version of Cordova running on the device. */
|
||||
|
||||
@@ -41,9 +41,7 @@ import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-nati
|
||||
repo: 'https://github.com/dpa99c/cordova-diagnostic-plugin',
|
||||
platforms: ['Android', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Diagnostic extends IonicNativePlugin {
|
||||
permission = {
|
||||
READ_CALENDAR: 'READ_CALENDAR',
|
||||
@@ -75,7 +73,11 @@ export class Diagnostic extends IonicNativePlugin {
|
||||
@CordovaProperty()
|
||||
permissionStatus: {
|
||||
GRANTED: string;
|
||||
/**
|
||||
* @deprecated cordova.plugins.diagnostic@5.0.0 uses DENIED_ONCE to unify DENIED* statuses across iOS/Android
|
||||
*/
|
||||
DENIED: string;
|
||||
DENIED_ONCE: string;
|
||||
NOT_REQUESTED: string;
|
||||
DENIED_ALWAYS: string;
|
||||
RESTRICTED: string;
|
||||
@@ -814,6 +816,15 @@ export class Diagnostic extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests reminders authorization for the application.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({ platforms: ['iOS'] })
|
||||
requestRemoteNotificationsAuthorization(types?: string[], omitRegistration?: boolean): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates the current setting of notification types for the app in the Settings app.
|
||||
* Note: on iOS 8+, if "Allow Notifications" switch is OFF, all types will be returned as disabled.
|
||||
|
||||
@@ -44,9 +44,7 @@ export interface DialogsPromptCallback {
|
||||
repo: 'https://github.com/apache/cordova-plugin-dialogs',
|
||||
platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class Dialogs extends IonicNativePlugin {
|
||||
/**
|
||||
* Shows a custom alert or dialog box.
|
||||
|
||||
@@ -28,9 +28,7 @@ import { Injectable } from '@angular/core';
|
||||
repo: 'https://bitbucket.org/zegeba/cordova-plugin-dns',
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class DNS extends IonicNativePlugin {
|
||||
/**
|
||||
* Resolve hostnames into an underlying network address.
|
||||
|
||||
@@ -29,9 +29,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
repo: 'https://github.com/iampossible/Cordova-DocPicker',
|
||||
platforms: ['iOS']
|
||||
})
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@Injectable()
|
||||
export class DocumentPicker extends IonicNativePlugin {
|
||||
/**
|
||||
* Open a file
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user