mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-02-16 00:00:02 +08:00
Compare commits
66 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
955476b45b | ||
|
|
95aa3e2f26 | ||
|
|
facdcdc956 | ||
|
|
ab782f7093 | ||
|
|
6811750711 | ||
|
|
c3d23b0ee9 | ||
|
|
17366a29da | ||
|
|
39eaebfafd | ||
|
|
66874cc598 | ||
|
|
16dc71ab71 | ||
|
|
b58149f2f2 | ||
|
|
b6afc19e72 | ||
|
|
52d731e7d9 | ||
|
|
7df7a557da | ||
|
|
c720bfead1 | ||
|
|
b4102310e7 | ||
|
|
1b84db035f | ||
|
|
37e8eddd86 | ||
|
|
4fb9b949d7 | ||
|
|
66bc034c80 | ||
|
|
593c1ee6ca | ||
|
|
91439be0bd | ||
|
|
4ae50561b4 | ||
|
|
1f0986fa6f | ||
|
|
1be4c1c669 | ||
|
|
c7a6e6625a | ||
|
|
0a7f56d960 | ||
|
|
f7044a08de | ||
|
|
6168eaee47 | ||
|
|
9c925806ed | ||
|
|
3e8211461a | ||
|
|
b2120c68e2 | ||
|
|
1da12b9330 | ||
|
|
4bd6aaba2b | ||
|
|
f396940044 | ||
|
|
6bba72d32a | ||
|
|
d30b534150 | ||
|
|
8edc27079c | ||
|
|
55f9943f86 | ||
|
|
352ad7ab2f | ||
|
|
15bf509ae0 | ||
|
|
6b9f650a19 | ||
|
|
b30883a876 | ||
|
|
caec80b661 | ||
|
|
620289f54b | ||
|
|
5a6246425f | ||
|
|
43b75af58b | ||
|
|
44957e2197 | ||
|
|
c15c11cf95 | ||
|
|
1b429638fe | ||
|
|
99576d823d | ||
|
|
0147704a4f | ||
|
|
f6a7e5fe9b | ||
|
|
ebb47ce591 | ||
|
|
57eabc002a | ||
|
|
24c8d5d627 | ||
|
|
4ceb340630 | ||
|
|
ec8d318280 | ||
|
|
8add83612d | ||
|
|
0beefb3079 | ||
|
|
4d2f720b01 | ||
|
|
d29ca88b18 | ||
|
|
c94dd41f92 | ||
|
|
b005efc52b | ||
|
|
f4c4317f16 | ||
|
|
145577f9bc |
4
.github/CONTRIBUTING.md
vendored
4
.github/CONTRIBUTING.md
vendored
@@ -5,7 +5,7 @@
|
||||
###### 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).
|
||||
* **Check that you are using the latest version of** `ionic-native`, you can install the latest version by running `npm i --save ionic-native@latest`
|
||||
* **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:
|
||||
* Short description of the issue
|
||||
@@ -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/driftyco/ionic-native/blob/master/DEVELOPER.md) for more info on adding new plugins.
|
||||
|
||||
44
CHANGELOG.md
44
CHANGELOG.md
@@ -1,3 +1,47 @@
|
||||
<a name="3.6.0"></a>
|
||||
# [3.6.0](https://github.com/driftyco/ionic-native/compare/v3.5.0...v3.6.0) (2017-04-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **media:** function 'create' never returns media object (#1419) ([b58149f](https://github.com/driftyco/ionic-native/commit/b58149f))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **keychain:** add Keychain plugin (#1420) ([16dc71a](https://github.com/driftyco/ionic-native/commit/16dc71a))
|
||||
* add IonicNativePlugin base class (#1425) ([17366a2](https://github.com/driftyco/ionic-native/commit/17366a2))
|
||||
|
||||
|
||||
|
||||
<a name="3.5.0"></a>
|
||||
# [3.5.0](https://github.com/driftyco/ionic-native/compare/v3.4.4...v3.5.0) (2017-04-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **core:** fix bug when checking if plugin exists (#1348) ([4bd6aab](https://github.com/driftyco/ionic-native/commit/4bd6aab)), closes [#1348](https://github.com/driftyco/ionic-native/issues/1348)
|
||||
* **media:** fix issue with create method ([6bba72d](https://github.com/driftyco/ionic-native/commit/6bba72d)), closes [#1333](https://github.com/driftyco/ionic-native/issues/1333)
|
||||
* **rollbar:** fix pluginRef ([f396940](https://github.com/driftyco/ionic-native/commit/f396940))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **action-sheet:** update to newest version ([9c92580](https://github.com/driftyco/ionic-native/commit/9c92580))
|
||||
* **background-fetch:** add status method ([6168eae](https://github.com/driftyco/ionic-native/commit/6168eae))
|
||||
|
||||
|
||||
|
||||
<a name="3.4.4"></a>
|
||||
## [3.4.4](https://github.com/driftyco/ionic-native/compare/v3.4.3...v3.4.4) (2017-03-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **push:** hasPermission is part of Push object ([145577f](https://github.com/driftyco/ionic-native/commit/145577f))
|
||||
|
||||
|
||||
|
||||
<a name="3.4.3"></a>
|
||||
## [3.4.3](https://github.com/driftyco/ionic-native/compare/v3.4.2...v3.4.3) (2017-03-29)
|
||||
|
||||
|
||||
14
package.json
14
package.json
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "ionic-native",
|
||||
"version": "3.4.3",
|
||||
"version": "3.6.0",
|
||||
"description": "Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@angular/compiler": "2.4.8",
|
||||
"@angular/compiler-cli": "2.4.8",
|
||||
"@angular/core": "2.4.8",
|
||||
"@angular/compiler": "4.0.0",
|
||||
"@angular/compiler-cli": "4.0.0",
|
||||
"@angular/core": "4.0.0",
|
||||
"canonical-path": "0.0.2",
|
||||
"child-process-promise": "2.2.0",
|
||||
"conventional-changelog-cli": "1.2.0",
|
||||
@@ -27,12 +27,12 @@
|
||||
"q": "1.4.1",
|
||||
"queue": "4.2.1",
|
||||
"rimraf": "2.5.4",
|
||||
"rxjs": "5.0.1",
|
||||
"rxjs": "5.1.1",
|
||||
"semver": "5.3.0",
|
||||
"tslint": "3.15.1",
|
||||
"tslint-ionic-rules": "0.0.7",
|
||||
"typescript": "2.0.09",
|
||||
"zone.js": "0.7.2"
|
||||
"typescript": "2.2.1",
|
||||
"zone.js": "^0.8.4"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "npm run test:watch",
|
||||
|
||||
@@ -40,7 +40,6 @@ PLUGIN_PACKAGE_JSON.peerDependencies = PLUGIN_PEER_DEPS;
|
||||
console.log('Making new TMP directory');
|
||||
fs.mkdirpSync(BUILD_TMP);
|
||||
|
||||
|
||||
// Prepare and copy the core module's package.json
|
||||
console.log('Preparing core module package.json');
|
||||
CORE_PACKAGE_JSON.version = IONIC_NATIVE_VERSION;
|
||||
@@ -51,6 +50,11 @@ fs.writeJsonSync(path.resolve(BUILD_CORE_DIST, 'package.json'), CORE_PACKAGE_JSO
|
||||
// Fetch a list of the plugins
|
||||
const PLUGINS = fs.readdirSync(PLUGINS_PATH);
|
||||
|
||||
// Build specific list of plugins to build from arguments, if any
|
||||
let pluginsToBuild = process.argv.slice(2);
|
||||
if (!pluginsToBuild.length) {
|
||||
pluginsToBuild = PLUGINS;
|
||||
}
|
||||
|
||||
// Create a queue to process tasks
|
||||
const QUEUE = queue({
|
||||
@@ -116,7 +120,7 @@ const addPluginToQueue = pluginName => {
|
||||
|
||||
};
|
||||
|
||||
PLUGINS.forEach(addPluginToQueue);
|
||||
pluginsToBuild.forEach(addPluginToQueue);
|
||||
|
||||
QUEUE.start((err) => {
|
||||
|
||||
|
||||
2
scripts/docs/templates/common.template.html
vendored
2
scripts/docs/templates/common.template.html
vendored
@@ -165,7 +165,7 @@ docType: "<$ doc.docType $>"
|
||||
<@ endif @>
|
||||
|
||||
<# --- Install commands --- #>
|
||||
<pre><code class="nohighlight">$ <@ if prop.install @><$ prop.install $><@ else @>ionic plugin add <$ prop.plugin $><@ endif @>
|
||||
<pre><code class="nohighlight">$ <@ if prop.install @><$ prop.install $><@ else @>ionic plugin add --save <$ prop.plugin $><@ endif @>
|
||||
$ npm install --save @ionic-native/<$ doc.npmId $>
|
||||
</code></pre>
|
||||
<p>Repo:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Plugin } from '@ionic-native/core';
|
||||
import { Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
/**
|
||||
@@ -25,6 +25,6 @@ import { Injectable } from '@angular/core';
|
||||
platforms: []
|
||||
})
|
||||
@Injectable()
|
||||
export class $PluginName {
|
||||
export class $PluginName extends IonicNativePlugin {
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* - Remove this note
|
||||
*
|
||||
*/
|
||||
import { Plugin, Cordova, CordovaProperty, CordovaInstance, InstanceProperty } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, CordovaProperty, CordovaInstance, InstanceProperty, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
@@ -44,7 +44,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
install: '', // OPTIONAL install command, in case the plugin requires variables
|
||||
})
|
||||
@Injectable()
|
||||
export class $PluginName {
|
||||
export class $PluginName extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* This function does something
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export * from './plugin';
|
||||
export * from './decorators';
|
||||
export * from './util';
|
||||
export * from './ionic-native-plugin';
|
||||
|
||||
41
src/@ionic-native/core/ionic-native-plugin.ts
Normal file
41
src/@ionic-native/core/ionic-native-plugin.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
export class IonicNativePlugin {
|
||||
|
||||
static pluginName: string;
|
||||
|
||||
static pluginRef: string;
|
||||
|
||||
static plugin: string;
|
||||
|
||||
static repo: string;
|
||||
|
||||
static platforms: string[];
|
||||
|
||||
static install: string;
|
||||
|
||||
/**
|
||||
* Returns a boolean that indicates whether the plugin is installed
|
||||
* @return {boolean}
|
||||
*/
|
||||
static installed(): boolean { return false; }
|
||||
|
||||
/**
|
||||
* Returns the original plugin object
|
||||
*/
|
||||
static getPlugin(): any {}
|
||||
|
||||
/**
|
||||
* Returns the plugin's name
|
||||
*/
|
||||
static getPluginName(): string { return; }
|
||||
|
||||
/**
|
||||
* Returns the plugin's reference
|
||||
*/
|
||||
static getPluginRef(): string { return; }
|
||||
|
||||
/**
|
||||
* Returns the plugin's install name
|
||||
*/
|
||||
static getPluginInstallName(): string { return; }
|
||||
|
||||
}
|
||||
@@ -32,7 +32,7 @@ export function checkAvailability(plugin: any, methodName?: string, pluginName?:
|
||||
|
||||
pluginInstance = getPlugin(pluginRef);
|
||||
|
||||
if (!pluginInstance || (!!methodName && pluginInstance[methodName] === 'undefined')) {
|
||||
if (!pluginInstance || (!!methodName && typeof pluginInstance[methodName] === 'undefined')) {
|
||||
if (!window.cordova) {
|
||||
cordovaWarn(pluginName, methodName);
|
||||
return {
|
||||
@@ -54,7 +54,7 @@ export function checkAvailability(plugin: any, methodName?: string, pluginName?:
|
||||
* @private
|
||||
*/
|
||||
export function instanceAvailability(pluginObj: any, methodName?: string): boolean {
|
||||
return pluginObj._objectInstance && (!methodName || pluginObj._objectInstance[methodName] !== 'undefined');
|
||||
return pluginObj._objectInstance && (!methodName || typeof pluginObj._objectInstance[methodName] !== 'undefined');
|
||||
}
|
||||
|
||||
function setIndex(args: any[], opts: any = {}, resolve?: Function, reject?: Function): any {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, CordovaProperty } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, CordovaProperty, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface ActionSheetOptions {
|
||||
|
||||
@@ -13,6 +13,11 @@ export interface ActionSheetOptions {
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* The subtitle for the actionsheet (IOS only)
|
||||
*/
|
||||
subtitle?: string;
|
||||
|
||||
/**
|
||||
* Theme to be used on Android
|
||||
*/
|
||||
@@ -43,6 +48,10 @@ export interface ActionSheetOptions {
|
||||
*/
|
||||
position?: number[];
|
||||
|
||||
/**
|
||||
* Choose if destructive button will be the last
|
||||
*/
|
||||
destructiveButtonLast: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -65,10 +74,12 @@ export interface ActionSheetOptions {
|
||||
*
|
||||
* const options: ActionSheetOptions = {
|
||||
* title: 'What do you want with this image?',
|
||||
* subtitle: 'Choose an action',
|
||||
* buttonLabels: buttonLabels,
|
||||
* addCancelButtonWithLabel: 'Cancel',
|
||||
* addDestructiveButtonWithLabel: 'Delete',
|
||||
* androidTheme: this.actionSheet.ANDROID_THEMES.THEME_HOLO_DARK
|
||||
* androidTheme: this.actionSheet.ANDROID_THEMES.THEME_HOLO_DARK,
|
||||
* destructiveButtonLast: true
|
||||
* };
|
||||
*
|
||||
* this.actionSheet.show(options).then((buttonIndex: number) => {
|
||||
@@ -83,10 +94,10 @@ export interface ActionSheetOptions {
|
||||
plugin: 'cordova-plugin-actionsheet',
|
||||
pluginRef: 'plugins.actionsheet',
|
||||
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-actionsheet',
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8']
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8', 'Browser']
|
||||
})
|
||||
@Injectable()
|
||||
export class ActionSheet {
|
||||
export class ActionSheet extends IonicNativePlugin {
|
||||
|
||||
@CordovaProperty
|
||||
ANDROID_THEMES: {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import 'rxjs/add/observable/fromEvent';
|
||||
@@ -65,7 +65,7 @@ export interface AdMobFreeRewardVideoConfig {
|
||||
}
|
||||
|
||||
/**
|
||||
* @name AdbMobFree
|
||||
* @name AdMob Free
|
||||
* @description
|
||||
*
|
||||
* @usage
|
||||
@@ -105,7 +105,7 @@ export interface AdMobFreeRewardVideoConfig {
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class AdMobFree {
|
||||
export class AdMobFree extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Convenience constructor to get event names
|
||||
@@ -171,8 +171,6 @@ export class AdMobFree {
|
||||
})
|
||||
export class AdMobFreeBanner {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Update config.
|
||||
* @param options
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export type AdSize = 'SMART_BANNER' | 'BANNER' | 'MEDIUM_RECTANGLE' | 'FULL_BANNER' | 'LEADERBOARD' | 'SKYSCRAPER' | 'CUSTOM';
|
||||
@@ -95,7 +95,7 @@ export interface AdExtras {
|
||||
* Plugin for Google Ads, including AdMob / DFP (doubleclick for publisher) and mediations to other Ad networks.
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { AdMob, AdMobOptions, AdSize, AdExtras } from '@ionic-native/ad-mob';
|
||||
* import { AdMob, AdMobOptions, AdSize, AdExtras } from '@ionic-native/admob';
|
||||
*
|
||||
* constructor(private admob: AdMob){}
|
||||
*
|
||||
@@ -123,7 +123,7 @@ export interface AdExtras {
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class AdMob {
|
||||
export class AdMob extends IonicNativePlugin {
|
||||
|
||||
AD_POSITION: {
|
||||
NO_CHANGE: number;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
export interface AlipayOrder {
|
||||
@@ -103,7 +103,7 @@ export interface AlipayOrder {
|
||||
install: 'ionic plugin add https://github.com/xueron/cordova-alipay-base --variable APP_ID=your_app_id'
|
||||
})
|
||||
@Injectable()
|
||||
export class Alipay {
|
||||
export class Alipay extends IonicNativePlugin {
|
||||
/**
|
||||
* Open Alipay to perform App pay
|
||||
* @param order { AlipayOrder } alipay options
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
export interface AFAAuthOptions {
|
||||
@@ -148,7 +148,7 @@ export interface AFAEncryptResponse {
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class AndroidFingerprintAuth {
|
||||
export class AndroidFingerprintAuth extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Opens a native dialog fragment to use the device hardware fingerprint scanner to authenticate against fingerprints registered for the device.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Android Full Screen
|
||||
@@ -29,7 +29,7 @@ import { Cordova, Plugin } from '@ionic-native/core';
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class AndroidFullScreen {
|
||||
export class AndroidFullScreen extends IonicNativePlugin {
|
||||
/**
|
||||
* Is this plugin supported?
|
||||
* @return {Promise<void>}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name App Availability
|
||||
@@ -40,7 +40,7 @@ import { Cordova, Plugin } from '@ionic-native/core';
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class AppAvailability {
|
||||
export class AppAvailability extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Checks if an app is available on device
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@@ -27,7 +27,7 @@ import { Injectable } from '@angular/core';
|
||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'iOS', 'OS X', 'Windows 8', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class AppPreferences {
|
||||
export class AppPreferences extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Get a preference value
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, CordovaProperty, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
declare var window;
|
||||
@@ -134,7 +134,7 @@ export interface AppUrls {
|
||||
platforms: ['Android', 'iOS', 'Windows (experimental)']
|
||||
})
|
||||
@Injectable()
|
||||
export class AppRate {
|
||||
export class AppRate extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Configure various settings for the Rating View.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
/**
|
||||
@@ -42,7 +42,7 @@ import { Injectable } from '@angular/core';
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class AppUpdate {
|
||||
export class AppUpdate extends IonicNativePlugin {
|
||||
/**
|
||||
* Check and update
|
||||
* @param updateUrl {string} update api url
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ import { Cordova, Plugin } from '@ionic-native/core';
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class AppVersion {
|
||||
export class AppVersion extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Returns the name of the app
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@@ -31,7 +31,7 @@ import { Injectable } from '@angular/core';
|
||||
platforms: [ 'iOS', 'Android' ]
|
||||
})
|
||||
@Injectable()
|
||||
export class Appodeal {
|
||||
export class Appodeal extends IonicNativePlugin {
|
||||
// available types of advertisements
|
||||
readonly AD_TYPES = {
|
||||
INTERSTITIAL: 1,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
declare var window;
|
||||
@@ -63,7 +63,7 @@ export interface BackgroundFetchConfig {
|
||||
platforms: ['iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class BackgroundFetch {
|
||||
export class BackgroundFetch extends IonicNativePlugin {
|
||||
|
||||
|
||||
/**
|
||||
@@ -100,4 +100,11 @@ export class BackgroundFetch {
|
||||
})
|
||||
finish(): void { }
|
||||
|
||||
/**
|
||||
* Return the status of the background-fetch
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
status(): Promise<any> { return; }
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
declare var window;
|
||||
@@ -311,7 +311,7 @@ export interface BackgroundGeolocationConfig {
|
||||
platforms: ['iOS', 'Android', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class BackgroundGeolocation {
|
||||
export class BackgroundGeolocation extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Set location service provider @see https://github.com/mauron85/cordova-plugin-background-geolocation/wiki/Android-providers
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ export interface BackgroundModeConfiguration {
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class BackgroundMode {
|
||||
export class BackgroundMode extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Enable the background mode.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
/**
|
||||
@@ -32,7 +32,7 @@ import { Plugin, Cordova } from '@ionic-native/core';
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class Backlight {
|
||||
export class Backlight extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* This function turns backlight on
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
/**
|
||||
@@ -30,7 +30,7 @@ import { Cordova, Plugin } from '@ionic-native/core';
|
||||
platforms: ['Android', 'iOS', 'Browser', 'Windows', 'Amazon FireOS', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class Badge {
|
||||
export class Badge extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Clear the badge of the app icon.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
export interface BarcodeScannerOptions {
|
||||
@@ -89,7 +89,7 @@ export interface BarcodeScannerOptions {
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8', 'Windows 10', 'Windows 8', 'BlackBerry 10', 'Browser']
|
||||
})
|
||||
@Injectable()
|
||||
export class BarcodeScanner {
|
||||
export class BarcodeScanner extends IonicNativePlugin {
|
||||
|
||||
Encode: {
|
||||
TEXT_TYPE: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Base64 To Gallery
|
||||
@@ -28,7 +28,7 @@ import { Cordova, Plugin } from '@ionic-native/core';
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class Base64ToGallery {
|
||||
export class Base64ToGallery extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Converts a base64 string to an image file in the device gallery
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export interface BatteryStatusResponse {
|
||||
@@ -32,7 +32,7 @@ export interface BatteryStatusResponse {
|
||||
*
|
||||
* // watch change in battery status
|
||||
* let subscription = this.batteryStatus.onChange().subscribe(
|
||||
* (status: StatusObject) => {
|
||||
* (status: BatteryStatusResponse) => {
|
||||
* console.log(status.level, status.isPlugged);
|
||||
* }
|
||||
* );
|
||||
@@ -52,7 +52,7 @@ export interface BatteryStatusResponse {
|
||||
platforms: ['Amazon Fire OS', 'iOS', 'Android', 'BlackBerry 10', 'Windows Phone 7', 'Windows Phone 8', 'Windows', 'Firefox OS', 'Browser']
|
||||
})
|
||||
@Injectable()
|
||||
export class BatteryStatus {
|
||||
export class BatteryStatus extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Watch the change in battery level
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
/**
|
||||
@@ -176,7 +176,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class BLE {
|
||||
export class BLE extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Scan and discover BLE peripherals for the specified amount of time.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
/**
|
||||
@@ -38,7 +38,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
platforms: ['Android', 'iOS', 'Windows Phone', 'Browser']
|
||||
})
|
||||
@Injectable()
|
||||
export class BluetoothSerial {
|
||||
export class BluetoothSerial extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Connect to a Bluetooth device
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Brightness
|
||||
@@ -29,7 +29,7 @@ import { Cordova, Plugin } from '@ionic-native/core';
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Brightness {
|
||||
export class Brightness extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Sets the brightness of the display.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
/**
|
||||
@@ -31,7 +31,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Broadcaster {
|
||||
export class Broadcaster extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* This function listen to an event sent from the native code
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
/**
|
||||
@@ -40,7 +40,7 @@ import { Injectable } from '@angular/core';
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class BrowserTab {
|
||||
export class BrowserTab extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Check if BrowserTab option is available
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface CalendarOptions {
|
||||
|
||||
@@ -60,7 +60,7 @@ export interface CalendarOptions {
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import {Calendar} from '@ionic-native/calendar';
|
||||
* import { Calendar } from '@ionic-native/calendar';
|
||||
*
|
||||
* constructor(private calendar: Calendar) { }
|
||||
*
|
||||
@@ -81,7 +81,7 @@ export interface CalendarOptions {
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Calendar {
|
||||
export class Calendar extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* This function checks if we have permission to read/write from/to the calendar.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
/**
|
||||
* @name Call Number
|
||||
* @description
|
||||
@@ -7,7 +7,7 @@ import { Plugin, Cordova } from '@ionic-native/core';
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import {CallNumber} from '@ionic-native/call-number';
|
||||
* import { CallNumber } from '@ionic-native/call-number';
|
||||
*
|
||||
* constructor(private callNumber: CallNumber) { }
|
||||
*
|
||||
@@ -28,7 +28,7 @@ import { Plugin, Cordova } from '@ionic-native/core';
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class CallNumber {
|
||||
export class CallNumber extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Calls a phone number
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface CameraPreviewDimensions {
|
||||
/** The width of the camera preview, default to window.screen.width */
|
||||
@@ -132,7 +132,39 @@ export interface CameraPreviewPictureOptions {
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class CameraPreview {
|
||||
export class CameraPreview extends IonicNativePlugin {
|
||||
|
||||
EXPOSURE_MODES = {
|
||||
LOCK: 'lock', // IOS Only
|
||||
AUTO: 'auto', // IOS Only
|
||||
CONTINUOUS: 'continuous',
|
||||
CUSTOM: 'custom'
|
||||
};
|
||||
|
||||
FLASH_MODE = {
|
||||
OFF: 'off',
|
||||
ON: 'on',
|
||||
AUTO: 'auto',
|
||||
RED_EYE: 'red-eye',
|
||||
TORCH: 'torch' // Android Only
|
||||
};
|
||||
|
||||
COLOR_EFFECT = {
|
||||
AQUA: 'aqua', // Android Only
|
||||
BLACKBOARD: 'blackboard', // Android Only
|
||||
MONO: 'mono',
|
||||
NEGATIVE: 'negative',
|
||||
NONE: 'none',
|
||||
POSTERIZE: 'posterize',
|
||||
SEPIA: 'sepia',
|
||||
SOLARIZE: 'solarize', // Android Only
|
||||
WHITEBOARD: 'whiteboard' // Android Only
|
||||
};
|
||||
|
||||
CAMERA_DIRECTION = {
|
||||
BACK: 'back',
|
||||
FRONT: 'front'
|
||||
};
|
||||
|
||||
/**
|
||||
* Starts the camera preview instance.
|
||||
@@ -149,40 +181,28 @@ export class CameraPreview {
|
||||
* Stops the camera preview instance. (iOS & Android)
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 1
|
||||
})
|
||||
@Cordova()
|
||||
stopCamera(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Switch from the rear camera and front camera, if available.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 1
|
||||
})
|
||||
@Cordova()
|
||||
switchCamera(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Hide the camera preview box.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 1
|
||||
})
|
||||
@Cordova()
|
||||
hide(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Show the camera preview box.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 0,
|
||||
errorIndex: 1
|
||||
})
|
||||
@Cordova()
|
||||
show(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
@@ -220,6 +240,19 @@ export class CameraPreview {
|
||||
})
|
||||
setZoom(zoom?: number): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Get the maximum zoom (Android)
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getMaxZoom(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Get current zoom (Android)
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getZoom(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Set the preview Size
|
||||
@@ -228,8 +261,7 @@ export class CameraPreview {
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
platforms: ['Android']
|
||||
errorIndex: 2
|
||||
})
|
||||
setPreviewSize(dimensions?: CameraPreviewDimensions): Promise<any> { return; }
|
||||
|
||||
@@ -244,4 +276,68 @@ export class CameraPreview {
|
||||
})
|
||||
setFlashMode(flashMode?: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Get supported picture sizes
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getSupportedPictureSizes(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Get supported flash modes
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getSupportedFlashModes(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Get exposure mode
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getExposureMode(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Get exposure modes
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getExposureModes(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Set exposure mode
|
||||
* @param [lock] {string}
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
})
|
||||
setExposureMode(lock?: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Get exposure compensation (Android)
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getExposureCompensation(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Set exposure compensation (Android)
|
||||
* @param [exposureCompensation] {number}
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
})
|
||||
setExposureCompensation(exposureCompensation?: number): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Get exposure compensation range (Android)
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getExposureCompensationRange(): Promise<any> { return; }
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface CameraOptions {
|
||||
/** Picture quality in range 0-100. Default is 50 */
|
||||
@@ -128,7 +128,7 @@ export interface CameraPopoverOptions {
|
||||
platforms: ['Android', 'BlackBerry', 'Browser', 'Firefox', 'FireOS', 'iOS', 'Windows', 'Windows Phone 8', 'Ubuntu']
|
||||
})
|
||||
@Injectable()
|
||||
export class Camera {
|
||||
export class Camera extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Constant for possible destination types
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface CardIOOptions {
|
||||
|
||||
@@ -167,7 +167,7 @@ export interface CardIOResponse {
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class CardIO {
|
||||
export class CardIO extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Check whether card scanning is currently available. (May vary by
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
/**
|
||||
* @name Clipboard
|
||||
* @description
|
||||
@@ -37,7 +37,7 @@ import { Cordova, Plugin } from '@ionic-native/core';
|
||||
platforms: ['Amazon Fire OS', 'iOS', 'Android', 'BlackBerry 10', 'Windows Phone 7', 'Windows Phone 8', 'Windows', 'Firefox OS', 'Browser']
|
||||
})
|
||||
@Injectable()
|
||||
export class Clipboard {
|
||||
export class Clipboard extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Copies the given text
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
namespace Http {
|
||||
export const enum Verb {
|
||||
@@ -427,7 +427,7 @@ export interface DownloadProgress {
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class CodePush {
|
||||
export class CodePush extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Get the current package information.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CordovaInstance, InstanceProperty, Plugin, getPromise, InstanceCheck, checkAvailability, CordovaCheck } from '@ionic-native/core';
|
||||
import { CordovaInstance, InstanceProperty, Plugin, getPromise, InstanceCheck, checkAvailability, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
declare var window: any,
|
||||
navigator: any;
|
||||
@@ -294,7 +294,7 @@ export class ContactFindOptions implements IContactFindOptions {
|
||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows 8', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class Contacts {
|
||||
export class Contacts extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Create a single contact.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import { Injectable } from '@angular/core';
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class CouchbaseLite {
|
||||
export class CouchbaseLite extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Get the database url
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Crop
|
||||
* @description Crops images
|
||||
* @usage
|
||||
* ```
|
||||
* import {Crop} from '@ionic-native/crop';
|
||||
* import { Crop } from '@ionic-native/crop';
|
||||
*
|
||||
* constructor(private crop: Crop) { }
|
||||
*
|
||||
@@ -27,7 +27,7 @@ import { Cordova, Plugin } from '@ionic-native/core';
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Crop {
|
||||
export class Crop extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Crops an image
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {Cordova, Plugin} from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface DatePickerOptions {
|
||||
/**
|
||||
@@ -154,7 +154,7 @@ export interface DatePickerOptions {
|
||||
platforms: ['Android', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class DatePicker {
|
||||
export class DatePicker extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
/**
|
||||
@@ -42,7 +42,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class DBMeter {
|
||||
export class DBMeter extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Starts listening
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export interface DeeplinkMatch {
|
||||
@@ -83,7 +83,7 @@ export interface DeeplinkMatch {
|
||||
installVariables: ['URL_SCHEME', 'DEEPLINK_SCHEME', 'DEEPLINK_HOST', 'ANDROID_PATH_PREFIX']
|
||||
})
|
||||
@Injectable()
|
||||
export class Deeplinks {
|
||||
export class Deeplinks extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Define a set of paths to match against incoming deeplinks.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Device Accounts
|
||||
@@ -28,7 +28,7 @@ import { Cordova, Plugin } from '@ionic-native/core';
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class DeviceAccounts {
|
||||
export class DeviceAccounts extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Gets all accounts registered on the Android Device
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
/**
|
||||
* @name Device Feedback
|
||||
* @description
|
||||
@@ -38,7 +38,7 @@ import { Plugin, Cordova } from '@ionic-native/core';
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class DeviceFeedback {
|
||||
export class DeviceFeedback extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Provide sound feedback to user, nevertheless respect user's settings and current active device profile as native feedback do.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export interface DeviceMotionAccelerationData {
|
||||
@@ -75,7 +75,7 @@ export interface DeviceMotionAccelerometerOptions {
|
||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class DeviceMotion {
|
||||
export class DeviceMotion extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Get the current acceleration along the x, y, and z axes.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export interface DeviceOrientationCompassHeading {
|
||||
@@ -80,7 +80,7 @@ export interface DeviceOrientationCompassOptions {
|
||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class DeviceOrientation {
|
||||
export class DeviceOrientation extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Get the current compass heading.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CordovaProperty, Plugin } from '@ionic-native/core';
|
||||
import { CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
declare var window: any;
|
||||
|
||||
@@ -27,7 +27,7 @@ declare var window: any;
|
||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'OS X', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class Device {
|
||||
export class Device extends IonicNativePlugin {
|
||||
|
||||
/** Get the version of Cordova running on the device. */
|
||||
@CordovaProperty
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {Cordova, Plugin, CordovaProperty} from '@ionic-native/core';
|
||||
import { Cordova, Plugin, CordovaProperty, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Diagnostic
|
||||
@@ -42,7 +42,7 @@ import {Cordova, Plugin, CordovaProperty} from '@ionic-native/core';
|
||||
platforms: ['Android', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class Diagnostic {
|
||||
export class Diagnostic extends IonicNativePlugin {
|
||||
|
||||
permission = {
|
||||
READ_CALENDAR: 'READ_CALENDAR',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
export interface DialogsPromptCallback {
|
||||
@@ -49,7 +49,7 @@ export interface DialogsPromptCallback {
|
||||
platforms: ['Android', 'BlackBerry 10', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class Dialogs {
|
||||
export class Dialogs extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Shows a custom alert or dialog box.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, CordovaCheck } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
declare var cordova: any;
|
||||
|
||||
@@ -79,7 +79,7 @@ export interface EmailComposerOptions {
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class EmailComposer {
|
||||
export class EmailComposer extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Verifies if sending emails is supported on the device.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export interface EstimoteBeaconRegion {
|
||||
@@ -47,7 +47,7 @@ export interface EstimoteBeaconRegion {
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class EstimoteBeacons {
|
||||
export class EstimoteBeacons extends IonicNativePlugin {
|
||||
|
||||
/** Proximity value */
|
||||
ProximityUnknown = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface FacebookLoginResponse {
|
||||
|
||||
@@ -117,7 +117,7 @@ export interface FacebookLoginResponse {
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Facebook {
|
||||
export class Facebook extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Browser wrapper
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name File Chooser
|
||||
@@ -29,7 +29,7 @@ import { Plugin, Cordova } from '@ionic-native/core';
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class FileChooser {
|
||||
export class FileChooser extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Open a file
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name File Opener
|
||||
@@ -28,7 +28,7 @@ import { Plugin, Cordova } from '@ionic-native/core';
|
||||
platforms: ['Android', 'iOS', 'Windows', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class FileOpener {
|
||||
export class FileOpener extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Open an file
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
declare var window: any;
|
||||
|
||||
@@ -18,8 +18,8 @@ declare var window: any;
|
||||
* ...
|
||||
*
|
||||
* this.filePath.resolveNativePath(path)
|
||||
* .then(filePath => console.log(filePath);
|
||||
* .catch(err => console.log(err);
|
||||
* .then(filePath => console.log(filePath))
|
||||
* .catch(err => console.log(err));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@@ -31,7 +31,7 @@ declare var window: any;
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class FilePath {
|
||||
export class FilePath extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Resolve native path for given content URL/path.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CordovaProperty, Plugin, CordovaCheck } from '@ionic-native/core';
|
||||
import { CordovaProperty, Plugin, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
declare var window: any;
|
||||
declare var cordova: any;
|
||||
@@ -371,7 +371,7 @@ export declare var FileError: {
|
||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'OS X', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class File {
|
||||
export class File extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Read-only directory where the application is installed.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
export interface FingerprintOptions {
|
||||
@@ -30,7 +30,7 @@ export interface FingerprintOptions {
|
||||
* ```typescript
|
||||
* import { FingerprintAIO } from '@ionic-native/fingerprint-aio';
|
||||
*
|
||||
* constructor(private faio: FingerpirntAIO) { }
|
||||
* constructor(private faio: FingerprintAIO) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
@@ -54,7 +54,7 @@ export interface FingerprintOptions {
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class FingerprintAIO {
|
||||
export class FingerprintAIO extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Check if fingerprint authentication is available
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
/**
|
||||
@@ -32,7 +32,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Firebase {
|
||||
export class Firebase extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Get the device token
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Flashlight
|
||||
@@ -11,7 +11,7 @@ import { Cordova, Plugin } from '@ionic-native/core';
|
||||
* ```typescript
|
||||
* import { Flashlight } from '@ionic-native/flashlight';
|
||||
*
|
||||
* constructor(private flashlight: FlashLight) { }
|
||||
* constructor(private flashlight: Flashlight) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
@@ -28,7 +28,7 @@ import { Cordova, Plugin } from '@ionic-native/core';
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class Flashlight {
|
||||
export class Flashlight extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Checks if the flashlight is available
|
||||
|
||||
221
src/@ionic-native/plugins/flurry-analytics/index.ts
Normal file
221
src/@ionic-native/plugins/flurry-analytics/index.ts
Normal file
@@ -0,0 +1,221 @@
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
export interface FlurryAnalyticsOptions {
|
||||
/** Flurry API key is required */
|
||||
appKey: string;
|
||||
/**
|
||||
* Overrides the version of the app
|
||||
*/
|
||||
version?: string;
|
||||
/**
|
||||
* How long can the app be paused before a new session is created,
|
||||
* must be less than or equal to five for Android devices
|
||||
*/
|
||||
continueSessionSeconds?: number;
|
||||
/**
|
||||
* Set id of the user
|
||||
*/
|
||||
userId?: string;
|
||||
/**
|
||||
* Set gender of the user
|
||||
* Valid values are "m", "M", "f" and "F"
|
||||
*/
|
||||
gender?: string;
|
||||
/**
|
||||
* Set age of the user
|
||||
*/
|
||||
age?: number;
|
||||
/**
|
||||
* Set error for log
|
||||
* Values: VERBOSE, DEBUG, INFO, WARN, ERROR
|
||||
*/
|
||||
logLevel?: string;
|
||||
/**
|
||||
* Defaults to false
|
||||
*/
|
||||
enableLogging?: boolean;
|
||||
/**
|
||||
* Should every event show up the app's log, defaults to true
|
||||
*/
|
||||
enableEventLogging?: boolean;
|
||||
/**
|
||||
* Should app crashes be recorded in flurry, defaults to false, iOS only
|
||||
*/
|
||||
enableCrashReporting?: boolean;
|
||||
/**
|
||||
* Should the session continue when the app is the background, defaults to false, iOS only
|
||||
*/
|
||||
enableBackgroundSessions?: boolean;
|
||||
/**
|
||||
* Should data be pushed to flurry when the app closes, defaults to true, iOS only
|
||||
*/
|
||||
reportSessionsOnClose?: boolean;
|
||||
/**
|
||||
* Should data be pushed to flurry when the app is paused, defaults to true, iOS only
|
||||
*/
|
||||
reportSessionsOnPause?: boolean;
|
||||
}
|
||||
|
||||
export interface FlurryAnalyticsLocation {
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
/**
|
||||
* Set altitude
|
||||
* It is optional and use only for iOS
|
||||
*/
|
||||
verticalAccuracy?: number;
|
||||
/**
|
||||
* Set radius about 2d point
|
||||
* It is optional and use only for iOS
|
||||
*/
|
||||
horizontalAccuracy?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Flurry Analytics
|
||||
* @description
|
||||
* This plugin connects to Flurry Analytics SDK
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import { FlurryAnalytics } from 'ionic-native/flurry-analytics';
|
||||
*
|
||||
* constructor(private flurryAnalytics: FlurryAnalytics) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* constant options: FlurryAnalyticsOptions = {
|
||||
* reportSessionsOnClose: true,
|
||||
* enableLogging: true
|
||||
* }
|
||||
*
|
||||
* FlurryAnalytics.init('12345678965412303214', options)
|
||||
* .then((something: any) => doSomething(something))
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* ```
|
||||
* @interfaces
|
||||
* FlurryAnalyticsOptions
|
||||
* FlurryAnalyticsLocation
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'FlurryAnalyticsPlugin',
|
||||
plugin: 'cordova-plugin-flurryanalytics',
|
||||
pluginRef: 'fa',
|
||||
repo: 'https://github.com/blakgeek/cordova-plugin-flurryanalytics.git',
|
||||
platforms: ['Android', 'iOS', 'Browser']
|
||||
})
|
||||
@Injectable()
|
||||
export class FlurryAnalytics extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Set the setting for Flurry Analytics
|
||||
* @param appKey {string} API key is required
|
||||
* @param options {FlurryAnalyticsOptions} is optional
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
init(appKey: string, options?: FlurryAnalyticsOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function set the Event
|
||||
* @param eventName {string} The param to configure name of Event
|
||||
* @param params {Object} optional
|
||||
* @return {Promise<any>} Returns a promise that resolves when event is set
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 0
|
||||
})
|
||||
logEvent(eventName: string, params?: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function start a timed event
|
||||
* @param eventName
|
||||
* @param params {Object} optional
|
||||
* @return {Promise<any>} Returns a promise that resolves when timed event is started tracking
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 0
|
||||
})
|
||||
startTimedEvent(eventName: string, params?: Object): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function complete a timed event
|
||||
* @param eventName
|
||||
* @param params {Object} optional
|
||||
* @return {Promise<any>} Returns a promise that resolves when timed event is ended tracking
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 0
|
||||
})
|
||||
endTimedEvent(eventName: string, params?: Object): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function log an error
|
||||
* @param code
|
||||
* @param message
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 0
|
||||
})
|
||||
logError(code, message): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function log a page view
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
logPageView(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function set the location for the event
|
||||
* (this is will only be used for very course grained statistics like city)
|
||||
* @param location
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 0
|
||||
})
|
||||
setLocation(location: FlurryAnalyticsLocation): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function start the session
|
||||
* Only needed for older versions of Android
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
startSession(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function end the session
|
||||
* Only needed for older versions of Android
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
endSession(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, CordovaFunctionOverride } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, CordovaFunctionOverride, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
declare var window: any;
|
||||
@@ -83,7 +83,7 @@ declare var window: any;
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class Geofence {
|
||||
export class Geofence extends IonicNativePlugin {
|
||||
|
||||
public TransitionType = {
|
||||
ENTER: 1,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
declare var navigator: any;
|
||||
@@ -156,7 +156,7 @@ export interface GeolocationOptions {
|
||||
platforms: ['Android', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class Geolocation {
|
||||
export class Geolocation extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Get the device's current position.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Globalization
|
||||
@@ -29,7 +29,7 @@ import { Cordova, Plugin } from '@ionic-native/core';
|
||||
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Firefox OS', 'iOS', 'Windows Phone 8', 'Widnows', 'Browser']
|
||||
})
|
||||
@Injectable()
|
||||
export class Globalization {
|
||||
export class Globalization extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Returns the BCP-47 compliant language identifier tag to the successCallback with a properties object as a parameter. That object should have a value property with a String value.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
declare var window;
|
||||
|
||||
@@ -22,6 +22,7 @@ declare var window;
|
||||
* this.ga.startTrackerWithId('YOUR_TRACKER_ID')
|
||||
* .then(() => {
|
||||
* console.log('Google analytics is ready now');
|
||||
this.ga.trackView('test');
|
||||
* // Tracker is ready
|
||||
* // You can now track pages or set additional information such as AppVersion or UserId
|
||||
* })
|
||||
@@ -38,7 +39,7 @@ declare var window;
|
||||
platforms: ['Android', 'iOS', 'Browser']
|
||||
})
|
||||
@Injectable()
|
||||
export class GoogleAnalytics {
|
||||
export class GoogleAnalytics extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* In your 'deviceready' handler, set up your Analytics tracker.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, CordovaInstance, CordovaCheck, Plugin, InstanceProperty, InstanceCheck, checkAvailability } from '@ionic-native/core';
|
||||
import { Cordova, CordovaInstance, CordovaCheck, Plugin, InstanceProperty, InstanceCheck, checkAvailability, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import 'rxjs/add/observable/fromEvent';
|
||||
|
||||
@@ -384,7 +384,7 @@ export class GoogleMap {
|
||||
* export class MapPage {
|
||||
* constructor(private googleMaps: GoogleMaps) {}
|
||||
*
|
||||
* // Load map only after view is initialize
|
||||
* // Load map only after view is initialized
|
||||
* ngAfterViewInit() {
|
||||
* this.loadMap();
|
||||
* }
|
||||
@@ -455,7 +455,7 @@ export class GoogleMap {
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class GoogleMaps {
|
||||
export class GoogleMaps extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Checks if a map object has been created and is available.
|
||||
@@ -1749,7 +1749,7 @@ export interface GeocoderResult {
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Geocoder',
|
||||
pluginRef: 'plugins.google.maps.Geocoder',
|
||||
pluginRef: 'plugin.google.maps.Geocoder',
|
||||
plugin: 'cordova-plugin-googlemaps',
|
||||
repo: ''
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Google Plus
|
||||
@@ -12,7 +12,7 @@ import { Cordova, Plugin } from '@ionic-native/core';
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.googlePlus.login()
|
||||
* this.googlePlus.login({})
|
||||
* .then(res => console.log(res))
|
||||
* .catch(err => console.error(err));
|
||||
*
|
||||
@@ -28,7 +28,7 @@ import { Cordova, Plugin } from '@ionic-native/core';
|
||||
installVariables: ['REVERSED_CLIENT_ID']
|
||||
})
|
||||
@Injectable()
|
||||
export class GooglePlus {
|
||||
export class GooglePlus extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* The login function walks the user through the Google Auth process.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@@ -81,7 +81,7 @@ export interface GyroscopeOptions {
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Gyroscope {
|
||||
export class Gyroscope extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Watching for gyroscope sensor changes
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Header Color
|
||||
@@ -25,7 +25,7 @@ import { Plugin, Cordova } from '@ionic-native/core';
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class HeaderColor {
|
||||
export class HeaderColor extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Set a color to the task header
|
||||
|
||||
@@ -1,6 +1,21 @@
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
export interface HealthDataType {
|
||||
/**
|
||||
* Read only date types (see https://github.com/dariosalvi78/cordova-plugin-health#supported-data-types)
|
||||
*/
|
||||
read?: string[];
|
||||
|
||||
/**
|
||||
* Write only date types (see https://github.com/dariosalvi78/cordova-plugin-health#supported-data-types)
|
||||
*/
|
||||
write?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
@@ -154,9 +169,19 @@ export interface HealthData {
|
||||
* ...
|
||||
*
|
||||
* this.health.isAvailable()
|
||||
* .then((available:boolean) => {
|
||||
* console.log(available);
|
||||
* this.health.requestAuthorization([
|
||||
* 'distance', 'nutrition', //read and write permissions
|
||||
* {
|
||||
* read: ['steps'], //read only permission
|
||||
* write: ['height', 'weight'] //write only permission
|
||||
* }
|
||||
* ])
|
||||
* .then(res => console.log(res))
|
||||
* .catch(e => console.log(e));
|
||||
*
|
||||
* })
|
||||
* .catch(e => console.log(e));
|
||||
*
|
||||
* ```
|
||||
* See description at https://github.com/dariosalvi78/cordova-plugin-health for a full list of Datatypes and see examples.
|
||||
@@ -175,7 +200,7 @@ export interface HealthData {
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Health {
|
||||
export class Health extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Tells if either Google Fit or HealthKit are available.
|
||||
@@ -204,7 +229,7 @@ export class Health {
|
||||
promptInstallFit(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Requests read and write access to a set of data types. It is recommendable to always explain why the app
|
||||
* Requests read and/or write access to a set of data types. It is recommendable to always explain why the app
|
||||
* needs access to the data before asking the user to authorize it.
|
||||
* This function must be called before using the query and store functions, even if the authorization has already
|
||||
* been given at some point in the past.
|
||||
@@ -219,22 +244,25 @@ export class Health {
|
||||
* In Android 6 and over, this function will also ask for some dynamic permissions if needed
|
||||
* (e.g. in the case of "distance", it will need access to ACCESS_FINE_LOCATION).
|
||||
*
|
||||
* @param {Array<String>} datatypes a list of data types you want to be granted access to
|
||||
*
|
||||
* @param {Array<string | HealthDataType>} datatypes a list of data types you want to be granted access to.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
requestAuthorization(datatypes: Array<string>): Promise<any> { return; }
|
||||
requestAuthorization(datatypes: Array<string | HealthDataType>): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Check if the app has authorization to read/write a set of datatypes.
|
||||
* This function is similar to requestAuthorization() and has similar quirks.
|
||||
*
|
||||
* @param {Array<String>} datatypes a list of data types you want to be granted access to
|
||||
* Quirks of isAuthorized()
|
||||
*
|
||||
* In iOS, this function will only check authorization status for writeable data.
|
||||
* Read-only data will always be considered as not authorized. This is an intended behaviour of HealthKit.
|
||||
*
|
||||
* @param {Array<string | HealthDataType>} datatypes a list of data types you want to check access of, same as in requestAuthorization
|
||||
* @return {Promise<boolean>} Returns a promise that resolves with a boolean that indicates the authorization status
|
||||
*/
|
||||
@Cordova()
|
||||
isAuthorized(datatypes: Array<string>): Promise<boolean> { return; }
|
||||
isAuthorized(datatypes: Array<string | HealthDataType>): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Gets all the data points of a certain data type within a certain time window.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface HotspotConnectionInfo {
|
||||
|
||||
@@ -133,7 +133,7 @@ export interface HotspotDevice {
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class Hotspot {
|
||||
export class Hotspot extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* @returns {Promise<boolean>}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface HTTPResponse {
|
||||
/**
|
||||
@@ -65,7 +65,7 @@ export interface HTTPResponse {
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class HTTP {
|
||||
export class HTTP extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* This returns an object representing a basic HTTP Authorization header of the form.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export interface HttpdOptions {
|
||||
@@ -55,7 +55,7 @@ export interface HttpdOptions {
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class Httpd {
|
||||
export class Httpd extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Starts a web server.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, CordovaCheck } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
declare var cordova: any;
|
||||
@@ -286,7 +286,7 @@ export interface IBeaconDelegate {
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class IBeacon {
|
||||
export class IBeacon extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Instances of this class are delegates between the {@link LocationManager} and
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
export interface ImagePickerOptions {
|
||||
@@ -63,7 +63,7 @@ export interface ImagePickerOptions {
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class ImagePicker {
|
||||
export class ImagePicker extends IonicNativePlugin {
|
||||
/**
|
||||
* Pick pictures from the library.
|
||||
* @param {ImagePickerOptions} options
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface ImageResizerOptions {
|
||||
/**
|
||||
@@ -80,7 +80,7 @@ export interface ImageResizerOptions {
|
||||
platforms: ['Android', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class ImageResizer {
|
||||
export class ImageResizer extends IonicNativePlugin {
|
||||
/**
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, CordovaInstance } from '@ionic-native/core';
|
||||
import { Plugin, CordovaInstance, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import 'rxjs/add/observable/fromEvent';
|
||||
|
||||
@@ -166,7 +166,7 @@ export class InAppBrowserObject {
|
||||
platforms: ['Amazon', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'OS X', 'Ubuntu', 'Windows', 'Windows Phone']
|
||||
})
|
||||
@Injectable()
|
||||
export class InAppBrowser {
|
||||
export class InAppBrowser extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Opens a URL in a new InAppBrowser instance, the current browser instance, or the system browser.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
/**
|
||||
@@ -61,7 +61,7 @@ import { Plugin, Cordova } from '@ionic-native/core';
|
||||
repo: 'https://github.com/AlexDisler/cordova-plugin-inapppurchase'
|
||||
})
|
||||
@Injectable()
|
||||
export class InAppPurchase {
|
||||
export class InAppPurchase extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Retrieves a list of full product data from Apple/Google. This method must be called before making purchases.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
/**
|
||||
@@ -37,7 +37,7 @@ import { Cordova, Plugin } from '@ionic-native/core';
|
||||
platforms: ['Android', 'iOS', 'Windows Phone 8']
|
||||
})
|
||||
@Injectable()
|
||||
export class Insomnia {
|
||||
export class Insomnia extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Keeps awake the application
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Instagram
|
||||
@@ -27,7 +27,7 @@ import { Plugin, Cordova } from '@ionic-native/core';
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Instagram {
|
||||
export class Instagram extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Detect if the Instagram application is installed on the device.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
declare var window: any;
|
||||
@@ -49,18 +49,17 @@ export interface IntelSecurityDataOptions {
|
||||
* let storageID = 'id';
|
||||
*
|
||||
* this.intelSecurity.data.createFromData({ data: 'Sample Data' })
|
||||
* .then((instanceID: Number) => this.IntelSecurity.storage.write({ id: storageId, instanceID: instanceID }))
|
||||
* .then((instanceID: Number) => this.intelSecurity.storage.write({ id: storageId, instanceID: instanceID }))
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* this.intelSecurity.storage.read({id: storageID })
|
||||
* .then(this.intelSecurity.data.getData)
|
||||
* .then((instanceID: number) => this.intelSec.data.getData(instanceID))
|
||||
* .then((data: string) => console.log(data)) // Resolves to 'Sample Data'
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* this.intelSecurity.storage.delete({ id: storageID })
|
||||
* .then(() => console.log('Deleted Successfully'))
|
||||
* .catch((error: any) => console.log(error));
|
||||
*
|
||||
* ```
|
||||
* @classes
|
||||
* IntelSecurityData
|
||||
@@ -76,7 +75,7 @@ export interface IntelSecurityDataOptions {
|
||||
platforms: ['Android', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class IntelSecurity {
|
||||
export class IntelSecurity extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* returns an IntelSecurityStorage object
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Is Debug
|
||||
@@ -29,7 +29,7 @@ import { Plugin, Cordova } from '@ionic-native/core';
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class IsDebug {
|
||||
export class IsDebug extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Determine if an app was installed via xcode / eclipse / the ionic CLI etc
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, CordovaCheck } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
declare var cordova: any;
|
||||
@@ -38,7 +38,7 @@ declare var cordova: any;
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class JinsMeme {
|
||||
export class JinsMeme extends IonicNativePlugin {
|
||||
/**
|
||||
* Authentication and authorization of App and SDK.
|
||||
* Must call this method first.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
platforms: ['Android', 'BlackBerry 10', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class Keyboard {
|
||||
export class Keyboard extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Hide the keyboard accessory bar with the next, previous and done buttons.
|
||||
|
||||
94
src/@ionic-native/plugins/keychain/index.ts
Normal file
94
src/@ionic-native/plugins/keychain/index.ts
Normal file
@@ -0,0 +1,94 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
/**
|
||||
* @name Keychain
|
||||
* @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).
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Keychain } from '@ionic-native/keychain';
|
||||
*
|
||||
* constructor(private keychain: Keychain) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.keychain.set(key, value).then(() => {
|
||||
* this.keychain.get(key)
|
||||
* .then(value => console.log('Got value', value))
|
||||
* .catch(err => console.error('Error getting', err));
|
||||
* })
|
||||
* .catch(err => console.error('Error setting', err));
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Keychain',
|
||||
plugin: 'cordova-plugin-ios-keychain',
|
||||
pluginRef: 'window.Keychain',
|
||||
repo: 'https://github.com/driftyco/cordova-plugin-ios-keychain/',
|
||||
platforms: ['iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Keychain extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Retrieves a value for a key
|
||||
*
|
||||
* @param {string} key the key to retrieve
|
||||
* @param {string} [touchIDMessage] the message to show underneath the TouchID prompt (if any)
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
get(key: string, touchIDMessage?: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Sets a value for a key
|
||||
*
|
||||
* @param {string} key the key to set
|
||||
* @param {string|number|boolean} value the value to set
|
||||
* @param {boolean} [useTouchID] whether to store the value with security such that TouchID will be needed to grab it
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
set(key: string, value: string|number|boolean, useTouchID?: boolean): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Gets a JSON value for a key
|
||||
*
|
||||
* @param {string} key the key to retrieve
|
||||
* @param {string} touchIDMessage the message to show underneath the TouchID prompt (if any)
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
getJson(key: string, touchIDMessage?: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Sets a JSON value for a key
|
||||
*
|
||||
* @param {string} key the key to set
|
||||
* @param {any} obj value the value to set
|
||||
* @param {boolean} [useTouchId] Wether to store the value with security such that TouchID will be needed to grab it
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
setJson(key: string, obj: any, useTouchId?: boolean): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Removes a value for a key
|
||||
*
|
||||
* @param {string} key the key to remove
|
||||
*/
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
remove(key: string): Promise<any> { return; }
|
||||
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface LaunchNavigatorOptions {
|
||||
|
||||
@@ -95,7 +95,7 @@ export interface LaunchNavigatorOptions {
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class LaunchNavigator {
|
||||
export class LaunchNavigator extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Launches navigator app
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Launch Review
|
||||
@@ -30,7 +30,7 @@ import { Plugin, Cordova } from '@ionic-native/core';
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class LaunchReview {
|
||||
export class LaunchReview extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Launch store app using given app ID
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
export type LinkedInLoginScopes = 'r_basicprofile' | 'r_emailaddress' | 'rw_company_admin' | 'w_share';
|
||||
@@ -57,7 +57,7 @@ export type LinkedInLoginScopes = 'r_basicprofile' | 'r_emailaddress' | 'rw_comp
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class LinkedIn {
|
||||
export class LinkedIn extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Login with the LinkedIn App
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface ILocalNotification {
|
||||
|
||||
@@ -148,7 +148,7 @@ export interface ILocalNotification {
|
||||
platforms: ['Android', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
export class LocalNotifications {
|
||||
export class LocalNotifications extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Schedules a single or multiple notifications
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Location Accuracy
|
||||
@@ -36,7 +36,7 @@ import { Plugin, Cordova } from '@ionic-native/core';
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class LocationAccuracy {
|
||||
export class LocationAccuracy extends IonicNativePlugin {
|
||||
/**
|
||||
* Indicates if you can request accurate location
|
||||
* @returns {Promise<boolean>} Returns a promise that resovles with a boolean that indicates if you can request accurate location
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
/**
|
||||
* @name Market
|
||||
* @description
|
||||
@@ -25,7 +25,7 @@ import { Plugin, Cordova } from '@ionic-native/core';
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class Market {
|
||||
export class Market extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Opens an app in Google Play / App Store
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, CordovaProperty, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
declare var navigator: any;
|
||||
@@ -149,7 +149,7 @@ export interface ConfigurationData {
|
||||
repo: 'https://github.com/apache/cordova-plugin-media-capture'
|
||||
})
|
||||
@Injectable()
|
||||
export class MediaCapture {
|
||||
export class MediaCapture extends IonicNativePlugin {
|
||||
/**
|
||||
* The recording image sizes and formats supported by the device.
|
||||
* @returns {ConfigurationData[]}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CordovaInstance, Plugin, CordovaCheck } from '@ionic-native/core';
|
||||
import { CordovaInstance, Plugin, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
declare var Media: any;
|
||||
|
||||
@@ -92,7 +92,6 @@ export class MediaObject {
|
||||
})
|
||||
startRecord(): void { }
|
||||
|
||||
|
||||
/**
|
||||
* Stops recording
|
||||
*/
|
||||
@@ -124,8 +123,27 @@ export class MediaObject {
|
||||
sync: true
|
||||
})
|
||||
stop(): void { }
|
||||
|
||||
}
|
||||
|
||||
export type MediaStatusUpdateCallback = (statusCode: number) => void;
|
||||
|
||||
export interface MediaError {
|
||||
|
||||
/**
|
||||
* Error message
|
||||
*/
|
||||
message: string;
|
||||
|
||||
/**
|
||||
* Error code
|
||||
*/
|
||||
code: number;
|
||||
|
||||
}
|
||||
|
||||
export type MediaErrorCallback = (error: MediaError) => void;
|
||||
|
||||
/**
|
||||
* @name Media
|
||||
* @description
|
||||
@@ -144,55 +162,53 @@ export class MediaObject {
|
||||
* // We can optionally pass a second argument to track the status of the media
|
||||
*
|
||||
* const onStatusUpdate = (status) => console.log(status);
|
||||
* const onSuccess = () => console.log('Action is successful.');
|
||||
* const onError = (error) => console.error(error.message);
|
||||
*
|
||||
* this.media.create('path/to/file.mp3', onStatusUpdate)
|
||||
* .then((file: MediaObject) => {
|
||||
* const file: MediaObject = this.media.create('path/to/file.mp3', onStatusUpdate, onSuccess, onError);
|
||||
*
|
||||
* // play the file
|
||||
* file.play();
|
||||
* // play the file
|
||||
* file.play();
|
||||
*
|
||||
* // pause the file
|
||||
* file.pause();
|
||||
* // pause the file
|
||||
* file.pause();
|
||||
*
|
||||
* // get current playback position
|
||||
* file.getCurrentPosition().then((position) => {
|
||||
* console.log(position);
|
||||
* });
|
||||
* // get current playback position
|
||||
* file.getCurrentPosition().then((position) => {
|
||||
* console.log(position);
|
||||
* });
|
||||
*
|
||||
* // get file duration
|
||||
* file.getDuration().then((duration) => {
|
||||
* console.log(position);
|
||||
* });
|
||||
* // get file duration
|
||||
* let duration = file.getDuration();
|
||||
* console.log(duration);
|
||||
*
|
||||
* // skip to 10 seconds (expects int value in ms)
|
||||
* file.seekTo(10000);
|
||||
* // skip to 10 seconds (expects int value in ms)
|
||||
* file.seekTo(10000);
|
||||
*
|
||||
* // stop playing the file
|
||||
* file.stop();
|
||||
* // stop playing the file
|
||||
* file.stop();
|
||||
*
|
||||
* // release the native audio resource
|
||||
* // Platform Quirks:
|
||||
* // iOS simply create a new instance and the old one will be overwritten
|
||||
* // Android you must call release() to destroy instances of media when you are done
|
||||
* file.release();
|
||||
* // release the native audio resource
|
||||
* // Platform Quirks:
|
||||
* // iOS simply create a new instance and the old one will be overwritten
|
||||
* // Android you must call release() to destroy instances of media when you are done
|
||||
* file.release();
|
||||
*
|
||||
* })
|
||||
* .catch(e => console.log('Error opening media file', e));
|
||||
*
|
||||
*
|
||||
* // Recording to a file
|
||||
* this.media.create('path/to/file.mp3')
|
||||
* .then((file: MedieObject) => {
|
||||
* const file: MediaObject = this.media.create('path/to/file.mp3');
|
||||
*
|
||||
* file.startRecord();
|
||||
* file.startRecord();
|
||||
*
|
||||
* file.stopRecord();
|
||||
* file.stopRecord();
|
||||
*
|
||||
* });
|
||||
*
|
||||
* ```
|
||||
* @classes
|
||||
* MediaObject
|
||||
* @interfaces
|
||||
* MediaError
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'MediaPlugin',
|
||||
@@ -201,7 +217,7 @@ export class MediaObject {
|
||||
pluginRef: 'Media'
|
||||
})
|
||||
@Injectable()
|
||||
export class MediaPlugin {
|
||||
export class MediaPlugin extends IonicNativePlugin {
|
||||
|
||||
// Constants
|
||||
/**
|
||||
@@ -246,19 +262,20 @@ export class MediaPlugin {
|
||||
/**
|
||||
* Open a media file
|
||||
* @param src {string} A URI containing the audio content.
|
||||
* @param onStatusUpdate {Function} A callback function to be invoked when the status of the file changes
|
||||
* @return {Promise<MediaObject>}
|
||||
* @param [onStatusUpdate] {MediaStatusUpdateCallback} A callback function to be invoked when the status of the file changes
|
||||
* @param [onSuccess] {Function} A callback function to be invoked after the current play, record, or stop action is completed
|
||||
* @param [onError] {MediaErrorCallback} A callback function is be invoked if an error occurs.
|
||||
* @return {MediaObject}
|
||||
*/
|
||||
@CordovaCheck()
|
||||
create(src: string, onStatusUpdate?: Function): Promise<MediaObject> {
|
||||
create(src: string,
|
||||
onStatusUpdate?: MediaStatusUpdateCallback,
|
||||
onSuccess?: Function,
|
||||
onError?: MediaErrorCallback): MediaObject {
|
||||
|
||||
return new Promise<MediaObject>((resolve, reject) => {
|
||||
// Creates a new media object
|
||||
// Resolves with the media object
|
||||
// or rejects with the error
|
||||
const instance = new Media(src, resolve, reject, onStatusUpdate);
|
||||
return resolve(new MediaObject(instance));
|
||||
});
|
||||
const instance = new Media(src, onSuccess, onError, onStatusUpdate);
|
||||
return new MediaObject(instance);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin } from '@ionic-native/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
declare var mixpanel: any;
|
||||
|
||||
@@ -31,7 +31,7 @@ declare var mixpanel: any;
|
||||
repo: 'https://github.com/samzilverberg/cordova-mixpanel-plugin'
|
||||
})
|
||||
@Injectable()
|
||||
export class Mixpanel {
|
||||
export class Mixpanel extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -115,7 +115,7 @@ export class Mixpanel {
|
||||
pluginName: 'Mixpanel'
|
||||
})
|
||||
@Injectable()
|
||||
export class MixpanelPeople {
|
||||
export class MixpanelPeople extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova } from '@ionic-native/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export interface MusicControlsOptions {
|
||||
@@ -56,7 +56,7 @@ export interface MusicControlsOptions {
|
||||
* ticker : 'Now playing "Time is Running Out"'
|
||||
* });
|
||||
*
|
||||
* this.musicControls.subscribe(action => {
|
||||
* this.musicControls.subscribe().subscribe(action => {
|
||||
*
|
||||
* switch(action) {
|
||||
* case 'music-controls-next':
|
||||
@@ -107,7 +107,7 @@ export interface MusicControlsOptions {
|
||||
repo: 'https://github.com/homerours/cordova-music-controls-plugin'
|
||||
})
|
||||
@Injectable()
|
||||
export class MusicControls {
|
||||
export class MusicControls extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Create the media controls
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user