mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-02-16 00:00:02 +08:00
Compare commits
91 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da0fd821f7 | ||
|
|
6a18d3f1e0 | ||
|
|
5072c99938 | ||
|
|
e40247c211 | ||
|
|
593607e914 | ||
|
|
51fc5332ff | ||
|
|
27fdac91fd | ||
|
|
3c125bbc84 | ||
|
|
62c39b33c6 | ||
|
|
e6f81519cc | ||
|
|
64ce132262 | ||
|
|
af91977f82 | ||
|
|
07443e0b53 | ||
|
|
72f838d768 | ||
|
|
fa86cee3fa | ||
|
|
83c25b41ef | ||
|
|
2128703d8d | ||
|
|
b52371b174 | ||
|
|
65c2665fc0 | ||
|
|
279b449456 | ||
|
|
9bd4994f01 | ||
|
|
ab74703841 | ||
|
|
18a81a77a9 | ||
|
|
2ebfa46437 | ||
|
|
1d4fc03cba | ||
|
|
e9283a994d | ||
|
|
ed6fe880b6 | ||
|
|
a2d979a277 | ||
|
|
1ccfb1d84c | ||
|
|
2ec0f87a79 | ||
|
|
03ac735476 | ||
|
|
9eb29f8924 | ||
|
|
85a1f6a35b | ||
|
|
3cb7d6d4d8 | ||
|
|
884cabd301 | ||
|
|
663c24d2fa | ||
|
|
fecf8ad994 | ||
|
|
b05ba586f8 | ||
|
|
4ed8f9337f | ||
|
|
25446441cf | ||
|
|
0805d7754e | ||
|
|
d60c0800e7 | ||
|
|
35f498b82c | ||
|
|
8cf4a57a77 | ||
|
|
cb51b5abd6 | ||
|
|
59a8e76ba9 | ||
|
|
8f985025d1 | ||
|
|
7d9df8c82f | ||
|
|
22ccbfdf8f | ||
|
|
c6a76c26e0 | ||
|
|
c3f9fb4a23 | ||
|
|
abeedbf2fa | ||
|
|
9bdabd3ac3 | ||
|
|
0467a0dd32 | ||
|
|
3eb69b4056 | ||
|
|
793e2e34d3 | ||
|
|
dd7098d5bd | ||
|
|
268e22456e | ||
|
|
9950b18e38 | ||
|
|
b4deaaa941 | ||
|
|
328e5de3f3 | ||
|
|
41dae53bf2 | ||
|
|
3027b5ea16 | ||
|
|
ec773de686 | ||
|
|
f3b7467ffd | ||
|
|
d9546f15ed | ||
|
|
52dcd808b6 | ||
|
|
985193bebd | ||
|
|
9bf9e9d073 | ||
|
|
8b9995a5af | ||
|
|
2d3add6507 | ||
|
|
ee59b55c29 | ||
|
|
28bb6dc1a8 | ||
|
|
b587a0e647 | ||
|
|
d9d7919174 | ||
|
|
11c42757d7 | ||
|
|
4e4216ff6d | ||
|
|
496968b9fc | ||
|
|
bf3f9d8799 | ||
|
|
6f22134851 | ||
|
|
aaeabb9f96 | ||
|
|
6d4da1fff4 | ||
|
|
f223481307 | ||
|
|
7d4e8acce8 | ||
|
|
dea9f42d5f | ||
|
|
e193baf1c1 | ||
|
|
4835182ad5 | ||
|
|
49ac21145a | ||
|
|
8a81ee08e3 | ||
|
|
36d101af02 | ||
|
|
8e65474c1d |
4
.github/CONTRIBUTING.md
vendored
4
.github/CONTRIBUTING.md
vendored
@@ -4,7 +4,7 @@
|
||||
#### There are no rules, but here are a few things to consider:
|
||||
###### Before you submit an issue:
|
||||
* Do a quick search to see if there are similar issues
|
||||
* Make sure that you are waiting for `deviceready` to fire before interacting with any plugin. If you are using Ionic 2, this can be done using [the `Platform.ready()` function](http://ionicframework.com/docs/api/platform/Platform/#ready).
|
||||
* Make sure that you are waiting for `deviceready` to fire before interacting with any plugin. If you are using Ionic, this can be done using [the `Platform.ready()` function](http://ionicframework.com/docs/api/platform/Platform/#ready).
|
||||
* **Check that you are using the latest version of** `ionic-native`, you can install the latest version by running `npm i --save @ionic-native/core@latest`
|
||||
|
||||
###### Still having problems? submit an issue with the following details:
|
||||
@@ -16,4 +16,4 @@
|
||||
## Feature request?
|
||||
Have a plugin you'd like to see supported? Since Ionic Native is a thin wrapper around existing Cordova plugins, adding support for new plugins is as easy as creating a new wrapper for whatever plugin you'd like to add.
|
||||
|
||||
Take a look at our [Developer Guide](https://github.com/driftyco/ionic-native/blob/master/DEVELOPER.md) for more info on adding new plugins.
|
||||
Take a look at our [Developer Guide](https://github.com/ionic-team/ionic-native/blob/master/DEVELOPER.md) for more info on adding new plugins.
|
||||
|
||||
1339
CHANGELOG.md
1339
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
@@ -103,7 +103,7 @@ Next, let's look at the `watchPosition` method.
|
||||
|
||||
The `@Cordova` decorator has a few more options now.
|
||||
|
||||
`observable` indicates that this method may call its callbacks multiple times, so `@Cordova` wraps it in an [`Observable`](https://github.com/driftyco/ionic-native#promises-and-observables) instead of a Promise.
|
||||
`observable` indicates that this method may call its callbacks multiple times, so `@Cordova` wraps it in an [`Observable`](https://github.com/ionic-team/ionic-native#promises-and-observables) instead of a Promise.
|
||||
|
||||
`callbackOrder` refers to the method signature of the underlying Cordova plugin, and tells Ionic Native which arguments are the callbacks to map to the wrapping Promise or Observable. In this case, the signature is [`watchPosition(success, error, options)`](https://github.com/apache/cordova-plugin-geolocation#navigatorgeolocationwatchposition), so we need to tell `@Cordova` that the callbacks are the first arguments, not the last arguments. For rare cases, you can also specify the options `successIndex` and `errorIndex` to indicate where in the argument list the callbacks are located.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[](https://circleci.com/gh/driftyco/ionic-native) [](http://commitizen.github.io/cz-cli/) 
|
||||
[](https://circleci.com/gh/ionic-team/ionic-native) [](http://commitizen.github.io/cz-cli/) 
|
||||
|
||||
|
||||
# Ionic Native
|
||||
@@ -169,11 +169,11 @@ Spent way too long diagnosing an issue only to realize a plugin wasn't firing or
|
||||
|
||||
|
||||
## Plugin Missing?
|
||||
Let us know or submit a PR! Take a look at [the Developer Guide](https://github.com/driftyco/ionic-native/blob/master/DEVELOPER.md) for more on how to contribute. :heart:
|
||||
Let us know or submit a PR! Take a look at [the Developer Guide](https://github.com/ionic-team/ionic-native/blob/master/DEVELOPER.md) for more on how to contribute. :heart:
|
||||
|
||||
## Ionic V1/Angular 1 support
|
||||
|
||||
For Ionic V1/Angular 1 support, please use version 2 of Ionic Native. See the [2.x README](https://github.com/driftyco/ionic-native/blob/8cd648db5cddd7bdbe2bd78839b19c620cc8c04c/README.md) for usage information.
|
||||
For Ionic V1/Angular 1 support, please use version 2 of Ionic Native. See the [2.x README](https://github.com/ionic-team/ionic-native/blob/8cd648db5cddd7bdbe2bd78839b19c620cc8c04c/README.md) for usage information.
|
||||
|
||||
# Credits
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ jobs:
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: ionic-site-{{ .Branch }}
|
||||
key: ionic-site-{{ checksum "package.json" }}
|
||||
- run:
|
||||
name: Prepare ionic-site repo
|
||||
command: |
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
./scripts/docs/prepare.sh
|
||||
fi
|
||||
- save_cache:
|
||||
key: ionic-site-{{ .Branch }}
|
||||
key: ionic-site-{{ checksum "package.json" }}
|
||||
paths:
|
||||
- ~/ionic-site/
|
||||
- restore_cache:
|
||||
@@ -32,8 +32,8 @@ jobs:
|
||||
command: npm run lint
|
||||
- run: bash ./scripts/git/config.sh
|
||||
- run:
|
||||
name: Build changed plugins
|
||||
command: node scripts/ci-tests.js
|
||||
name: Build Ionic Native
|
||||
command: npm run build:core && ./node_modules/.bin/tsc
|
||||
- run:
|
||||
name: Run tests
|
||||
command: npm test
|
||||
|
||||
5567
package-lock.json
generated
Normal file
5567
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
37
package.json
37
package.json
@@ -1,20 +1,22 @@
|
||||
{
|
||||
"name": "ionic-native",
|
||||
"version": "3.10.2",
|
||||
"version": "3.12.2",
|
||||
"description": "Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support",
|
||||
"homepage": "https://ionicframework.com/",
|
||||
"author": "Ionic Team <hi@ionic.io> (https://ionic.io)",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@angular/compiler": "4.1.2",
|
||||
"@angular/compiler-cli": "4.1.2",
|
||||
"@angular/core": "4.1.2",
|
||||
"@angular/compiler": "4.1.3",
|
||||
"@angular/compiler-cli": "4.1.3",
|
||||
"@angular/core": "4.1.3",
|
||||
"@types/cordova": "0.0.34",
|
||||
"@types/jasmine": "^2.5.47",
|
||||
"@types/node": "^7.0.18",
|
||||
"@types/jasmine": "^2.5.51",
|
||||
"@types/node": "^7.0.27",
|
||||
"canonical-path": "0.0.2",
|
||||
"child-process-promise": "2.2.0",
|
||||
"conventional-changelog-cli": "1.2.0",
|
||||
"child-process-promise": "2.2.1",
|
||||
"conventional-changelog-cli": "1.3.1",
|
||||
"cpr": "2.0.2",
|
||||
"cz-conventional-changelog": "1.2.0",
|
||||
"cz-conventional-changelog": "2.0.0",
|
||||
"decamelize": "1.2.0",
|
||||
"dgeni": "0.4.7",
|
||||
"dgeni-packages": "0.16.10",
|
||||
@@ -32,17 +34,17 @@
|
||||
"karma-typescript": "^3.0.1",
|
||||
"karma-typescript-es6-transform": "^1.0.0",
|
||||
"lodash": "4.17.4",
|
||||
"minimist": "1.1.3",
|
||||
"minimist": "1.2.0",
|
||||
"node-html-encoder": "0.0.2",
|
||||
"q": "1.4.1",
|
||||
"q": "1.5.0",
|
||||
"queue": "4.2.1",
|
||||
"rimraf": "2.5.4",
|
||||
"rimraf": "2.6.1",
|
||||
"rxjs": "5.1.1",
|
||||
"semver": "5.3.0",
|
||||
"tslint": "3.15.1",
|
||||
"tslint-ionic-rules": "0.0.8",
|
||||
"typescript": "2.3.2",
|
||||
"zone.js": "^0.8.10"
|
||||
"typescript": "2.3.3",
|
||||
"zone.js": "^0.8.11"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "npm run test:watch",
|
||||
@@ -58,6 +60,13 @@
|
||||
"test": "karma start karma.conf.js --single-run",
|
||||
"test:watch": "karma start karma.conf.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ionic-team/ionic-native.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/ionic-team/ionic-native/issues"
|
||||
},
|
||||
"config": {
|
||||
"commitizen": {
|
||||
"path": "./node_modules/cz-conventional-changelog"
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
"peerDependencies": {},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/driftyco/ionic-native.git"
|
||||
"url": "https://github.com/ionic-team/ionic-native.git"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
"peerDependencies": {},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/driftyco/ionic-native.git"
|
||||
"url": "https://github.com/ionic-team/ionic-native.git"
|
||||
}
|
||||
}
|
||||
|
||||
23
scripts/docs/templates/common.template.html
vendored
23
scripts/docs/templates/common.template.html
vendored
@@ -44,7 +44,7 @@ docType: "<$ doc.docType $>"
|
||||
<@- endmacro -@>
|
||||
|
||||
<@- macro githubViewLink(doc) -@>
|
||||
<a href="https://github.com/driftyco/ionic-native/tree/master/<$ doc.fileInfo.relativePath $>#L<$ doc.location.start.line+1 $>-L<$ doc.location.end.line+1 $>"><$ doc.fileInfo.relativePath $> (line <$ doc.location.start.line+1 $>)</a>
|
||||
<a href="https://github.com/ionic-team/ionic-native/tree/master/<$ doc.fileInfo.relativePath $>#L<$ doc.location.start.line+1 $>-L<$ doc.location.end.line+1 $>"><$ doc.fileInfo.relativePath $> (line <$ doc.location.start.line+1 $>)</a>
|
||||
<@- endmacro -@>
|
||||
|
||||
<@- macro paramTable(params, isDirective) -@>
|
||||
@@ -149,7 +149,7 @@ docType: "<$ doc.docType $>"
|
||||
<@- endif -@>
|
||||
</h1>
|
||||
|
||||
<a class="improve-v2-docs" href="http://github.com/driftyco/ionic-native/edit/master/<$ doc.fileInfo.relativePath|replace('/home/ubuntu/ionic-native/', '')|replace('//','/') $>#L<$ doc.location.start.line $>">
|
||||
<a class="improve-v2-docs" href="http://github.com/ionic-team/ionic-native/edit/master/<$ doc.fileInfo.relativePath|replace('/home/ubuntu/ionic-native/', '')|replace('//','/') $>#L<$ doc.location.start.line $>">
|
||||
Improve this doc
|
||||
</a>
|
||||
|
||||
@@ -164,18 +164,25 @@ docType: "<$ doc.docType $>"
|
||||
</p>
|
||||
<@ endif @>
|
||||
|
||||
<# --- Install commands --- #>
|
||||
<pre><code class="nohighlight">$ <@ if prop.install @><$ prop.install $><@ else @>ionic cordova plugin add <$ prop.plugin $><@ endif @>
|
||||
$ npm install --save @ionic-native/<$ doc.npmId $>
|
||||
</code></pre>
|
||||
<# --- Plugin description --- #>
|
||||
<$ doc.description | marked $>
|
||||
|
||||
<p>Repo:
|
||||
<a href="<$ prop.repo $>">
|
||||
<$ prop.repo $>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<# --- Plugin description --- #>
|
||||
<$ doc.description | marked $>
|
||||
<# --- Install commands --- #>
|
||||
<h2>Installation</h2>
|
||||
<ol class="installation">
|
||||
<li>Install the Cordova and Ionic Native plugins:<br>
|
||||
<pre><code class="nohighlight">$ <@ if prop.install @><$ prop.install $><@ else @>ionic cordova plugin add <$ prop.plugin $><@ endif @>
|
||||
$ npm install --save @ionic-native/<$ doc.npmId $>
|
||||
</code></pre>
|
||||
</li>
|
||||
<li><a href="https://ionicframework.com/docs/native/#Add_Plugins_to_Your_App_Module">Add this plugin to your app's module</a></li>
|
||||
</ol>
|
||||
|
||||
<# --- Plugin supported platforms --- #>
|
||||
<@ if prop.platforms @>
|
||||
|
||||
2
scripts/docs/templates/readme.template.md
vendored
2
scripts/docs/templates/readme.template.md
vendored
@@ -1,4 +1,4 @@
|
||||
<a style="float:right;font-size:12px;" href="http://github.com/driftyco/ionic-native/edit/master/<$ doc.fileInfo.relativePath|replace('/home/ubuntu/ionic-native/', '')|replace('//','/') $>#L<$ doc.location.start.line $>">
|
||||
<a style="float:right;font-size:12px;" href="http://github.com/ionic-team/ionic-native/edit/master/<$ doc.fileInfo.relativePath|replace('/home/ubuntu/ionic-native/', '')|replace('//','/') $>#L<$ doc.location.start.line $>">
|
||||
Improve this doc
|
||||
</a>
|
||||
|
||||
|
||||
@@ -31,11 +31,11 @@ function run {
|
||||
if [ $CHANGED -eq 0 ];
|
||||
then
|
||||
echo "-- No changes detected for the following commit, docs not updated."
|
||||
echo "https://github.com/driftyco/$CIRCLE_PROJECT_REPONAME/commit/$CIRCLE_SHA1"
|
||||
echo "https://github.com/ionic-team/$CIRCLE_PROJECT_REPONAME/commit/$CIRCLE_SHA1"
|
||||
else
|
||||
git config --global user.email "hi@ionicframework.com"
|
||||
git config --global user.name "Ionitron"
|
||||
git commit -am "Automated build of native docs driftyco/$CIRCLE_PROJECT_REPONAME@$CIRCLE_SHA1"
|
||||
git commit -am "Automated build of native docs ionic-team/$CIRCLE_PROJECT_REPONAME@$CIRCLE_SHA1"
|
||||
# in case a different commit was pushed to ionic-site during doc/demo gen,
|
||||
# try to rebase around it before pushing
|
||||
git fetch
|
||||
|
||||
@@ -18,12 +18,12 @@ function run {
|
||||
if [ -z "$CHANGED" ];
|
||||
then
|
||||
echo "-- No changes detected for the following commit, docs not updated."
|
||||
echo "https://github.com/driftyco/$CIRCLE_PROJECT_REPONAME/commit/$CIRCLE_SHA1"
|
||||
echo "https://github.com/ionic-team/$CIRCLE_PROJECT_REPONAME/commit/$CIRCLE_SHA1"
|
||||
else
|
||||
git config --global user.email "hi@ionicframework.com"
|
||||
git config --global user.name "Ionitron"
|
||||
git add -A
|
||||
git commit -am "Automated build of native readmes for driftyco/$CIRCLE_PROJECT_REPONAME@$CIRCLE_SHA1"
|
||||
git commit -am "Automated build of native readmes for ionic-team/$CIRCLE_PROJECT_REPONAME@$CIRCLE_SHA1"
|
||||
# in case a different commit was pushed to ionic-site during doc/demo gen,
|
||||
# try to rebase around it before pushing
|
||||
git fetch
|
||||
|
||||
@@ -21,7 +21,7 @@ function run {
|
||||
git config --global user.email "hi@ionicframework.com"
|
||||
git config --global user.name "Ionitron"
|
||||
|
||||
git clone git@github.com:driftyco/$REPOSITORY.git $DIRECTORY $ARGS
|
||||
git clone git@github.com:ionic-team/$REPOSITORY.git $DIRECTORY $ARGS
|
||||
cd $DIRECTORY
|
||||
git fetch origin --tags
|
||||
cd ../
|
||||
|
||||
@@ -6,7 +6,7 @@ import { Injectable } from '@angular/core';
|
||||
* @description
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* ```typescript
|
||||
* import { {{ PluginName }} } from '@ionic-native/{{ plugin-name }}';
|
||||
*
|
||||
*
|
||||
|
||||
@@ -20,7 +20,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
* This plugin does something
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* ```typescript
|
||||
* import { {{ PluginName }} } from '@ionic-native/{{ plugin-name }}';
|
||||
*
|
||||
*
|
||||
|
||||
@@ -25,7 +25,7 @@ export const getPromise = (callback: Function): Promise<any> => {
|
||||
callback(resolve, reject);
|
||||
});
|
||||
} else {
|
||||
console.error('No Promise support or polyfill found. To enable Ionic Native support, please add the es6-promise polyfill before this script, or run with a library like Angular 2 or on a recent browser.');
|
||||
console.error('No Promise support or polyfill found. To enable Ionic Native support, please add the es6-promise polyfill before this script, or run with a library like Angular or on a recent browser.');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -51,7 +51,7 @@ export const pluginWarn = (pluginName: string, plugin?: string, method?: string)
|
||||
console.warn('Native: tried accessing the ' + pluginName + ' plugin but it\'s not installed.');
|
||||
}
|
||||
if (plugin) {
|
||||
console.warn('Install the ' + pluginName + ' plugin: \'ionic plugin add ' + plugin + '\'');
|
||||
console.warn('Install the ' + pluginName + ' plugin: \'ionic cordova plugin add ' + plugin + '\'');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ export interface ActionSheetOptions {
|
||||
plugin: 'cordova-plugin-actionsheet',
|
||||
pluginRef: 'plugins.actionsheet',
|
||||
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-actionsheet',
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8', 'Browser']
|
||||
platforms: ['Android', 'Browser', 'iOS', 'Windows', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class ActionSheet extends IonicNativePlugin {
|
||||
|
||||
@@ -101,8 +101,9 @@ export interface AlipayOrder {
|
||||
plugin: 'cordova-alipay-base',
|
||||
pluginRef: 'Alipay.Base',
|
||||
repo: 'https://github.com/xueron/cordova-alipay-base',
|
||||
platforms: ['Android', 'iOS'],
|
||||
install: 'ionic cordova plugin add https://github.com/xueron/cordova-alipay-base --variable APP_ID=your_app_id'
|
||||
install: 'ionic cordova plugin add cordova-alipay-base --variable APP_ID=your_app_id',
|
||||
installVariables: ['APP_ID'],
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Alipay extends IonicNativePlugin {
|
||||
|
||||
@@ -192,7 +192,7 @@ export class AndroidFingerprintAuth extends IonicNativePlugin {
|
||||
* @returns {Promise<any>} Returns a Promise that resolves if fingerprint auth is available on the device
|
||||
*/
|
||||
@Cordova()
|
||||
isAvailable(): Promise<{ isAvailable: boolean }> { return; }
|
||||
isAvailable(): Promise<{ isAvailable: boolean, isHardwareDetected: boolean, hasEnrolledFingerprints: boolean }> { return; }
|
||||
|
||||
/**
|
||||
* Delete the cipher used for encryption and decryption by username
|
||||
|
||||
@@ -8,23 +8,23 @@ import { Injectable } from '@angular/core';
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Platfrom } from 'ionic-angular';
|
||||
* import { AppMinimize } from '@ionic-native/app-minimize';
|
||||
*
|
||||
*
|
||||
* constructor(private appMinimize: AppMinimize) { }
|
||||
* constructor(private platform: Platform, private appMinimize: AppMinimize) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.plugin.minimize().then(
|
||||
* success => console.log('Closed'),
|
||||
* err => console.log('Something went wrong')
|
||||
* );
|
||||
* this.platform.registerBackButtonAction(() => {
|
||||
* this.appMinimize.minimize();
|
||||
* });
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'AppMinimize',
|
||||
plugin: 'https://github.com/tomloprod/cordova-plugin-appminimize.git',
|
||||
plugin: 'cordova-plugin-appminimize',
|
||||
pluginRef: 'plugins.appMinimize',
|
||||
repo: 'https://github.com/tomloprod/cordova-plugin-appminimize',
|
||||
platforms: ['Android']
|
||||
|
||||
@@ -25,7 +25,7 @@ import { Injectable } from '@angular/core';
|
||||
plugin: 'cordova-plugin-app-preferences',
|
||||
pluginRef: 'plugins.appPreferences',
|
||||
repo: 'https://github.com/apla/me.apla.cordova.app-preferences',
|
||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'iOS', 'OS X', 'Windows 8', 'Windows Phone']
|
||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'iOS', 'macOS', 'Windows 8', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class AppPreferences extends IonicNativePlugin {
|
||||
|
||||
@@ -140,7 +140,7 @@ export interface AppUrls {
|
||||
plugin: 'cordova-plugin-apprate',
|
||||
pluginRef: 'AppRate',
|
||||
repo: 'https://github.com/pushandplay/cordova-plugin-apprate',
|
||||
platforms: ['Android', 'iOS', 'Windows (experimental)']
|
||||
platforms: ['Android', 'BlackBerry 10', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class AppRate extends IonicNativePlugin {
|
||||
|
||||
@@ -31,7 +31,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
plugin: 'cordova-plugin-app-version',
|
||||
pluginRef: 'cordova.getAppVersion',
|
||||
repo: 'https://github.com/whiteoctober/cordova-plugin-app-version',
|
||||
platforms: ['Android', 'iOS']
|
||||
platforms: ['Android', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class AppVersion extends IonicNativePlugin {
|
||||
|
||||
@@ -22,9 +22,9 @@ import { Injectable } from '@angular/core';
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Appodeal',
|
||||
plugin: 'https://github.com/appodeal/appodeal-cordova-plugin',
|
||||
plugin: 'https://github.com/appodeal/appodeal-cordova-plugin.git',
|
||||
pluginRef: 'Appodeal',
|
||||
repo: 'https://github.com/appodeal/appodeal-cordova-plugin.git',
|
||||
repo: 'https://github.com/appodeal/appodeal-cordova-plugin',
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
@Injectable()
|
||||
|
||||
@@ -125,7 +125,7 @@ export interface BackgroundGeolocationConfig {
|
||||
startForeground?: boolean;
|
||||
|
||||
/**
|
||||
* ANDROID, WP8 ONLY
|
||||
* ANDROID ONLY
|
||||
* When using BackgroundGeolocation.LocationProvider.ANDROID_DISTANCE_FILTER_PROVIDER:
|
||||
* The minimum time interval between location updates in milliseconds.
|
||||
* @see Android docs (http://developer.android.com/reference/android/location/LocationManager.html#requestLocationUpdates(long,%20float,%20android.location.Criteria,%20android.app.PendingIntent))
|
||||
@@ -306,7 +306,7 @@ export interface BackgroundGeolocationConfig {
|
||||
plugin: 'cordova-plugin-mauron85-background-geolocation',
|
||||
pluginRef: 'backgroundGeolocation',
|
||||
repo: 'https://github.com/mauron85/cordova-plugin-background-geolocation',
|
||||
platforms: ['iOS', 'Android', 'Windows Phone 8']
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
@@ -391,7 +391,7 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
platforms: ['iOS', 'Windows Phone']
|
||||
platforms: ['iOS']
|
||||
})
|
||||
finish(): Promise<any> { return; }
|
||||
|
||||
@@ -401,7 +401,7 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
platforms: ['iOS', 'Windows Phone']
|
||||
platforms: ['iOS']
|
||||
})
|
||||
changePace(isMoving: boolean): Promise<any> { return; }
|
||||
|
||||
@@ -420,7 +420,7 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
* @returns {Promise<Location>}
|
||||
*/
|
||||
@Cordova({
|
||||
platforms: ['iOS', 'Windows Phone']
|
||||
platforms: ['iOS']
|
||||
})
|
||||
getStationaryLocation(): Promise<BackgroundGeolocationResponse> { return; }
|
||||
|
||||
@@ -430,7 +430,7 @@ export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
platforms: ['iOS', 'Windows Phone']
|
||||
platforms: ['iOS']
|
||||
})
|
||||
onStationary(): Promise<any> { return; }
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ export interface BackgroundModeConfiguration {
|
||||
plugin: 'cordova-plugin-background-mode',
|
||||
pluginRef: 'cordova.plugins.backgroundMode',
|
||||
repo: 'https://github.com/katzer/cordova-plugin-background-mode',
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8']
|
||||
platforms: ['AmazonFire OS', 'Android', 'Browser', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class BackgroundMode extends IonicNativePlugin {
|
||||
|
||||
@@ -27,7 +27,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
plugin: 'cordova-plugin-badge',
|
||||
pluginRef: 'cordova.plugins.notification.badge',
|
||||
repo: 'https://github.com/katzer/cordova-plugin-badge',
|
||||
platforms: ['Android', 'iOS', 'Browser', 'Windows', 'Amazon FireOS', 'Windows Phone 8']
|
||||
platforms: ['Android', 'Browser', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class Badge extends IonicNativePlugin {
|
||||
|
||||
@@ -92,7 +92,7 @@ export interface BarcodeScanResult {
|
||||
plugin: 'phonegap-plugin-barcodescanner',
|
||||
pluginRef: 'cordova.plugins.barcodeScanner',
|
||||
repo: 'https://github.com/phonegap/phonegap-plugin-barcodescanner',
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8', 'Windows 10', 'Windows 8', 'BlackBerry 10', 'Browser']
|
||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class BarcodeScanner extends IonicNativePlugin {
|
||||
|
||||
45
src/@ionic-native/plugins/base64/index.ts
Normal file
45
src/@ionic-native/plugins/base64/index.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @name Base64
|
||||
* @description
|
||||
* This Plugin is used to encode base64 of any file, it uses js code for iOS, but in case of android it uses native code to handle android versions lower than v.3
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Base64 } from '@ionic-native/base64';
|
||||
*
|
||||
* constructor(private base64: Base64) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* let filePath: string = 'file:///...';
|
||||
* this.base64.encodeFile(filePath).then((base64File: string) => {
|
||||
* console.log(base64File);
|
||||
* }, (err) => {
|
||||
* console.log(err);
|
||||
* });
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Base64',
|
||||
plugin: 'com-badrit-base64',
|
||||
pluginRef: 'plugins.Base64',
|
||||
repo: 'https://github.com/hazemhagrass/phonegap-base64',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Base64 extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* This function encodes base64 of any file
|
||||
* @param {string} filePath Absolute file path
|
||||
* @return {Promise<string>} Returns a promise that resolves when the file is successfully encoded
|
||||
*/
|
||||
@Cordova()
|
||||
encodeFile(filePath: string): Promise<string> { return; }
|
||||
|
||||
}
|
||||
@@ -49,7 +49,7 @@ export interface BatteryStatusResponse {
|
||||
plugin: 'cordova-plugin-battery-status',
|
||||
pluginRef: 'navigator.battery',
|
||||
repo: 'https://github.com/apache/cordova-plugin-battery-status',
|
||||
platforms: ['Amazon Fire OS', 'iOS', 'Android', 'BlackBerry 10', 'Windows Phone 7', 'Windows Phone 8', 'Windows', 'Firefox OS', 'Browser']
|
||||
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class BatteryStatus extends IonicNativePlugin {
|
||||
|
||||
@@ -173,7 +173,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
plugin: 'cordova-plugin-ble-central',
|
||||
pluginRef: 'ble',
|
||||
repo: 'https://github.com/don/cordova-plugin-ble-central',
|
||||
platforms: ['iOS', 'Android']
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class BLE extends IonicNativePlugin {
|
||||
|
||||
@@ -35,7 +35,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
repo: 'https://github.com/don/BluetoothSerial',
|
||||
plugin: 'cordova-plugin-bluetooth-serial',
|
||||
pluginRef: 'bluetoothSerial',
|
||||
platforms: ['Android', 'iOS', 'Windows Phone', 'Browser']
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class BluetoothSerial extends IonicNativePlugin {
|
||||
|
||||
@@ -4,6 +4,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
* @name Call Number
|
||||
* @description
|
||||
* Call a number directly from your Cordova/Ionic application.
|
||||
* **NOTE**: The iOS Simulator (and maybe Android Simulators) do not provide access to the phone subsystem.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
@@ -14,7 +15,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.callNumber.callNumber(18001010101, true)
|
||||
* this.callNumber.callNumber("18001010101", true)
|
||||
* .then(() => console.log('Launched dialer!'))
|
||||
* .catch(() => console.log('Error launching dialer'));
|
||||
*
|
||||
@@ -25,7 +26,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
plugin: 'call-number',
|
||||
pluginRef: 'plugins.CallNumber',
|
||||
repo: 'https://github.com/Rohfosho/CordovaCallNumberPlugin',
|
||||
platforms: ['iOS', 'Android']
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class CallNumber extends IonicNativePlugin {
|
||||
|
||||
@@ -125,7 +125,7 @@ export interface CameraPopoverOptions {
|
||||
plugin: 'cordova-plugin-camera',
|
||||
pluginRef: 'navigator.camera',
|
||||
repo: 'https://github.com/apache/cordova-plugin-camera',
|
||||
platforms: ['Android', 'BlackBerry', 'Browser', 'Firefox', 'FireOS', 'iOS', 'Windows', 'Windows Phone 8', 'Ubuntu']
|
||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class Camera extends IonicNativePlugin {
|
||||
|
||||
@@ -164,7 +164,7 @@ export interface CardIOResponse {
|
||||
plugin: 'card.io.cordova.mobilesdk',
|
||||
pluginRef: 'CardIO',
|
||||
repo: 'https://github.com/card-io/card.io-Cordova-Plugin',
|
||||
platforms: ['iOS', 'Android']
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class CardIO extends IonicNativePlugin {
|
||||
|
||||
@@ -5,8 +5,6 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
* @description
|
||||
* Clipboard management plugin for Cordova that supports iOS, Android, and Windows Phone 8.
|
||||
*
|
||||
* Requires Cordova plugin: https://github.com/VersoSolutions/CordovaClipboard
|
||||
* For more info, please see the [Clipboard plugin docs](https://github.com/VersoSolutions/CordovaClipboard.git).
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
@@ -31,10 +29,10 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Clipboard',
|
||||
plugin: 'https://github.com/VersoSolutions/CordovaClipboard.git',
|
||||
plugin: 'danielsogl-cordova-plugin-clipboard',
|
||||
pluginRef: 'cordova.plugins.clipboard',
|
||||
repo: 'https://github.com/VersoSolutions/CordovaClipboard',
|
||||
platforms: ['Amazon Fire OS', 'iOS', 'Android', 'BlackBerry 10', 'Windows Phone 7', 'Windows Phone 8', 'Windows', 'Firefox OS', 'Browser']
|
||||
repo: 'https://github.com/danielsogl/cordova-plugin-clipboard',
|
||||
platforms: ['Android', 'iOS', 'Windows', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class Clipboard extends IonicNativePlugin {
|
||||
|
||||
@@ -294,7 +294,7 @@ export class ContactFindOptions implements IContactFindOptions {
|
||||
plugin: 'cordova-plugin-contacts',
|
||||
pluginRef: 'navigator.contacts',
|
||||
repo: 'https://github.com/apache/cordova-plugin-contacts',
|
||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows 8', 'Windows Phone']
|
||||
platforms: ['Android', 'BlackBerry 10', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class Contacts extends IonicNativePlugin {
|
||||
|
||||
@@ -23,7 +23,7 @@ import { Injectable } from '@angular/core';
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'CouchbaseLite',
|
||||
plugin: 'https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin',
|
||||
plugin: 'couchbase-lite-phonegap-plugin',
|
||||
pluginRef: 'cblite',
|
||||
repo: 'https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin',
|
||||
platforms: ['Android', 'iOS']
|
||||
|
||||
@@ -39,7 +39,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
plugin: 'cordova-plugin-dbmeter',
|
||||
pluginRef: 'DBMeter',
|
||||
repo: 'https://github.com/akofman/cordova-plugin-dbmeter',
|
||||
platforms: ['iOS', 'Android']
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class DBMeter extends IonicNativePlugin {
|
||||
|
||||
@@ -49,7 +49,7 @@ export interface DeeplinkMatch {
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* Alternatively, if you're using Ionic 2, there's a convenience method that takes a reference to a `NavController` and handles
|
||||
* Alternatively, if you're using Ionic, there's a convenience method that takes a reference to a `NavController` and handles
|
||||
* the actual navigation for you:
|
||||
*
|
||||
* ```typescript
|
||||
@@ -67,7 +67,7 @@ export interface DeeplinkMatch {
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* See the [Ionic 2 Deeplinks Demo](https://github.com/driftyco/ionic2-deeplinks-demo/blob/master/app/app.ts) for an example of how to
|
||||
* See the [Ionic Deeplinks Demo](https://github.com/ionic-team/ionic2-deeplinks-demo/blob/master/app/app.ts) for an example of how to
|
||||
* retrieve the `NavController` reference at runtime.
|
||||
*
|
||||
* @interfaces
|
||||
@@ -77,10 +77,10 @@ export interface DeeplinkMatch {
|
||||
pluginName: 'Deeplinks',
|
||||
plugin: 'ionic-plugin-deeplinks',
|
||||
pluginRef: 'IonicDeeplink',
|
||||
repo: 'https://github.com/driftyco/ionic-plugin-deeplinks',
|
||||
platforms: ['iOS', 'Android', 'Browser'],
|
||||
repo: 'https://github.com/ionic-team/ionic-plugin-deeplinks',
|
||||
install: 'ionic cordova plugin add ionic-plugin-deeplinks --variable URL_SCHEME=myapp --variable DEEPLINK_SCHEME=https --variable DEEPLINK_HOST=example.com --variable ANDROID_PATH_PREFIX=/',
|
||||
installVariables: ['URL_SCHEME', 'DEEPLINK_SCHEME', 'DEEPLINK_HOST', 'ANDROID_PATH_PREFIX']
|
||||
installVariables: ['URL_SCHEME', 'DEEPLINK_SCHEME', 'DEEPLINK_HOST', 'ANDROID_PATH_PREFIX'],
|
||||
platforms: ['Android', 'Browser', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Deeplinks extends IonicNativePlugin {
|
||||
@@ -103,7 +103,7 @@ export class Deeplinks extends IonicNativePlugin {
|
||||
/**
|
||||
*
|
||||
* This is a convenience version of `route` that takes a reference to a NavController
|
||||
* from Ionic 2, or a custom class that conforms to this protocol:
|
||||
* from Ionic, or a custom class that conforms to this protocol:
|
||||
*
|
||||
* NavController.push = function(View, Params){}
|
||||
*
|
||||
|
||||
@@ -22,9 +22,9 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'DeviceAccounts',
|
||||
plugin: 'https://github.com/loicknuchel/cordova-device-accounts.git',
|
||||
plugin: 'cordova-device-accounts',
|
||||
pluginRef: 'plugins.DeviceAccounts',
|
||||
repo: 'https://github.com/loicknuchel/cordova-device-accounts',
|
||||
repo: 'https://github.com/danielsogl/cordova-device-accounts',
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable()
|
||||
|
||||
@@ -72,7 +72,7 @@ export interface DeviceMotionAccelerometerOptions {
|
||||
plugin: 'cordova-plugin-device-motion',
|
||||
pluginRef: 'navigator.accelerometer',
|
||||
repo: 'https://github.com/apache/cordova-plugin-device-motion',
|
||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class DeviceMotion extends IonicNativePlugin {
|
||||
|
||||
@@ -77,7 +77,7 @@ export interface DeviceOrientationCompassOptions {
|
||||
plugin: 'cordova-plugin-device-orientation',
|
||||
pluginRef: 'navigator.compass',
|
||||
repo: 'https://github.com/apache/cordova-plugin-device-orientation',
|
||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class DeviceOrientation extends IonicNativePlugin {
|
||||
|
||||
@@ -24,7 +24,7 @@ declare const window: any;
|
||||
plugin: 'cordova-plugin-device',
|
||||
pluginRef: 'device',
|
||||
repo: 'https://github.com/apache/cordova-plugin-device',
|
||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'OS X', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'macOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class Device extends IonicNativePlugin {
|
||||
|
||||
@@ -45,8 +45,8 @@ export interface DialogsPromptCallback {
|
||||
pluginName: 'Dialogs',
|
||||
plugin: 'cordova-plugin-dialogs',
|
||||
pluginRef: 'navigator.notification',
|
||||
repo: 'https://github.com/apache/cordova-plugin-dialogs.git',
|
||||
platforms: ['Android', 'BlackBerry 10', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
repo: 'https://github.com/apache/cordova-plugin-dialogs',
|
||||
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class Dialogs extends IonicNativePlugin {
|
||||
@@ -69,7 +69,7 @@ export class Dialogs extends IonicNativePlugin {
|
||||
* @param {string} message Dialog message.
|
||||
* @param {string} title Dialog title. (Optional, defaults to Confirm)
|
||||
* @param {Array<string>} buttonLabels Array of strings specifying button labels. (Optional, defaults to [OK,Cancel])
|
||||
* @returns {Promise<number>} Returns a promise that resolves the button index that was clicked. Note that the index use one-based indexing.
|
||||
* @returns {Promise<number>} Returns a promise that resolves the button index that was clicked, or 0 if the user has dismissed the dialog by clicking outside the dialog box. Note that the index use one-based indexing.
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
|
||||
@@ -90,13 +90,13 @@ export class DocumentViewer extends IonicNativePlugin {
|
||||
*
|
||||
* @param url {string} Url to the file
|
||||
* @param contentType {string} Content type of the file
|
||||
* @param options {Array<DocumentViewerOptions>} options
|
||||
* @param options {DocumentViewerOptions} options
|
||||
* @param [onShow] {Function}
|
||||
* @param [onClose] {Function}
|
||||
* @param [onMissingApp] {Function}
|
||||
* @param [onError] {Function}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
viewDocument(url: string, contentType: string, options: Array<DocumentViewerOptions>, onShow?: Function, onClose?: Function, onMissingApp?: Function, onError?: Function): void { }
|
||||
viewDocument(url: string, contentType: string, options: DocumentViewerOptions, onShow?: Function, onClose?: Function, onMissingApp?: Function, onError?: Function): void { }
|
||||
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ export interface EmailComposerOptions {
|
||||
plugin: 'cordova-plugin-email',
|
||||
pluginRef: 'cordova.plugins.email',
|
||||
repo: 'https://github.com/hypery2k/cordova-email-plugin',
|
||||
platforms: ['Android', 'iOS']
|
||||
platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class EmailComposer extends IonicNativePlugin {
|
||||
|
||||
@@ -44,7 +44,7 @@ export interface EstimoteBeaconRegion {
|
||||
plugin: 'cordova-plugin-estimote',
|
||||
pluginRef: 'estimote.beacons',
|
||||
repo: 'https://github.com/evothings/phonegap-estimotebeacons',
|
||||
platforms: ['iOS', 'Android']
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class EstimoteBeacons extends IonicNativePlugin {
|
||||
@@ -512,4 +512,3 @@ export class EstimoteBeacons extends IonicNativePlugin {
|
||||
writeConnectedMinor(minor: number): Promise<any> { return; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ export interface FacebookLoginResponse {
|
||||
* Then type in the following command in your Terminal, where APP_ID and APP_NAME are the values from the Facebook Developer portal.
|
||||
*
|
||||
* ```bash
|
||||
* ionic plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"
|
||||
* ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"
|
||||
* ```
|
||||
*
|
||||
* After, you'll need to add the native platforms you'll be using to your app in the Facebook Developer portal under your app's Settings:
|
||||
@@ -116,7 +116,7 @@ export interface FacebookLoginResponse {
|
||||
repo: 'https://github.com/jeduan/cordova-plugin-facebook4',
|
||||
install: 'ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"',
|
||||
installVariables: ['APP_ID', 'APP_NAME'],
|
||||
platforms: ['Android', 'iOS']
|
||||
platforms: ['Android', 'iOS', 'Browser']
|
||||
})
|
||||
@Injectable()
|
||||
export class Facebook extends IonicNativePlugin {
|
||||
|
||||
@@ -28,15 +28,15 @@ export interface NotificationData {
|
||||
* import { FCM } from '@ionic-native/fcm';
|
||||
*
|
||||
* constructor(private fcm: FCM) {}
|
||||
*
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* fcm.subscribeToTopic('marketing');
|
||||
*
|
||||
*
|
||||
* fcm.getToken().then(token=>{
|
||||
* backend.registerToken(token);
|
||||
* })
|
||||
*
|
||||
*
|
||||
* fcm.onNotification().subscribe(data=>{
|
||||
* if(data.wasTapped){
|
||||
* console.log("Received in background");
|
||||
@@ -44,13 +44,13 @@ export interface NotificationData {
|
||||
* console.log("Received in foreground");
|
||||
* };
|
||||
* })
|
||||
*
|
||||
*
|
||||
* fcm.onTokenRefresh().subscribe(token=>{
|
||||
* backend.registerToken(token);
|
||||
* })
|
||||
*
|
||||
*
|
||||
* fcm.unsubscribeFromTopic('marketing');
|
||||
*
|
||||
*
|
||||
* ```
|
||||
* @interfaces
|
||||
* NotificationData
|
||||
@@ -60,14 +60,14 @@ export interface NotificationData {
|
||||
plugin: 'cordova-plugin-fcm',
|
||||
pluginRef: 'FCMPlugin',
|
||||
repo: 'https://github.com/fechanique/cordova-plugin-fcm',
|
||||
platforms: ['iOS', 'Android']
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class FCM extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Get's device's current registration id
|
||||
*
|
||||
*
|
||||
* @returns {Promise<string>} Returns a Promise that resolves with the registration id token
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -75,7 +75,7 @@ export class FCM extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Event firing on the token refresh
|
||||
*
|
||||
*
|
||||
* @returns {Observable<string>} Returns an Observable that notifies with the change of device's registration id
|
||||
*/
|
||||
@Cordova({
|
||||
@@ -85,9 +85,9 @@ export class FCM extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Subscribes you to a [topic](https://firebase.google.com/docs/notifications/android/console-topics)
|
||||
*
|
||||
*
|
||||
* @param {string} topic Topic to be subscribed to
|
||||
*
|
||||
*
|
||||
* @returns {Promise<any>} Returns a promise resolving in result of subscribing to a topic
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -95,9 +95,9 @@ export class FCM extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Unubscribes you from a [topic](https://firebase.google.com/docs/notifications/android/console-topics)
|
||||
*
|
||||
*
|
||||
* @param {string} topic Topic to be unsubscribed from
|
||||
*
|
||||
*
|
||||
* @returns {Promise<any>} Returns a promise resolving in result of unsubscribing from a topic
|
||||
*/
|
||||
@Cordova()
|
||||
@@ -105,7 +105,7 @@ export class FCM extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Watch for incoming notifications
|
||||
*
|
||||
*
|
||||
* @returns {Observable<any>} returns an object with data from the notification
|
||||
*/
|
||||
@Cordova({
|
||||
|
||||
@@ -23,9 +23,9 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'FileChooser',
|
||||
plugin: 'https://github.com/don/cordova-filechooser.git',
|
||||
plugin: 'cordova-plugin-filechooser',
|
||||
pluginRef: 'fileChooser',
|
||||
repo: 'https://github.com/don/cordova-filechooser',
|
||||
repo: 'https://github.com/ihadeed/cordova-filechooser',
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable()
|
||||
|
||||
@@ -620,7 +620,7 @@ declare const window: Window;
|
||||
plugin: 'cordova-plugin-file',
|
||||
pluginRef: 'cordova.file',
|
||||
repo: 'https://github.com/apache/cordova-plugin-file',
|
||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'OS X', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'macOS', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class File extends IonicNativePlugin {
|
||||
|
||||
85
src/@ionic-native/plugins/firebase-analytics/index.ts
Normal file
85
src/@ionic-native/plugins/firebase-analytics/index.ts
Normal file
@@ -0,0 +1,85 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @name Firebase Analytics
|
||||
* @description
|
||||
* Cordova plugin for Firebase Analytics
|
||||
*
|
||||
* Go yo firebase console and export google-services.json and GoogleService-Info.plist. Put those files into the root of your cordova app folder.
|
||||
*
|
||||
* NOTE: on iOS in order to collect demographic, age, gender data etc. you should additionally include AdSupport.framework into your project.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { FirebaseAnalytics } from '@ionic-native/firebase-analytics';
|
||||
*
|
||||
*
|
||||
* constructor(private firebaseAnalytics: FirebaseAnalytics) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.firebaseAnalytics.logEvent('page_view', {page: "dashboard"})
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'FirebaseAnalytics',
|
||||
plugin: 'cordova-plugin-firebase-analytics',
|
||||
pluginRef: 'cordova.plugins.firebase.analytics',
|
||||
repo: 'https://github.com/chemerisuk/cordova-plugin-firebase-analytics',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class FirebaseAnalytics extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Logs an app event.
|
||||
* Be aware of automatically collected events.
|
||||
* @param name {string} The name of the event
|
||||
* @param params {any} Some param to configure something
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
logEvent(name: string, params: any): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Sets the user ID property.
|
||||
* This feature must be used in accordance with Google's Privacy Policy.
|
||||
* @param id {string} THe user ID
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
setUserId(id: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* This feature must be used in accordance with Google's Privacy Policy.
|
||||
* Be aware of automatically collected user properties.
|
||||
* @param name {string} The property name
|
||||
* @param value {string} The property value
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
setUserProperty(name: string, value: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Sets whether analytics collection is enabled for this app on this device.
|
||||
* @param enabled {boolean}
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
setEnabled(enabled: boolean): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Sets the current screen name, which specifies the current visual context in your app.
|
||||
* This helps identify the areas in your app where users spend their time and how they interact with your app.
|
||||
* @param name {string} The name of the screen
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
setCurrentScreen(name: string): Promise<any> { return; }
|
||||
|
||||
}
|
||||
85
src/@ionic-native/plugins/firebase-dynamic-links/index.ts
Normal file
85
src/@ionic-native/plugins/firebase-dynamic-links/index.ts
Normal file
@@ -0,0 +1,85 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface DynamicLinksOptions {
|
||||
title: string;
|
||||
message: string;
|
||||
deepLink?: string;
|
||||
callToActionText?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @name Firebase Dynamic Links
|
||||
* @description
|
||||
* Cordova plugin for Firebase Invites and Firebase Dynamic Links
|
||||
*
|
||||
* Variables APP_DOMAIN and APP_PATH specify web URL where your app will start an activity to handle the link. They also used to setup support for App Indexing.
|
||||
*
|
||||
* Go to firebase console and export google-services.json and GoogleService-Info.plist. Put those files into the root of your cordova app folder.
|
||||
*
|
||||
* Preferences:
|
||||
*
|
||||
* Preferences GoogleIOSClientId and GoogleAndroidClientId are used to setup dynamic links when you have an app for several platforms.
|
||||
* You can find values at your GoogleService-Info.plist (key ANDROID_CLIENT_ID) and google-services.json (key client[0].oauth_client[0].client_id).
|
||||
*
|
||||
*config.xml:
|
||||
* ```xml
|
||||
* <platform name="android">
|
||||
* <preference name="GoogleIOSClientId" value="..." />
|
||||
* </platform>
|
||||
* <platform name="ios">
|
||||
* <preference name="GoogleAndroidClientId" value="..." />
|
||||
* </platform>
|
||||
* ```
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { FirebaseDynamicLinks } from '@ionic-native/firebase-dynamic-links';
|
||||
*
|
||||
*
|
||||
* constructor(private firebaseDynamicLinks: FirebaseDynamicLinks) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* const options: DynamicLinksOptions = {
|
||||
* title: 'My Title';
|
||||
* message: 'My message';
|
||||
* }
|
||||
*
|
||||
* this.firebaseDynamicLinks.sendInvitation(options)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*
|
||||
* @interfaces
|
||||
* DynamicLinksOptions
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'FirebaseDynamicLinks',
|
||||
plugin: ' cordova-plugin-firebase-dynamiclinks',
|
||||
pluginRef: 'cordova.plugins.firebase.dynamiclinks',
|
||||
repo: 'https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks',
|
||||
install: 'ionic cordova plugin add cordova-plugin-firebase-dynamiclinks --save --variable APP_DOMAIN="example.com" --variable APP_PATH="/"',
|
||||
installVariables: ['APP_DOMAIN', 'APP_PATH'],
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class FirebaseDynamicLinks extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Registers callback that is triggered on each dynamic link click.
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
onDynamicLink(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Display invitation dialog.
|
||||
* @param options {DynamicLinksOptions} Some param to configure something
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
sendInvitation(options: DynamicLinksOptions): Promise<any> { return; }
|
||||
|
||||
}
|
||||
@@ -23,7 +23,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
pluginName: 'Flashlight',
|
||||
plugin: 'cordova-plugin-flashlight',
|
||||
pluginRef: 'window.plugins.flashlight',
|
||||
repo: 'https://github.com/EddyVerbruggen/Flashlight-PhoneGap-Plugin.git',
|
||||
repo: 'https://github.com/EddyVerbruggen/Flashlight-PhoneGap-Plugin',
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
|
||||
@@ -211,8 +211,8 @@ export class FlurryAnalyticsObject {
|
||||
pluginName: 'FlurryAnalytics',
|
||||
plugin: 'cordova-plugin-flurryanalytics',
|
||||
pluginRef: 'FlurryAnalytics',
|
||||
repo: 'https://github.com/blakgeek/cordova-plugin-flurryanalytics.git',
|
||||
platforms: ['Android', 'iOS', 'Browser']
|
||||
repo: 'https://github.com/blakgeek/cordova-plugin-flurryanalytics',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class FlurryAnalytics extends IonicNativePlugin {
|
||||
@@ -227,7 +227,7 @@ export class FlurryAnalytics extends IonicNativePlugin {
|
||||
let instance: any;
|
||||
|
||||
if (checkAvailability(FlurryAnalytics.pluginRef, null, FlurryAnalytics.pluginName) === true) {
|
||||
instance = new (window as any).FlurryAnalaytics(options);
|
||||
instance = new (window as any).FlurryAnalytics(options);
|
||||
}
|
||||
|
||||
return new FlurryAnalyticsObject(instance);
|
||||
|
||||
133
src/@ionic-native/plugins/ftp/index.ts
Normal file
133
src/@ionic-native/plugins/ftp/index.ts
Normal file
@@ -0,0 +1,133 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name FTP
|
||||
* @description
|
||||
* This cordova plugin is created to use ftp (client) in web/js.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { FTP } from '@ionic-native/ftp';
|
||||
*
|
||||
*
|
||||
* constructor(private fTP: FTP) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.fTP.connect('ftp_host', 'ftp_user', 'ftp_password')
|
||||
* .then((res: any) => console.log('Login successful', res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'FTP',
|
||||
plugin: 'cordova-plugin-ftp',
|
||||
pluginRef: 'cordova.plugin.ftp',
|
||||
repo: 'https://github.com/xfally/cordova-plugin-ftp',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class FTP extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Connect to one ftp server.
|
||||
*
|
||||
* Just need to init the connection once. If success, you can do any ftp actions later.
|
||||
* @param hostname {string} The ftp server url. Like ip without protocol prefix, e.g. "192.168.1.1".
|
||||
* @param username {string} The ftp login username. If it and `password` are all blank/undefined, the default username "anonymous" is used.
|
||||
* @param password {string} The ftp login password. If it and `username` are all blank/undefined, the default password "anonymous@" is used.
|
||||
* @return {Promise<any>} The success callback. Notice: For iOS, if triggered, means `init` success, but NOT means the later action, e.g. `ls`... `download` will success!
|
||||
*/
|
||||
@Cordova()
|
||||
connect(hostname: string, username: string, password: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* List files (with info of `name`, `type`, `link`, `size`, `modifiedDate`) under one directory on the ftp server.
|
||||
* You can get one file's name using `fileList[x].name` (`x` is the location in array).
|
||||
*
|
||||
* Explain key:
|
||||
* - name: file name (utf-8).
|
||||
* - type: file type. number `0` means regular file, `1` means directory, `2` means symbolic link, `-1` means unknown type (maybe block dev, char dev...).
|
||||
* - link: if the file is a symbolic link, then this field store symbolic link information (utf-8), else it's a blank string.
|
||||
* - size: file size in bytes.
|
||||
* - modifiedDate: modified date of this file. date format is `yyyy-MM-dd HH:mm:ss zzz`, e.g "2015-12-01 20:45:00 GMT+8".
|
||||
*
|
||||
* @param path {string} The path on the ftp server. e.g. "/adf/123/".
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
ls(path: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Create one directory on the ftp server.
|
||||
*
|
||||
* @param path {string} The path on the ftp server. e.g. "/adf/123/".
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
mkdir(path: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Delete one directory on the ftp server.
|
||||
*
|
||||
* Tip: As many ftp server could not rm dir when it's not empty, so rm all files under the dir at first is recommended.
|
||||
*
|
||||
* @param path {string} The file (with full path) you want to delete. e.g. "/adf/123/newDir/myFile".
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
rmdir(path: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Delete one file on the ftp server.
|
||||
*
|
||||
* @param file {string} The file (with full path) you want to delete. e.g. "/adf/123/newDir/myFile".
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
rm(file: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Upload one local file to the ftp server.
|
||||
*
|
||||
* @param localFile {string} The file (with full path) you want to upload. e.g. "/local/path/to/localFile".
|
||||
* @param remoteFile {string} The file (with full path) you want to located on the ftp server. e.g. "/adf/123/newDir/remoteFile".
|
||||
* @return {Promise<any>} Returns a promise.
|
||||
* It will be triggered many times according the file's size.
|
||||
* The arg `0`, `0.1xx`, `0.2xx` ... `1` means the upload percent. When it reach `1`, means success.
|
||||
*/
|
||||
@Cordova()
|
||||
upload(localFile: string, remoteFile: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Download one remote file on the ftp server to local path.
|
||||
*
|
||||
* @param localFile {string} The file (with full path) you want to upload. e.g. "/local/path/to/localFile".
|
||||
* @param remoteFile {string} The file (with full path) you want to located on the ftp server. e.g. "/adf/123/newDir/remoteFile".
|
||||
* @return {Promise<any>} Returns a promise.
|
||||
* It will be triggered many times according the file's size.
|
||||
* The arg `0`, `0.1xx`, `0.2xx` ... `1` means the upload percent. When it reach `1`, means success.
|
||||
*/
|
||||
@Cordova()
|
||||
download(localFile: string, remoteFile: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Cancel all requests. Always success.
|
||||
*
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
cancel(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Disconnect from ftp server.
|
||||
*
|
||||
* @return {Promise<any>} Returns a promise
|
||||
*/
|
||||
@Cordova()
|
||||
disconnect(): Promise<any> { return; }
|
||||
|
||||
}
|
||||
@@ -72,15 +72,15 @@ declare const window: any;
|
||||
* ### Troubleshooting ###
|
||||
* #### I get compile errors when I run `ionic build ios` or `ionic run ios`. ####
|
||||
* This could be caused by the Cordova project directory in `/platforms/ios` not being named correctly.
|
||||
* Try running `ionic platform rm <platform>` then run `ionic platform add <platform>` to recreate the
|
||||
* Try running `ionic cordova platform rm <platform>` then run `ionic cordova platform add <platform>` to recreate the
|
||||
* platform directories.
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Geofence',
|
||||
plugin: 'cordova-plugin-geofence',
|
||||
pluginRef: 'geofence',
|
||||
repo: 'https://github.com/cowbell/cordova-plugin-geofence/',
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8', 'Windows Phone']
|
||||
repo: 'https://github.com/cowbell/cordova-plugin-geofence',
|
||||
platforms: ['Android', 'iOS', 'Windows', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class Geofence extends IonicNativePlugin {
|
||||
|
||||
@@ -153,7 +153,7 @@ export interface GeolocationOptions {
|
||||
plugin: 'cordova-plugin-geolocation',
|
||||
pluginRef: 'navigator.geolocation',
|
||||
repo: 'https://github.com/apache/cordova-plugin-geolocation',
|
||||
platforms: ['Android', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class Geolocation extends IonicNativePlugin {
|
||||
|
||||
@@ -26,7 +26,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
plugin: 'cordova-plugin-globalization',
|
||||
pluginRef: 'navigator.globalization',
|
||||
repo: 'https://github.com/apache/cordova-plugin-globalization',
|
||||
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Firefox OS', 'iOS', 'Windows Phone 8', 'Widnows', 'Browser']
|
||||
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class Globalization extends IonicNativePlugin {
|
||||
|
||||
@@ -34,7 +34,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
plugin: 'cordova-plugin-google-analytics',
|
||||
pluginRef: 'ga',
|
||||
repo: 'https://github.com/danwilson/google-analytics-plugin',
|
||||
platforms: ['Android', 'iOS', 'Browser']
|
||||
platforms: ['Android', 'Browser', 'iOS', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class GoogleAnalytics extends IonicNativePlugin {
|
||||
|
||||
@@ -23,9 +23,9 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
plugin: 'cordova-plugin-googleplus',
|
||||
pluginRef: 'window.plugins.googleplus',
|
||||
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-googleplus',
|
||||
platforms: ['Web', 'Android', 'iOS'],
|
||||
install: 'ionic cordova plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=myreversedclientid',
|
||||
installVariables: ['REVERSED_CLIENT_ID']
|
||||
installVariables: ['REVERSED_CLIENT_ID'],
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class GooglePlus extends IonicNativePlugin {
|
||||
|
||||
@@ -49,10 +49,10 @@ export interface HttpdOptions {
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Httpd',
|
||||
plugin: 'https://github.com/floatinghotpot/cordova-httpd.git',
|
||||
plugin: 'cordova-plugin-httpd',
|
||||
pluginRef: 'cordova.plugins.CorHttpd',
|
||||
repo: 'https://github.com/floatinghotpot/cordova-httpd',
|
||||
platforms: ['iOS', 'Android']
|
||||
platforms: ['Android', 'iOS', 'macOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Httpd extends IonicNativePlugin {
|
||||
|
||||
@@ -16,7 +16,7 @@ export interface Beacon {
|
||||
major: number;
|
||||
|
||||
/**
|
||||
* The beacon's major identifier number.
|
||||
* The beacon's minor identifier number.
|
||||
*/
|
||||
minor: number;
|
||||
|
||||
@@ -636,7 +636,7 @@ export class IBeacon extends IonicNativePlugin {
|
||||
* native layer acknowledged the dispatch of the advertising request.
|
||||
*/
|
||||
@Cordova({ otherPromise: true })
|
||||
startAdvertising(region: Region, measuredPower: number): Promise<void> { return; }
|
||||
startAdvertising(region: Region, measuredPower?: number): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Stop advertising as a beacon.
|
||||
|
||||
@@ -57,9 +57,11 @@ export interface ImagePickerOptions {
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'ImagePicker',
|
||||
plugin: 'https://github.com/Telerik-Verified-Plugins/ImagePicker',
|
||||
plugin: 'https://github.com/Telerik-Verified-Plugins/ImagePicker.git',
|
||||
pluginRef: 'window.imagePicker',
|
||||
repo: 'https://github.com/Telerik-Verified-Plugins/ImagePicker',
|
||||
install: 'ionic cordova plugin add https://github.com/Telerik-Verified-Plugins/ImagePicker.git --variable PHOTO_LIBRARY_USAGE_DESCRIPTION="your usage message"',
|
||||
installVariables: ['PHOTO_LIBRARY_USAGE_DESCRIPTION'],
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
|
||||
@@ -43,7 +43,7 @@ export interface ImageResizerOptions {
|
||||
* Cordova Plugin For Image Resize
|
||||
*
|
||||
* Requires plugin `info.protonet.imageresizer` - use the Ionic CLI and type in the following command:
|
||||
* `ionic plugin add https://github.com/protonet/cordova-plugin-image-resizer.git`
|
||||
* `ionic cordova plugin add https://github.com/protonet/cordova-plugin-image-resizer.git`
|
||||
*
|
||||
* For more info, please see the https://github.com/protonet/cordova-plugin-image-resizer
|
||||
*
|
||||
|
||||
@@ -181,7 +181,7 @@ export class InAppBrowserObject {
|
||||
plugin: 'cordova-plugin-inappbrowser',
|
||||
pluginRef: 'cordova.InAppBrowser',
|
||||
repo: 'https://github.com/apache/cordova-plugin-inappbrowser',
|
||||
platforms: ['Amazon', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'OS X', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
platforms: ['AmazonFire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'macOS', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class InAppBrowser extends IonicNativePlugin {
|
||||
|
||||
@@ -57,8 +57,8 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
pluginName: 'InAppPurchase',
|
||||
plugin: 'cordova-plugin-inapppurchase',
|
||||
pluginRef: 'inAppPurchase',
|
||||
platforms: ['Android', 'iOS'],
|
||||
repo: 'https://github.com/AlexDisler/cordova-plugin-inapppurchase'
|
||||
repo: 'https://github.com/AlexDisler/cordova-plugin-inapppurchase',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class InAppPurchase extends IonicNativePlugin {
|
||||
|
||||
@@ -31,10 +31,10 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Insomnia',
|
||||
plugin: 'https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin.git',
|
||||
plugin: 'cordova-plugin-insomnia',
|
||||
pluginRef: 'plugins.insomnia',
|
||||
repo: 'https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin',
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8']
|
||||
platforms: ['Android', 'Browser', 'Firefox OS', 'iOS', 'Windows', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class Insomnia extends IonicNativePlugin {
|
||||
|
||||
@@ -53,7 +53,7 @@ export interface IntelSecurityDataOptions {
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* this.intelSecurity.storage.read({id: storageID })
|
||||
* .then((instanceID: number) => this.intelSec.data.getData(instanceID))
|
||||
* .then((instanceID: number) => this.intelSecurity.data.getData(instanceID))
|
||||
* .then((data: string) => console.log(data)) // Resolves to 'Sample Data'
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
@@ -72,7 +72,7 @@ export interface IntelSecurityDataOptions {
|
||||
plugin: 'com-intel-security-cordova-plugin',
|
||||
pluginRef: 'intel.security',
|
||||
repo: 'https://github.com/AppSecurityApi/com-intel-security-cordova-plugin',
|
||||
platforms: ['Android', 'iOS', 'Windows']
|
||||
platforms: ['Android', 'iOS', 'Windows', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class IntelSecurity extends IonicNativePlugin {
|
||||
|
||||
@@ -24,7 +24,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
pluginName: 'Keyboard',
|
||||
plugin: 'ionic-plugin-keyboard',
|
||||
pluginRef: 'cordova.plugins.Keyboard',
|
||||
repo: 'https://github.com/driftyco/ionic-plugin-keyboard',
|
||||
repo: 'https://github.com/ionic-team/ionic-plugin-keyboard',
|
||||
platforms: ['Android', 'BlackBerry 10', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
@@ -57,7 +57,7 @@ export class Keyboard extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Prevents the native UIScrollView from moving when an input is focused.
|
||||
* @param disable
|
||||
* @param disable {boolean}
|
||||
*/
|
||||
@Cordova({
|
||||
sync: true,
|
||||
|
||||
@@ -7,7 +7,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
* @description
|
||||
* Get and set data in the iOS Keychain
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-ios-keychain`. For more info, please see the [Keychain plugin docs](https://github.com/driftyco/cordova-plugin-ios-keychain).
|
||||
* Requires Cordova plugin: `cordova-plugin-ios-keychain`. For more info, please see the [Keychain plugin docs](https://github.com/ionic-team/cordova-plugin-ios-keychain).
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
@@ -29,7 +29,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
pluginName: 'Keychain',
|
||||
plugin: 'cordova-plugin-ios-keychain',
|
||||
pluginRef: 'window.Keychain',
|
||||
repo: 'https://github.com/driftyco/cordova-plugin-ios-keychain/',
|
||||
repo: 'https://github.com/ionic-team/cordova-plugin-ios-keychain',
|
||||
platforms: ['iOS']
|
||||
})
|
||||
@Injectable()
|
||||
|
||||
@@ -92,7 +92,7 @@ export interface LaunchNavigatorOptions {
|
||||
plugin: 'uk.co.workingedge.phonegap.plugin.launchnavigator',
|
||||
pluginRef: 'launchnavigator',
|
||||
repo: 'https://github.com/dpa99c/phonegap-launch-navigator',
|
||||
platforms: ['Android', 'iOS']
|
||||
platforms: ['Android', 'iOS', 'Windows', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class LaunchNavigator extends IonicNativePlugin {
|
||||
|
||||
@@ -54,6 +54,7 @@ export type LinkedInLoginScopes = 'r_basicprofile' | 'r_emailaddress' | 'rw_comp
|
||||
pluginRef: 'cordova.plugins.LinkedIn',
|
||||
repo: 'https://github.com/zyra/cordova-plugin-linkedin',
|
||||
install: 'ionic cordova plugin add cordova-plugin-linkedin --variable APP_ID=YOUR_APP_ID',
|
||||
installVariables: ['APP_ID'],
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
|
||||
@@ -89,6 +89,11 @@ export interface ILocalNotification {
|
||||
* Default: FFFFFF
|
||||
*/
|
||||
led?: string;
|
||||
|
||||
/**
|
||||
* Notification priority.
|
||||
*/
|
||||
priority?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -146,7 +146,8 @@ export interface ConfigurationData {
|
||||
pluginName: 'MediaCapture',
|
||||
plugin: 'cordova-plugin-media-capture',
|
||||
pluginRef: 'navigator.device.capture',
|
||||
repo: 'https://github.com/apache/cordova-plugin-media-capture'
|
||||
repo: 'https://github.com/apache/cordova-plugin-media-capture',
|
||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'iOS', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class MediaCapture extends IonicNativePlugin {
|
||||
|
||||
@@ -120,6 +120,8 @@ export type MediaErrorCallback = (error: MediaError) => void;
|
||||
/**
|
||||
* @name Media
|
||||
* @description
|
||||
* This plugin provides the ability to record and play back audio files on a device.
|
||||
*
|
||||
* Some hints if you are using iOS and recording doesn't work:
|
||||
* 1.) Try to use a absolute file path but remove beginning "file://".
|
||||
* Then it looks like: `/var/mobile/Containers/Data/Application/AF438B8B-7724-4FBB-8E69-083463224FC4/tmp/my_file.m4a`
|
||||
@@ -143,7 +145,7 @@ export type MediaErrorCallback = (error: MediaError) => void;
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* You can find the reasons here: https://github.com/driftyco/ionic-native/issues/1452#issuecomment-299605906
|
||||
* You can find the reasons here: https://github.com/ionic-team/ionic-native/issues/1452#issuecomment-299605906
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
@@ -212,7 +214,8 @@ export type MediaErrorCallback = (error: MediaError) => void;
|
||||
pluginName: 'MediaPlugin',
|
||||
repo: 'https://github.com/apache/cordova-plugin-media',
|
||||
plugin: 'cordova-plugin-media',
|
||||
pluginRef: 'Media'
|
||||
pluginRef: 'Media',
|
||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class MediaPlugin extends IonicNativePlugin {
|
||||
|
||||
@@ -28,7 +28,8 @@ declare var mixpanel: any;
|
||||
pluginName: 'Mixpanel',
|
||||
plugin: 'cordova-plugin-mixpanel',
|
||||
pluginRef: 'mixpanel',
|
||||
repo: 'https://github.com/samzilverberg/cordova-mixpanel-plugin'
|
||||
repo: 'https://github.com/samzilverberg/cordova-mixpanel-plugin',
|
||||
platforms: ['Android', 'Browser', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Mixpanel extends IonicNativePlugin {
|
||||
|
||||
@@ -22,10 +22,10 @@ import { Injectable } from '@angular/core';
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'MobileAccessibility',
|
||||
plugin: 'https://github.com/phonegap/phonegap-mobile-accessibility.git',
|
||||
pluginRef: 'MobileAccessibilityNotifications',
|
||||
plugin: 'phonegap-plugin-mobile-accessibility',
|
||||
pluginRef: 'MobileAccessibility',
|
||||
repo: 'https://github.com/phonegap/phonegap-mobile-accessibility',
|
||||
platforms: ['Amazon Fire OS', 'Android', 'iOS']
|
||||
platforms: ['Android Fire OS', 'Android', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class MobileAccessibility extends IonicNativePlugin {
|
||||
@@ -179,7 +179,7 @@ export class MobileAccessibility extends IonicNativePlugin {
|
||||
getTextZoomCallback(): Promise<number> { return; }
|
||||
|
||||
/**
|
||||
* @param textZoom {nuber} A percentage value by which text in the WebView should be scaled.
|
||||
* @param textZoom {number} A percentage value by which text in the WebView should be scaled.
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setTextZoom(textZoom: number): void { }
|
||||
|
||||
@@ -58,38 +58,53 @@ export interface MusicControlsOptions {
|
||||
*
|
||||
* this.musicControls.subscribe().subscribe(action => {
|
||||
*
|
||||
* switch(action) {
|
||||
* case 'music-controls-next':
|
||||
* // Do something
|
||||
* break;
|
||||
* case 'music-controls-previous':
|
||||
* // Do something
|
||||
* break;
|
||||
* case 'music-controls-pause':
|
||||
* // Do something
|
||||
* break;
|
||||
* case 'music-controls-play':
|
||||
* // Do something
|
||||
* break;
|
||||
* case 'music-controls-destroy':
|
||||
* function events(action) {
|
||||
* const message = JSON.parse(action).message;
|
||||
* switch(message) {
|
||||
* case 'music-controls-next':
|
||||
* // Do something
|
||||
* break;
|
||||
* case 'music-controls-previous':
|
||||
* // Do something
|
||||
* break;
|
||||
* case 'music-controls-pause':
|
||||
* // Do something
|
||||
* break;
|
||||
* case 'music-controls-play':
|
||||
* // Do something
|
||||
* break;
|
||||
* case 'music-controls-destroy':
|
||||
* // Do something
|
||||
* break;
|
||||
*
|
||||
* // External controls (iOS only)
|
||||
* case 'music-controls-toggle-play-pause' :
|
||||
* // Do something
|
||||
* break;
|
||||
* case 'music-controls-seek-to':
|
||||
* const seekToInSeconds = JSON.parse(action).position;
|
||||
* MusicControls.updateElapsed({
|
||||
* elapsed: seekToInSeconds,
|
||||
* isPlaying: true
|
||||
* });
|
||||
* // Do something
|
||||
* break;
|
||||
*
|
||||
* // Headset events (Android only)
|
||||
* case 'music-controls-media-button' :
|
||||
* // Do something
|
||||
* break;
|
||||
* case 'music-controls-headset-unplugged':
|
||||
* // Do something
|
||||
* break;
|
||||
* case 'music-controls-headset-plugged':
|
||||
* // Do something
|
||||
* break;
|
||||
* default:
|
||||
* break;
|
||||
* }
|
||||
*
|
||||
* });
|
||||
* // Headset events (Android only)
|
||||
* // All media button events are listed below
|
||||
* case 'music-controls-media-button' :
|
||||
* // Do something
|
||||
* break;
|
||||
* case 'music-controls-headset-unplugged':
|
||||
* // Do something
|
||||
* break;
|
||||
* case 'music-controls-headset-plugged':
|
||||
* // Do something
|
||||
* break;
|
||||
* default:
|
||||
* break;
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* this.musicControls.listen(); // activates the observable above
|
||||
*
|
||||
@@ -104,7 +119,8 @@ export interface MusicControlsOptions {
|
||||
pluginName: 'MusicControls',
|
||||
plugin: 'cordova-plugin-music-controls',
|
||||
pluginRef: 'MusicControls',
|
||||
repo: 'https://github.com/homerours/cordova-music-controls-plugin'
|
||||
repo: 'https://github.com/homerours/cordova-music-controls-plugin',
|
||||
platforms: ['Android', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class MusicControls extends IonicNativePlugin {
|
||||
@@ -146,6 +162,15 @@ export class MusicControls extends IonicNativePlugin {
|
||||
@Cordova()
|
||||
updateIsPlaying(isPlaying: boolean): void { }
|
||||
|
||||
/**
|
||||
* Update elapsed time, optionally toggle play/pause:
|
||||
* @param args {elapsed: string, isPlaying: boolean}
|
||||
*/
|
||||
@Cordova({
|
||||
platforms: ['iOS']
|
||||
})
|
||||
updateElapsed(args: object): void { }
|
||||
|
||||
/**
|
||||
* Toggle dismissable:
|
||||
* @param dismissable {boolean}
|
||||
|
||||
@@ -33,7 +33,8 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
pluginName: 'NativeAudio',
|
||||
plugin: 'cordova-plugin-nativeaudio',
|
||||
pluginRef: 'plugins.NativeAudio',
|
||||
repo: 'https://github.com/floatinghotpot/cordova-plugin-nativeaudio'
|
||||
repo: 'https://github.com/floatinghotpot/cordova-plugin-nativeaudio',
|
||||
platforms: ['Android', 'Browser', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class NativeAudio extends IonicNativePlugin {
|
||||
|
||||
@@ -202,7 +202,7 @@ export interface NativeKeyboardUpdateMessengerOptions {
|
||||
plugin: 'cordova-plugin-native-keyboard',
|
||||
pluginRef: 'NativeKeyboard',
|
||||
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-native-keyboard',
|
||||
platforms: ['iOS', 'Android']
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class NativeKeyboard extends IonicNativePlugin {
|
||||
|
||||
@@ -66,7 +66,7 @@ export interface NativeTransitionOptions {
|
||||
plugin: 'com.telerik.plugins.nativepagetransitions',
|
||||
pluginRef: 'plugins.nativepagetransitions',
|
||||
repo: 'https://github.com/Telerik-Verified-Plugins/NativePageTransitions',
|
||||
platforms: ['iOS', 'Android', 'Windows Phone']
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class NativePageTransitions extends IonicNativePlugin {
|
||||
|
||||
@@ -32,7 +32,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
plugin: 'cordova-plugin-nativestorage',
|
||||
pluginRef: 'NativeStorage',
|
||||
repo: 'https://github.com/TheCocoaProject/cordova-plugin-nativestorage',
|
||||
platforms: ['Android', 'iOS', 'Windows']
|
||||
platforms: ['Android', 'Browser', 'iOS', 'macOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class NativeStorage extends IonicNativePlugin {
|
||||
|
||||
@@ -51,9 +51,9 @@ declare const navigator: any;
|
||||
@Plugin({
|
||||
pluginName: 'Network',
|
||||
plugin: 'cordova-plugin-network-information',
|
||||
pluginRef: 'navigator.connection',
|
||||
repo: 'https://github.com/apache/cordova-plugin-network-information',
|
||||
platforms: ['Amazon Fire OS', 'iOS', 'Android', 'BlackBerry 10', 'Windows Phone 7', 'Windows Phone 8', 'Windows', 'Firefox OS', 'Browser'],
|
||||
pluginRef: 'navigator.connection'
|
||||
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class Network extends IonicNativePlugin {
|
||||
|
||||
@@ -32,7 +32,8 @@ declare let window: any;
|
||||
pluginName: 'NFC',
|
||||
plugin: 'phonegap-nfc',
|
||||
pluginRef: 'nfc',
|
||||
repo: 'https://github.com/chariotsolutions/phonegap-nfc'
|
||||
repo: 'https://github.com/chariotsolutions/phonegap-nfc',
|
||||
platforms: ['Android', 'BlackBerry 10', 'Windows', 'Windows Phone 8']
|
||||
})
|
||||
/**
|
||||
*@{ NFC } class methods
|
||||
|
||||
@@ -219,6 +219,41 @@ export interface OSActionButton {
|
||||
*/
|
||||
icon: string;
|
||||
}
|
||||
/**
|
||||
* OSPermissionState
|
||||
*/
|
||||
export interface OSPermissionState {
|
||||
/**
|
||||
* User was prompted.
|
||||
*/
|
||||
hasPrompted: boolean;
|
||||
/**
|
||||
* Permissions Status
|
||||
*/
|
||||
status: any;
|
||||
}
|
||||
/**
|
||||
* OSSubscriptionState
|
||||
*/
|
||||
export interface OSSubscriptionState {
|
||||
subscribed: boolean;
|
||||
userSubscriptionSetting: any;
|
||||
userId: any;
|
||||
pushToken: any;
|
||||
}
|
||||
/**
|
||||
* Subscription and permissions status
|
||||
*/
|
||||
export interface OSPermissionSubscriptionState {
|
||||
/**
|
||||
* Id assigned to the button.
|
||||
*/
|
||||
permissionStatus: OSPermissionState;
|
||||
/**
|
||||
* Text show on the button to the user.
|
||||
*/
|
||||
subscriptionStatus: OSSubscriptionState;
|
||||
}
|
||||
|
||||
/**
|
||||
* **ANDROID** - If a background image was set, this object will be available.
|
||||
@@ -268,6 +303,58 @@ export enum OSActionType {
|
||||
*
|
||||
* Requires Cordova plugin: `onesignal-cordova-plugin`. For more info, please see the [OneSignal Cordova Docs](https://documentation.onesignal.com/docs/phonegap-sdk-installation).
|
||||
*
|
||||
* #### Icons
|
||||
* If you want to use generated icons with command `ionic cordova resources`:
|
||||
*
|
||||
* 1. Add a file to your `hooks` directory inside the `after_prepare` folder called `030_copy_android_notification_icons.js`
|
||||
*
|
||||
* 2. Put the following code in it:
|
||||
*
|
||||
* ```
|
||||
* #!/usr/bin/env node
|
||||
*
|
||||
* var filestocopy = [{
|
||||
* "resources/android/icon/drawable-hdpi-icon.png":
|
||||
* "platforms/android/res/drawable-hdpi/ic_stat_onesignal_default.png"
|
||||
* }, {
|
||||
* "resources/android/icon/drawable-mdpi-icon.png":
|
||||
* "platforms/android/res/drawable-mdpi/ic_stat_onesignal_default.png"
|
||||
* }, {
|
||||
* "resources/android/icon/drawable-xhdpi-icon.png":
|
||||
* "platforms/android/res/drawable-xhdpi/ic_stat_onesignal_default.png"
|
||||
* }, {
|
||||
* "resources/android/icon/drawable-xxhdpi-icon.png":
|
||||
* "platforms/android/res/drawable-xxhdpi/ic_stat_onesignal_default.png"
|
||||
* }, {
|
||||
* "resources/android/icon/drawable-xxxhdpi-icon.png":
|
||||
* "platforms/android/res/drawable-xxxhdpi/ic_stat_onesignal_default.png"
|
||||
* } ];
|
||||
*
|
||||
* var fs = require('fs');
|
||||
* var path = require('path');
|
||||
*
|
||||
* // no need to configure below
|
||||
* var rootdir = process.argv[2];
|
||||
*
|
||||
* filestocopy.forEach(function(obj) {
|
||||
* Object.keys(obj).forEach(function(key) {
|
||||
* var val = obj[key];
|
||||
* var srcfile = path.join(rootdir, key);
|
||||
* var destfile = path.join(rootdir, val);
|
||||
* //console.log("copying "+srcfile+" to "+destfile);
|
||||
* var destdir = path.dirname(destfile);
|
||||
* if (fs.existsSync(srcfile) && fs.existsSync(destdir)) {
|
||||
* fs.createReadStream(srcfile).pipe(
|
||||
* fs.createWriteStream(destfile));
|
||||
* }
|
||||
* });
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* 3. From the root of your project make the file executable:
|
||||
* `$ chmod +x hooks/after_prepare/030_copy_android_notification_icons.js`
|
||||
*
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { OneSignal } from '@ionic-native/onesignal';
|
||||
@@ -305,7 +392,7 @@ export enum OSActionType {
|
||||
plugin: 'onesignal-cordova-plugin',
|
||||
pluginRef: 'plugins.OneSignal',
|
||||
repo: 'https://github.com/OneSignal/OneSignal-Cordova-SDK',
|
||||
platforms: ['Android', 'iOS', 'Windows', 'FireOS']
|
||||
platforms: ['Amazon Fire OS', 'Android', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class OneSignal extends IonicNativePlugin {
|
||||
@@ -485,6 +572,14 @@ export class OneSignal extends IonicNativePlugin {
|
||||
@Cordova({ sync: true })
|
||||
setSubscription(enable: boolean): void { }
|
||||
|
||||
/**
|
||||
* Get the current notification and permission state. Returns a OSPermissionSubscriptionState type described below.
|
||||
*
|
||||
* @returns {Promise<OSPermissionSubscriptionState>}
|
||||
*/
|
||||
@Cordova()
|
||||
getPermissionSubscriptionState(): Promise<OSPermissionSubscriptionState> { return; }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {notificationObj} Parameters see POST [documentation](https://documentation.onesignal.com/v2.0/docs/notifications-create-notification)
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, CordovaInstance, Plugin, IonicNativePlugin, checkAvailability } from '@ionic-native/core';
|
||||
|
||||
declare var Notification: any;
|
||||
declare const Notification: any;
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
export class PLNObject {
|
||||
|
||||
private _objectInstance: any;
|
||||
|
||||
constructor(title: string, options: LocalNotificationOptions) {
|
||||
if (checkAvailability(PhonegapLocalNotifications.pluginRef, null, PhonegapLocalNotifications.pluginName) === true) {
|
||||
if (checkAvailability(PhonegapLocalNotification.pluginRef, null, PhonegapLocalNotification.pluginName) === true) {
|
||||
this._objectInstance = new Notification(title, options);
|
||||
}
|
||||
}
|
||||
@@ -55,7 +58,7 @@ export interface LocalNotificationOptions {
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import { PhonegapLocalNotifications } from '@ionic-native/phonegap-local-notifications';
|
||||
* import { PhonegapLocalNotification } from '@ionic-native/phonegap-local-notification';
|
||||
*
|
||||
*
|
||||
* constructor(private localNotification: PhonegapLocalNotifications) { }
|
||||
@@ -87,10 +90,10 @@ export interface LocalNotificationOptions {
|
||||
plugin: 'phonegap-local-notifications',
|
||||
pluginRef: 'Notification',
|
||||
repo: 'https://github.com/phonegap/phonegap-plugin-local-notification',
|
||||
platforms: ['Android', 'iOS', 'Browser']
|
||||
platforms: ['Android', 'Browser', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class PhonegapLocalNotifications extends IonicNativePlugin {
|
||||
export class PhonegapLocalNotification extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* A global object that lets you interact with the Notification API.
|
||||
|
||||
@@ -35,7 +35,7 @@ import { Injectable } from '@angular/core';
|
||||
* complete: () => { console.log('could not get photos'); }
|
||||
* });
|
||||
* })
|
||||
* .catch(err => console.log('permissions weren't granted'));
|
||||
* .catch(err => console.log('permissions weren\'t granted'));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@@ -45,6 +45,7 @@ import { Injectable } from '@angular/core';
|
||||
pluginRef: 'cordova.plugins.photoLibrary',
|
||||
repo: 'https://github.com/terikon/cordova-plugin-photo-library',
|
||||
install: 'ionic cordova plugin add cordova-plugin-photo-library --variable PHOTO_LIBRARY_USAGE_DESCRIPTION="To choose photos"',
|
||||
installVariables: ['PHOTO_LIBRARY_USAGE_DESCRIPTION'],
|
||||
platforms: ['Android', 'Browser', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
|
||||
@@ -28,7 +28,8 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
pluginName: 'PinDialog',
|
||||
plugin: 'cordova-plugin-pin-dialog',
|
||||
pluginRef: 'plugins.pinDialog',
|
||||
repo: 'https://github.com/Paldom/PinDialog'
|
||||
repo: 'https://github.com/Paldom/PinDialog',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class PinDialog extends IonicNativePlugin {
|
||||
|
||||
@@ -24,7 +24,8 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
pluginName: 'PowerManagement',
|
||||
plugin: 'cordova-plugin-powermanagement-orig',
|
||||
pluginRef: 'powerManagement',
|
||||
repo: 'https://github.com/Viras-/cordova-plugin-powermanagement'
|
||||
repo: 'https://github.com/Viras-/cordova-plugin-powermanagement',
|
||||
platforms: ['Android', 'iOS', 'Windows', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class PowerManagement extends IonicNativePlugin {
|
||||
|
||||
@@ -70,7 +70,7 @@ export interface PrintOptions {
|
||||
plugin: 'de.appplant.cordova.plugin.printer',
|
||||
pluginRef: 'cordova.plugins.printer',
|
||||
repo: 'https://github.com/katzer/cordova-plugin-printer',
|
||||
platforms: ['Android', 'iOS']
|
||||
platforms: ['Android', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class Printer extends IonicNativePlugin {
|
||||
|
||||
@@ -265,7 +265,8 @@ export type PushEvent = 'registration' | 'error' | 'notification';
|
||||
pluginRef: 'PushNotification',
|
||||
repo: 'https://github.com/phonegap/phonegap-plugin-push',
|
||||
install: 'ionic cordova plugin add phonegap-plugin-push --variable SENDER_ID=XXXXXXXXX',
|
||||
installVariables: ['SENDER_ID']
|
||||
installVariables: ['SENDER_ID'],
|
||||
platforms: ['Android', 'Browser', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class Push extends IonicNativePlugin {
|
||||
|
||||
@@ -24,9 +24,9 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
plugin: 'resgrid-cordova-plugins-rollbar',
|
||||
pluginRef: 'cordova.plugins.Rollbar',
|
||||
repo: 'https://github.com/Resgrid/cordova-plugins-rollbar',
|
||||
platforms: ['Android', 'iOS'],
|
||||
install: 'ionic cordova plugin add resgrid-cordova-plugins-rollbar --variable ROLLBAR_ACCESS_TOKEN="YOUR_ROLLBAR_ACCEESS_TOKEN" --variable ROLLBAR_ENVIRONMENT="ROLLBAR_ENVIRONMENT"',
|
||||
installVariables: ['ROLLBAR_ACCESS_TOKEN', 'ROLLBAR_ENVIRONMENT']
|
||||
installVariables: ['ROLLBAR_ACCESS_TOKEN', 'ROLLBAR_ENVIRONMENT'],
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Rollbar extends IonicNativePlugin {
|
||||
|
||||
@@ -58,8 +58,8 @@ export interface SafariViewControllerOptions {
|
||||
pluginName: 'SafariViewController',
|
||||
plugin: 'cordova-plugin-safariviewcontroller',
|
||||
pluginRef: 'SafariViewController',
|
||||
platforms: ['iOS', 'Android'],
|
||||
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller'
|
||||
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class SafariViewController extends IonicNativePlugin {
|
||||
|
||||
@@ -48,7 +48,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
plugin: 'cordova-plugin-screen-orientation',
|
||||
pluginRef: 'screen.orientation',
|
||||
repo: 'https://github.com/apache/cordova-plugin-screen-orientation',
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8']
|
||||
platforms: ['Android', 'BlackBerry 10', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class ScreenOrientation extends IonicNativePlugin {
|
||||
|
||||
@@ -23,9 +23,10 @@ declare const navigator: any;
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Screenshot',
|
||||
plugin: 'https://github.com/gitawego/cordova-screenshot.git',
|
||||
plugin: 'com.darktalker.cordova.screenshot',
|
||||
pluginRef: 'navigator.screenshot',
|
||||
repo: 'https://github.com/gitawego/cordova-screenshot.git'
|
||||
repo: 'https://github.com/gitawego/cordova-screenshot',
|
||||
platforms: ['Android', 'iOS', 'macOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Screenshot extends IonicNativePlugin {
|
||||
@@ -33,11 +34,11 @@ export class Screenshot extends IonicNativePlugin {
|
||||
/**
|
||||
* Takes screenshot and saves the image
|
||||
*
|
||||
* @param {string} format. Format can take the value of either 'jpg' or 'png'
|
||||
* @param format {string} Format can take the value of either 'jpg' or 'png'
|
||||
* On ios, only 'jpg' format is supported
|
||||
* @param {number} quality. Determines the quality of the screenshot.
|
||||
* @param quality {number} Determines the quality of the screenshot.
|
||||
* Default quality is set to 100.
|
||||
* @param {string} filename. Name of the file as stored on the storage
|
||||
* @param filename {string} Name of the file as stored on the storage
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
save(format?: string, quality?: number, filename?: string): Promise<any> {
|
||||
@@ -62,7 +63,7 @@ export class Screenshot extends IonicNativePlugin {
|
||||
/**
|
||||
* Takes screenshot and returns the image as an URI
|
||||
*
|
||||
* @param {number} quality. Determines the quality of the screenshot.
|
||||
* @param quality {number} Determines the quality of the screenshot.
|
||||
* Default quality is set to 100.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
|
||||
@@ -57,6 +57,13 @@ export class SecureStorageObject {
|
||||
})
|
||||
clear(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Brings up the screen-lock settings
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@CordovaInstance()
|
||||
secureDevice(): Promise<any> { return; }
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,6 +73,8 @@ export class SecureStorageObject {
|
||||
*
|
||||
* Requires Cordova plugin: `cordova-plugin-secure-storage`. For more info, please see the [Cordova Secure Storage docs](https://github.com/Crypho/cordova-plugin-secure-storage).
|
||||
*
|
||||
* The browser platform is supported as a mock only. Key/values are stored unencrypted in localStorage.
|
||||
*
|
||||
* @usage
|
||||
*
|
||||
* ```typescript
|
||||
@@ -108,7 +117,7 @@ export class SecureStorageObject {
|
||||
plugin: 'cordova-plugin-secure-storage',
|
||||
pluginRef: 'cordova.plugins.SecureStorage',
|
||||
repo: 'https://github.com/Crypho/cordova-plugin-secure-storage',
|
||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||
platforms: ['Android', 'Browser', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class SecureStorage extends IonicNativePlugin {
|
||||
|
||||
@@ -42,7 +42,7 @@ export interface SerialOpenOptions {
|
||||
plugin: 'cordovarduino',
|
||||
pluginRef: 'serial',
|
||||
repo: 'https://github.com/xseignard/cordovarduino',
|
||||
platforms: ['Android']
|
||||
platforms: ['Android', 'Ubuntu']
|
||||
})
|
||||
@Injectable()
|
||||
export class Serial extends IonicNativePlugin {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user