mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-13 14:21:04 +08:00
parent
48b0f16ed9
commit
3ced31ed2a
@ -1,7 +1,6 @@
|
|||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import 'rxjs/add/observable/fromEvent';
|
import { fromEvent, Observable } from 'rxjs';
|
||||||
|
|
||||||
export interface AdMobFreeBannerConfig {
|
export interface AdMobFreeBannerConfig {
|
||||||
/**
|
/**
|
||||||
@ -70,10 +69,9 @@ export interface AdMobFreeRewardVideoConfig {
|
|||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'AdMobFree',
|
pluginName: 'AdMobFree',
|
||||||
plugin: 'cordova-plugin-admob-free',
|
plugin: 'cordova-plugin-admob-free',
|
||||||
pluginRef: 'admob.banner',
|
pluginRef: 'admob.banner'
|
||||||
})
|
})
|
||||||
export class AdMobFreeBanner extends IonicNativePlugin {
|
export class AdMobFreeBanner extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update config.
|
* Update config.
|
||||||
* @param options
|
* @param options
|
||||||
@ -119,7 +117,6 @@ export class AdMobFreeBanner extends IonicNativePlugin {
|
|||||||
show(): Promise<any> {
|
show(): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -128,10 +125,9 @@ export class AdMobFreeBanner extends IonicNativePlugin {
|
|||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'AdMobFree',
|
pluginName: 'AdMobFree',
|
||||||
plugin: 'cordova-plugin-admob-free',
|
plugin: 'cordova-plugin-admob-free',
|
||||||
pluginRef: 'admob.interstitial',
|
pluginRef: 'admob.interstitial'
|
||||||
})
|
})
|
||||||
export class AdMobFreeInterstitial extends IonicNativePlugin {
|
export class AdMobFreeInterstitial extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update config.
|
* Update config.
|
||||||
* @param options
|
* @param options
|
||||||
@ -168,7 +164,6 @@ export class AdMobFreeInterstitial extends IonicNativePlugin {
|
|||||||
show(): Promise<any> {
|
show(): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -177,10 +172,9 @@ export class AdMobFreeInterstitial extends IonicNativePlugin {
|
|||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'AdMobFree',
|
pluginName: 'AdMobFree',
|
||||||
plugin: 'cordova-plugin-admob-free',
|
plugin: 'cordova-plugin-admob-free',
|
||||||
pluginRef: 'admob.rewardvideo',
|
pluginRef: 'admob.rewardvideo'
|
||||||
})
|
})
|
||||||
export class AdMobFreeRewardVideo extends IonicNativePlugin {
|
export class AdMobFreeRewardVideo extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update config.
|
* Update config.
|
||||||
* @param options
|
* @param options
|
||||||
@ -217,7 +211,6 @@ export class AdMobFreeRewardVideo extends IonicNativePlugin {
|
|||||||
show(): Promise<any> {
|
show(): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -270,7 +263,6 @@ export class AdMobFreeRewardVideo extends IonicNativePlugin {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AdMobFree extends IonicNativePlugin {
|
export class AdMobFree extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience object to get event names
|
* Convenience object to get event names
|
||||||
* @type {Object}
|
* @type {Object}
|
||||||
@ -318,7 +310,6 @@ export class AdMobFree extends IonicNativePlugin {
|
|||||||
* @return {Observable<any>}
|
* @return {Observable<any>}
|
||||||
*/
|
*/
|
||||||
on(event: string): Observable<any> {
|
on(event: string): Observable<any> {
|
||||||
return Observable.fromEvent(document, event);
|
return fromEvent(document, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export type AdSize =
|
export type AdSize =
|
||||||
| 'SMART_BANNER'
|
| 'SMART_BANNER'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export type AndroidExoPlayerAspectRatio = 'FILL_SCREEN' | 'FIT_SCREEN';
|
export type AndroidExoPlayerAspectRatio = 'FILL_SCREEN' | 'FIT_SCREEN';
|
||||||
|
|
||||||
@ -205,7 +205,10 @@ export class AndroidExoplayer extends IonicNativePlugin {
|
|||||||
* @return {Promise<void>}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setStream(url: string, controller: AndroidExoPlayerControllerConfig): Promise<void> {
|
setStream(
|
||||||
|
url: string,
|
||||||
|
controller: AndroidExoPlayerControllerConfig
|
||||||
|
): Promise<void> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name App Center Push
|
* @name App Center Push
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -25,11 +25,18 @@ import { Injectable } from '@angular/core';
|
|||||||
plugin: 'cordova-plugin-app-preferences',
|
plugin: 'cordova-plugin-app-preferences',
|
||||||
pluginRef: 'plugins.appPreferences',
|
pluginRef: 'plugins.appPreferences',
|
||||||
repo: 'https://github.com/apla/me.apla.cordova.app-preferences',
|
repo: 'https://github.com/apla/me.apla.cordova.app-preferences',
|
||||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'iOS', 'macOS', 'Windows 8', 'Windows Phone']
|
platforms: [
|
||||||
|
'Android',
|
||||||
|
'BlackBerry 10',
|
||||||
|
'Browser',
|
||||||
|
'iOS',
|
||||||
|
'macOS',
|
||||||
|
'Windows 8',
|
||||||
|
'Windows Phone'
|
||||||
|
]
|
||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AppPreferences extends IonicNativePlugin {
|
export class AppPreferences extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a preference value
|
* Get a preference value
|
||||||
*
|
*
|
||||||
@ -156,5 +163,4 @@ export class AppPreferences extends IonicNativePlugin {
|
|||||||
defaults(): Object {
|
defaults(): Object {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,21 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
|
|
||||||
export type IMakePayments =
|
export type IMakePayments =
|
||||||
'This device can make payments and has a supported card'
|
| 'This device can make payments and has a supported card'
|
||||||
| 'This device cannot make payments.'
|
| 'This device cannot make payments.'
|
||||||
| 'This device can make payments but has no supported cards';
|
| 'This device can make payments but has no supported cards';
|
||||||
export type IShippingType = 'shipping' | 'delivery' | 'store' | 'service';
|
export type IShippingType = 'shipping' | 'delivery' | 'store' | 'service';
|
||||||
export type IBillingRequirement = 'none' | 'all' | 'postcode' | 'name' | 'email' | 'phone';
|
export type IBillingRequirement =
|
||||||
|
| 'none'
|
||||||
|
| 'all'
|
||||||
|
| 'postcode'
|
||||||
|
| 'name'
|
||||||
|
| 'email'
|
||||||
|
| 'phone';
|
||||||
export type ITransactionStatus =
|
export type ITransactionStatus =
|
||||||
'success'
|
| 'success'
|
||||||
| 'failure'
|
| 'failure'
|
||||||
| 'invalid-billing-address'
|
| 'invalid-billing-address'
|
||||||
| 'invalid-shipping-address'
|
| 'invalid-shipping-address'
|
||||||
@ -18,7 +24,9 @@ export type ITransactionStatus =
|
|||||||
| 'incorrect-pin'
|
| 'incorrect-pin'
|
||||||
| 'locked-pin';
|
| 'locked-pin';
|
||||||
export type ICompleteTransaction = 'Payment status applied.';
|
export type ICompleteTransaction = 'Payment status applied.';
|
||||||
export type IUpdateItemsAndShippingStatus = 'Updated List Info' | 'Did you make a payment request?';
|
export type IUpdateItemsAndShippingStatus =
|
||||||
|
| 'Updated List Info'
|
||||||
|
| 'Did you make a payment request?';
|
||||||
|
|
||||||
export interface IPaymentResponse {
|
export interface IPaymentResponse {
|
||||||
billingNameFirst?: string;
|
billingNameFirst?: string;
|
||||||
@ -144,11 +152,10 @@ export interface ISelectedShippingContact {
|
|||||||
plugin: 'cordova-plugin-applepay',
|
plugin: 'cordova-plugin-applepay',
|
||||||
pluginRef: 'ApplePay',
|
pluginRef: 'ApplePay',
|
||||||
repo: 'https://github.com/samkelleher/cordova-plugin-applepay',
|
repo: 'https://github.com/samkelleher/cordova-plugin-applepay',
|
||||||
platforms: ['iOS'],
|
platforms: ['iOS']
|
||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ApplePay extends IonicNativePlugin {
|
export class ApplePay extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Detects if the current device supports Apple Pay and has any capable cards registered.
|
* Detects if the current device supports Apple Pay and has any capable cards registered.
|
||||||
* @return {Promise<IMakePayments>} Returns a promise
|
* @return {Promise<IMakePayments>} Returns a promise
|
||||||
@ -183,7 +190,9 @@ export class ApplePay extends IonicNativePlugin {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'stopListeningForShippingContactSelection'
|
clearFunction: 'stopListeningForShippingContactSelection'
|
||||||
})
|
})
|
||||||
startListeningForShippingContactSelection(): Observable<ISelectedShippingContact> {
|
startListeningForShippingContactSelection(): Observable<
|
||||||
|
ISelectedShippingContact
|
||||||
|
> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,7 +246,9 @@ export class ApplePay extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
otherPromise: true
|
otherPromise: true
|
||||||
})
|
})
|
||||||
updateItemsAndShippingMethods(list: IOrderItemsAndShippingMethods): Promise<IUpdateItemsAndShippingStatus> {
|
updateItemsAndShippingMethods(
|
||||||
|
list: IOrderItemsAndShippingMethods
|
||||||
|
): Promise<IUpdateItemsAndShippingStatus> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -330,7 +341,9 @@ export class ApplePay extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
otherPromise: true
|
otherPromise: true
|
||||||
})
|
})
|
||||||
completeLastTransaction(complete: ITransactionStatus): Promise<ICompleteTransaction> {
|
completeLastTransaction(
|
||||||
|
complete: ITransactionStatus
|
||||||
|
): Promise<ICompleteTransaction> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export interface BackgroundGeolocationResponse {
|
export interface BackgroundGeolocationResponse {
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configurations items that can be updated.
|
* Configurations items that can be updated.
|
||||||
@ -21,9 +21,9 @@ export interface BackgroundModeConfiguration {
|
|||||||
*/
|
*/
|
||||||
icon?: string;
|
icon?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the background color of the notification circle
|
* Set the background color of the notification circle
|
||||||
*/
|
*/
|
||||||
color?: string;
|
color?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -31,9 +31,9 @@ export interface BackgroundModeConfiguration {
|
|||||||
*/
|
*/
|
||||||
resume?: boolean;
|
resume?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When set to false makes the notifications visible on lockscreen (Android 5.0+)
|
* When set to false makes the notifications visible on lockscreen (Android 5.0+)
|
||||||
*/
|
*/
|
||||||
hidden?: boolean;
|
hidden?: boolean;
|
||||||
|
|
||||||
/** Big text */
|
/** Big text */
|
||||||
@ -139,8 +139,7 @@ export class BackgroundMode extends IonicNativePlugin {
|
|||||||
platforms: ['Android'],
|
platforms: ['Android'],
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
configure(options?: BackgroundModeConfiguration): void {
|
configure(options?: BackgroundModeConfiguration): void {}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Listen for events that the plugin fires. Available events are `enable`, `disable`, `activate`, `deactivate` and `failure`.
|
* Listen for events that the plugin fires. Available events are `enable`, `disable`, `activate`, `deactivate` and `failure`.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export interface BatteryStatusResponse {
|
export interface BatteryStatusResponse {
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export interface BLEScanOptions {
|
export interface BLEScanOptions {
|
||||||
/** true if duplicate devices should be reported, false (default) if devices should only be reported once. */
|
/** true if duplicate devices should be reported, false (default) if devices should only be reported once. */
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -70,7 +70,9 @@ export class BlinkUp extends IonicNativePlugin {
|
|||||||
callbackOrder: 'reverse',
|
callbackOrder: 'reverse',
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
startBlinkUp(options: BlinkUpOptions): Observable<any> { return; }
|
startBlinkUp(options: BlinkUpOptions): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* flashWifiBlinkUp - invokes the flash wifi process
|
* flashWifiBlinkUp - invokes the flash wifi process
|
||||||
@ -81,7 +83,9 @@ export class BlinkUp extends IonicNativePlugin {
|
|||||||
callbackOrder: 'reverse',
|
callbackOrder: 'reverse',
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
flashWifiBlinkUp(options: BlinkUpWifiOptions): Observable<any> { return; }
|
flashWifiBlinkUp(options: BlinkUpWifiOptions): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* flashWPSBlinkUp - invokes the flash wps process
|
* flashWPSBlinkUp - invokes the flash wps process
|
||||||
@ -92,7 +96,9 @@ export class BlinkUp extends IonicNativePlugin {
|
|||||||
callbackOrder: 'reverse',
|
callbackOrder: 'reverse',
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
flashWPSBlinkUp(options: BlinkUpWPSOptions): Observable<any> { return; }
|
flashWPSBlinkUp(options: BlinkUpWPSOptions): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* abortBlinkUp - abort blinkup process
|
* abortBlinkUp - abort blinkup process
|
||||||
@ -101,7 +107,9 @@ export class BlinkUp extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
abortBlinkUp(): Observable<any> { return; }
|
abortBlinkUp(): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clearBlinkUpData - clear wifi data
|
* clearBlinkUpData - clear wifi data
|
||||||
@ -110,5 +118,7 @@ export class BlinkUp extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
clearBlinkUpData(): Observable<any> { return; }
|
clearBlinkUpData(): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Bluetooth Serial
|
* @name Bluetooth Serial
|
||||||
@ -39,7 +39,6 @@ import { Observable } from 'rxjs/Observable';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class BluetoothSerial extends IonicNativePlugin {
|
export class BluetoothSerial extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to a Bluetooth device
|
* Connect to a Bluetooth device
|
||||||
* @param {string} macAddress_or_uuid Identifier of the remote device
|
* @param {string} macAddress_or_uuid Identifier of the remote device
|
||||||
@ -259,8 +258,7 @@ export class BluetoothSerial extends IonicNativePlugin {
|
|||||||
platforms: ['Android'],
|
platforms: ['Android'],
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
setName(newName: string): void {
|
setName(newName: string): void {}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes the device discoverable by other devices
|
* Makes the device discoverable by other devices
|
||||||
@ -270,7 +268,5 @@ export class BluetoothSerial extends IonicNativePlugin {
|
|||||||
platforms: ['Android'],
|
platforms: ['Android'],
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
setDiscoverable(discoverableDuration: number): void {
|
setDiscoverable(discoverableDuration: number): void {}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Broadcaster
|
* @name Broadcaster
|
||||||
@ -32,7 +32,6 @@ import { Observable } from 'rxjs/Observable';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Broadcaster extends IonicNativePlugin {
|
export class Broadcaster extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function listen to an event sent from the native code
|
* This function listen to an event sent from the native code
|
||||||
* @param eventName {string}
|
* @param eventName {string}
|
||||||
@ -57,5 +56,4 @@ export class Broadcaster extends IonicNativePlugin {
|
|||||||
fireNativeEvent(eventName: string, eventData: any): Promise<any> {
|
fireNativeEvent(eventName: string, eventData: any): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,18 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
namespace Http {
|
namespace Http {
|
||||||
export const enum Verb {
|
export const enum Verb {
|
||||||
GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT, PATCH
|
GET,
|
||||||
|
HEAD,
|
||||||
|
POST,
|
||||||
|
PUT,
|
||||||
|
DELETE,
|
||||||
|
TRACE,
|
||||||
|
OPTIONS,
|
||||||
|
CONNECT,
|
||||||
|
PATCH
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Response {
|
export interface Response {
|
||||||
@ -15,7 +23,12 @@ namespace Http {
|
|||||||
export interface Requester {
|
export interface Requester {
|
||||||
request(verb: Verb, url: string, callback: Callback<Response>): void;
|
request(verb: Verb, url: string, callback: Callback<Response>): void;
|
||||||
|
|
||||||
request(verb: Verb, url: string, requestBody: string, callback: Callback<Response>): void;
|
request(
|
||||||
|
verb: Verb,
|
||||||
|
url: string,
|
||||||
|
requestBody: string,
|
||||||
|
callback: Callback<Response>
|
||||||
|
): void;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +65,11 @@ export interface IRemotePackage extends IPackage {
|
|||||||
* @param downloadError Optional callback invoked in case of an error.
|
* @param downloadError Optional callback invoked in case of an error.
|
||||||
* @param downloadProgress Optional callback invoked during the download process. It is called several times with one DownloadProgress parameter.
|
* @param downloadProgress Optional callback invoked during the download process. It is called several times with one DownloadProgress parameter.
|
||||||
*/
|
*/
|
||||||
download(downloadSuccess: SuccessCallback<ILocalPackage>, downloadError?: ErrorCallback, downloadProgress?: SuccessCallback<DownloadProgress>): void;
|
download(
|
||||||
|
downloadSuccess: SuccessCallback<ILocalPackage>,
|
||||||
|
downloadError?: ErrorCallback,
|
||||||
|
downloadProgress?: SuccessCallback<DownloadProgress>
|
||||||
|
): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Aborts the current download session, previously started with download().
|
* Aborts the current download session, previously started with download().
|
||||||
@ -60,7 +77,10 @@ export interface IRemotePackage extends IPackage {
|
|||||||
* @param abortSuccess Optional callback invoked if the abort operation succeeded.
|
* @param abortSuccess Optional callback invoked if the abort operation succeeded.
|
||||||
* @param abortError Optional callback invoked in case of an error.
|
* @param abortError Optional callback invoked in case of an error.
|
||||||
*/
|
*/
|
||||||
abortDownload(abortSuccess?: SuccessCallback<void>, abortError?: ErrorCallback): void;
|
abortDownload(
|
||||||
|
abortSuccess?: SuccessCallback<void>,
|
||||||
|
abortError?: ErrorCallback
|
||||||
|
): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -88,7 +108,11 @@ export interface ILocalPackage extends IPackage {
|
|||||||
* @param installError Optional callback inovoked in case of an error.
|
* @param installError Optional callback inovoked in case of an error.
|
||||||
* @param installOptions Optional parameter used for customizing the installation behavior.
|
* @param installOptions Optional parameter used for customizing the installation behavior.
|
||||||
*/
|
*/
|
||||||
install(installSuccess: SuccessCallback<InstallMode>, errorCallback?: ErrorCallback, installOptions?: InstallOptions): void;
|
install(
|
||||||
|
installSuccess: SuccessCallback<InstallMode>,
|
||||||
|
errorCallback?: ErrorCallback,
|
||||||
|
installOptions?: InstallOptions
|
||||||
|
): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -129,7 +153,7 @@ interface IPackageInfoMetadata extends ILocalPackage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface NativeUpdateNotification {
|
interface NativeUpdateNotification {
|
||||||
updateAppVersion: boolean; // Always true
|
updateAppVersion: boolean; // Always true
|
||||||
appVersion: string;
|
appVersion: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,28 +185,42 @@ declare class AcquisitionStatus {
|
|||||||
declare class AcquisitionManager {
|
declare class AcquisitionManager {
|
||||||
constructor(httpRequester: Http.Requester, configuration: Configuration);
|
constructor(httpRequester: Http.Requester, configuration: Configuration);
|
||||||
|
|
||||||
public queryUpdateWithCurrentPackage(currentPackage: IPackage, callback?: Callback<IRemotePackage | NativeUpdateNotification>): void;
|
public queryUpdateWithCurrentPackage(
|
||||||
|
currentPackage: IPackage,
|
||||||
|
callback?: Callback<IRemotePackage | NativeUpdateNotification>
|
||||||
|
): void;
|
||||||
|
|
||||||
public reportStatusDeploy(pkg?: IPackage, status?: string, previousLabelOrAppVersion?: string, previousDeploymentKey?: string, callback?: Callback<void>): void;
|
public reportStatusDeploy(
|
||||||
|
pkg?: IPackage,
|
||||||
|
status?: string,
|
||||||
|
previousLabelOrAppVersion?: string,
|
||||||
|
previousDeploymentKey?: string,
|
||||||
|
callback?: Callback<void>
|
||||||
|
): void;
|
||||||
|
|
||||||
public reportStatusDownload(pkg: IPackage, callback?: Callback<void>): void;
|
public reportStatusDownload(pkg: IPackage, callback?: Callback<void>): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface CodePushCordovaPlugin {
|
interface CodePushCordovaPlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current package information.
|
* Get the current package information.
|
||||||
*
|
*
|
||||||
* @param packageSuccess Callback invoked with the currently deployed package information.
|
* @param packageSuccess Callback invoked with the currently deployed package information.
|
||||||
* @param packageError Optional callback invoked in case of an error.
|
* @param packageError Optional callback invoked in case of an error.
|
||||||
*/
|
*/
|
||||||
getCurrentPackage(packageSuccess: SuccessCallback<ILocalPackage>, packageError?: ErrorCallback): void;
|
getCurrentPackage(
|
||||||
|
packageSuccess: SuccessCallback<ILocalPackage>,
|
||||||
|
packageError?: ErrorCallback
|
||||||
|
): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the pending package information, if any. A pending package is one that has been installed but the application still runs the old code.
|
* Gets the pending package information, if any. A pending package is one that has been installed but the application still runs the old code.
|
||||||
* This happends only after a package has been installed using ON_NEXT_RESTART or ON_NEXT_RESUME mode, but the application was not restarted/resumed yet.
|
* This happends only after a package has been installed using ON_NEXT_RESTART or ON_NEXT_RESUME mode, but the application was not restarted/resumed yet.
|
||||||
*/
|
*/
|
||||||
getPendingPackage(packageSuccess: SuccessCallback<ILocalPackage>, packageError?: ErrorCallback): void;
|
getPendingPackage(
|
||||||
|
packageSuccess: SuccessCallback<ILocalPackage>,
|
||||||
|
packageError?: ErrorCallback
|
||||||
|
): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks with the CodePush server if an update package is available for download.
|
* Checks with the CodePush server if an update package is available for download.
|
||||||
@ -193,7 +231,11 @@ interface CodePushCordovaPlugin {
|
|||||||
* @param queryError Optional callback invoked in case of an error.
|
* @param queryError Optional callback invoked in case of an error.
|
||||||
* @param deploymentKey Optional deployment key that overrides the config.xml setting.
|
* @param deploymentKey Optional deployment key that overrides the config.xml setting.
|
||||||
*/
|
*/
|
||||||
checkForUpdate(querySuccess: SuccessCallback<IRemotePackage>, queryError?: ErrorCallback, deploymentKey?: string): void;
|
checkForUpdate(
|
||||||
|
querySuccess: SuccessCallback<IRemotePackage>,
|
||||||
|
queryError?: ErrorCallback,
|
||||||
|
deploymentKey?: string
|
||||||
|
): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notifies the plugin that the update operation succeeded and that the application is ready.
|
* Notifies the plugin that the update operation succeeded and that the application is ready.
|
||||||
@ -203,13 +245,19 @@ interface CodePushCordovaPlugin {
|
|||||||
* @param notifySucceeded Optional callback invoked if the plugin was successfully notified.
|
* @param notifySucceeded Optional callback invoked if the plugin was successfully notified.
|
||||||
* @param notifyFailed Optional callback invoked in case of an error during notifying the plugin.
|
* @param notifyFailed Optional callback invoked in case of an error during notifying the plugin.
|
||||||
*/
|
*/
|
||||||
notifyApplicationReady(notifySucceeded?: SuccessCallback<void>, notifyFailed?: ErrorCallback): void;
|
notifyApplicationReady(
|
||||||
|
notifySucceeded?: SuccessCallback<void>,
|
||||||
|
notifyFailed?: ErrorCallback
|
||||||
|
): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reloads the application. If there is a pending update package installed using ON_NEXT_RESTART or ON_NEXT_RESUME modes, the update
|
* Reloads the application. If there is a pending update package installed using ON_NEXT_RESTART or ON_NEXT_RESUME modes, the update
|
||||||
* will be immediately visible to the user. Otherwise, calling this function will simply reload the current version of the application.
|
* will be immediately visible to the user. Otherwise, calling this function will simply reload the current version of the application.
|
||||||
*/
|
*/
|
||||||
restartApplication(installSuccess: SuccessCallback<void>, errorCallback?: ErrorCallback): void;
|
restartApplication(
|
||||||
|
installSuccess: SuccessCallback<void>,
|
||||||
|
errorCallback?: ErrorCallback
|
||||||
|
): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience method for installing updates in one method call.
|
* Convenience method for installing updates in one method call.
|
||||||
@ -232,7 +280,11 @@ interface CodePushCordovaPlugin {
|
|||||||
* @param downloadProgress Optional callback invoked during the download process. It is called several times with one DownloadProgress parameter.
|
* @param downloadProgress Optional callback invoked during the download process. It is called several times with one DownloadProgress parameter.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
sync(syncCallback?: SuccessCallback<SyncStatus>, syncOptions?: SyncOptions, downloadProgress?: SuccessCallback<DownloadProgress>): void;
|
sync(
|
||||||
|
syncCallback?: SuccessCallback<SyncStatus>,
|
||||||
|
syncOptions?: SyncOptions,
|
||||||
|
downloadProgress?: SuccessCallback<DownloadProgress>
|
||||||
|
): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -445,7 +497,6 @@ export interface DownloadProgress {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class CodePush extends IonicNativePlugin {
|
export class CodePush extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current package information.
|
* Get the current package information.
|
||||||
*
|
*
|
||||||
@ -535,8 +586,10 @@ export class CodePush extends IonicNativePlugin {
|
|||||||
successIndex: 0,
|
successIndex: 0,
|
||||||
errorIndex: 3 // we don't need this, so we set it to a value higher than # of args
|
errorIndex: 3 // we don't need this, so we set it to a value higher than # of args
|
||||||
})
|
})
|
||||||
sync(syncOptions?: SyncOptions, downloadProgress?: SuccessCallback<DownloadProgress>): Observable<SyncStatus> {
|
sync(
|
||||||
|
syncOptions?: SyncOptions,
|
||||||
|
downloadProgress?: SuccessCallback<DownloadProgress>
|
||||||
|
): Observable<SyncStatus> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Couchbase Lite
|
* @name Couchbase Lite
|
||||||
@ -11,7 +10,7 @@ import { Injectable } from '@angular/core';
|
|||||||
* ```typescript
|
* ```typescript
|
||||||
* import { CouchbaseLite } from '@ionic-native/couchbase-lite';
|
* import { CouchbaseLite } from '@ionic-native/couchbase-lite';
|
||||||
* import { Http } from '@angular/http';
|
* import { Http } from '@angular/http';
|
||||||
* import { Observable } from 'rxjs/Observable'
|
* import { Observable } from 'rxjs'
|
||||||
* constructor(private couchbase: CouchbaseLite, private platform:Platform,private _http:Http) {
|
* constructor(private couchbase: CouchbaseLite, private platform:Platform,private _http:Http) {
|
||||||
* this.initMethod();
|
* this.initMethod();
|
||||||
* }
|
* }
|
||||||
@ -121,7 +120,6 @@ import { Injectable } from '@angular/core';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class CouchbaseLite extends IonicNativePlugin {
|
export class CouchbaseLite extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the database url
|
* Get the database url
|
||||||
* @return {Promise<any>} Returns a promise that resolves with the local database url
|
* @return {Promise<any>} Returns a promise that resolves with the local database url
|
||||||
@ -132,5 +130,4 @@ export class CouchbaseLite extends IonicNativePlugin {
|
|||||||
getURL(): Promise<any> {
|
getURL(): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name DB Meter
|
* @name DB Meter
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export interface DeeplinkMatch {
|
export interface DeeplinkMatch {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The route info for the matched route
|
* The route info for the matched route
|
||||||
*/
|
*/
|
||||||
@ -20,7 +19,6 @@ export interface DeeplinkMatch {
|
|||||||
* the route was matched (for example, Facebook sometimes adds extra data)
|
* the route was matched (for example, Facebook sometimes adds extra data)
|
||||||
*/
|
*/
|
||||||
$link: any;
|
$link: any;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DeeplinkOptions {
|
export interface DeeplinkOptions {
|
||||||
@ -85,13 +83,18 @@ export interface DeeplinkOptions {
|
|||||||
plugin: 'ionic-plugin-deeplinks',
|
plugin: 'ionic-plugin-deeplinks',
|
||||||
pluginRef: 'IonicDeeplink',
|
pluginRef: 'IonicDeeplink',
|
||||||
repo: 'https://github.com/ionic-team/ionic-plugin-deeplinks',
|
repo: 'https://github.com/ionic-team/ionic-plugin-deeplinks',
|
||||||
install: 'ionic cordova plugin add ionic-plugin-deeplinks --variable URL_SCHEME=myapp --variable DEEPLINK_SCHEME=https --variable DEEPLINK_HOST=example.com --variable ANDROID_PATH_PREFIX=/',
|
install:
|
||||||
installVariables: ['URL_SCHEME', 'DEEPLINK_SCHEME', 'DEEPLINK_HOST', 'ANDROID_PATH_PREFIX'],
|
'ionic cordova plugin add ionic-plugin-deeplinks --variable URL_SCHEME=myapp --variable DEEPLINK_SCHEME=https --variable DEEPLINK_HOST=example.com --variable ANDROID_PATH_PREFIX=/',
|
||||||
|
installVariables: [
|
||||||
|
'URL_SCHEME',
|
||||||
|
'DEEPLINK_SCHEME',
|
||||||
|
'DEEPLINK_HOST',
|
||||||
|
'ANDROID_PATH_PREFIX'
|
||||||
|
],
|
||||||
platforms: ['Android', 'Browser', 'iOS']
|
platforms: ['Android', 'Browser', 'iOS']
|
||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Deeplinks extends IonicNativePlugin {
|
export class Deeplinks extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define a set of paths to match against incoming deeplinks.
|
* Define a set of paths to match against incoming deeplinks.
|
||||||
*
|
*
|
||||||
@ -134,8 +137,11 @@ export class Deeplinks extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
routeWithNavController(navController: any, paths: any, options?: DeeplinkOptions): Observable<DeeplinkMatch> {
|
routeWithNavController(
|
||||||
|
navController: any,
|
||||||
|
paths: any,
|
||||||
|
options?: DeeplinkOptions
|
||||||
|
): Observable<DeeplinkMatch> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export interface DeviceMotionAccelerationData {
|
export interface DeviceMotionAccelerationData {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Amount of acceleration on the x-axis. (in m/s^2)
|
* Amount of acceleration on the x-axis. (in m/s^2)
|
||||||
*/
|
*/
|
||||||
@ -23,16 +22,13 @@ export interface DeviceMotionAccelerationData {
|
|||||||
* Creation timestamp in milliseconds.
|
* Creation timestamp in milliseconds.
|
||||||
*/
|
*/
|
||||||
timestamp: any;
|
timestamp: any;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DeviceMotionAccelerometerOptions {
|
export interface DeviceMotionAccelerometerOptions {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Requested period of calls to accelerometerSuccess with acceleration data in Milliseconds. Default: 10000
|
* Requested period of calls to accelerometerSuccess with acceleration data in Milliseconds. Default: 10000
|
||||||
*/
|
*/
|
||||||
frequency?: number;
|
frequency?: number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -72,11 +68,20 @@ export interface DeviceMotionAccelerometerOptions {
|
|||||||
plugin: 'cordova-plugin-device-motion',
|
plugin: 'cordova-plugin-device-motion',
|
||||||
pluginRef: 'navigator.accelerometer',
|
pluginRef: 'navigator.accelerometer',
|
||||||
repo: 'https://github.com/apache/cordova-plugin-device-motion',
|
repo: 'https://github.com/apache/cordova-plugin-device-motion',
|
||||||
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone 8']
|
platforms: [
|
||||||
|
'Android',
|
||||||
|
'BlackBerry 10',
|
||||||
|
'Browser',
|
||||||
|
'Firefox OS',
|
||||||
|
'iOS',
|
||||||
|
'Tizen',
|
||||||
|
'Ubuntu',
|
||||||
|
'Windows',
|
||||||
|
'Windows Phone 8'
|
||||||
|
]
|
||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class DeviceMotion extends IonicNativePlugin {
|
export class DeviceMotion extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current acceleration along the x, y, and z axes.
|
* Get the current acceleration along the x, y, and z axes.
|
||||||
* @returns {Promise<DeviceMotionAccelerationData>} Returns object with x, y, z, and timestamp properties
|
* @returns {Promise<DeviceMotionAccelerationData>} Returns object with x, y, z, and timestamp properties
|
||||||
@ -96,8 +101,9 @@ export class DeviceMotion extends IonicNativePlugin {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'clearWatch'
|
clearFunction: 'clearWatch'
|
||||||
})
|
})
|
||||||
watchAcceleration(options?: DeviceMotionAccelerometerOptions): Observable<DeviceMotionAccelerationData> {
|
watchAcceleration(
|
||||||
|
options?: DeviceMotionAccelerometerOptions
|
||||||
|
): Observable<DeviceMotionAccelerationData> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export interface DeviceOrientationCompassHeading {
|
export interface DeviceOrientationCompassHeading {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The heading in degrees from 0-359.99 at a single moment in time. (Number)
|
* The heading in degrees from 0-359.99 at a single moment in time. (Number)
|
||||||
*/
|
*/
|
||||||
@ -23,11 +22,9 @@ export interface DeviceOrientationCompassHeading {
|
|||||||
* The time at which this heading was determined. (DOMTimeStamp)
|
* The time at which this heading was determined. (DOMTimeStamp)
|
||||||
*/
|
*/
|
||||||
timestamp: number;
|
timestamp: number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DeviceOrientationCompassOptions {
|
export interface DeviceOrientationCompassOptions {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* How often to retrieve the compass heading in milliseconds. (Number) (Default: 100)
|
* How often to retrieve the compass heading in milliseconds. (Number) (Default: 100)
|
||||||
*/
|
*/
|
||||||
@ -37,7 +34,6 @@ export interface DeviceOrientationCompassOptions {
|
|||||||
* The change in degrees required to initiate a watchHeading success callback. When this value is set, frequency is ignored. (Number)
|
* The change in degrees required to initiate a watchHeading success callback. When this value is set, frequency is ignored. (Number)
|
||||||
*/
|
*/
|
||||||
filter?: number;
|
filter?: number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -77,11 +73,21 @@ export interface DeviceOrientationCompassOptions {
|
|||||||
plugin: 'cordova-plugin-device-orientation',
|
plugin: 'cordova-plugin-device-orientation',
|
||||||
pluginRef: 'navigator.compass',
|
pluginRef: 'navigator.compass',
|
||||||
repo: 'https://github.com/apache/cordova-plugin-device-orientation',
|
repo: 'https://github.com/apache/cordova-plugin-device-orientation',
|
||||||
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
|
platforms: [
|
||||||
|
'Amazon Fire OS',
|
||||||
|
'Android',
|
||||||
|
'BlackBerry 10',
|
||||||
|
'Browser',
|
||||||
|
'Firefox OS',
|
||||||
|
'iOS',
|
||||||
|
'Tizen',
|
||||||
|
'Ubuntu',
|
||||||
|
'Windows',
|
||||||
|
'Windows Phone'
|
||||||
|
]
|
||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class DeviceOrientation extends IonicNativePlugin {
|
export class DeviceOrientation extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current compass heading.
|
* Get the current compass heading.
|
||||||
* @returns {Promise<DeviceOrientationCompassHeading>}
|
* @returns {Promise<DeviceOrientationCompassHeading>}
|
||||||
@ -103,8 +109,9 @@ export class DeviceOrientation extends IonicNativePlugin {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'clearWatch'
|
clearFunction: 'clearWatch'
|
||||||
})
|
})
|
||||||
watchHeading(options?: DeviceOrientationCompassOptions): Observable<DeviceOrientationCompassHeading> {
|
watchHeading(
|
||||||
|
options?: DeviceOrientationCompassOptions
|
||||||
|
): Observable<DeviceOrientationCompassHeading> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export interface EstimoteBeaconRegion {
|
export interface EstimoteBeaconRegion {
|
||||||
|
|
||||||
state?: string;
|
state?: string;
|
||||||
|
|
||||||
major: number;
|
major: number;
|
||||||
@ -13,7 +12,6 @@ export interface EstimoteBeaconRegion {
|
|||||||
identifier?: string;
|
identifier?: string;
|
||||||
|
|
||||||
uuid: string;
|
uuid: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -48,7 +46,6 @@ export interface EstimoteBeaconRegion {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class EstimoteBeacons extends IonicNativePlugin {
|
export class EstimoteBeacons extends IonicNativePlugin {
|
||||||
|
|
||||||
/** Proximity value */
|
/** Proximity value */
|
||||||
ProximityUnknown = 0;
|
ProximityUnknown = 0;
|
||||||
|
|
||||||
@ -192,7 +189,12 @@ export class EstimoteBeacons extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
clearFunction: 'stopAdvertisingAsBeacon'
|
clearFunction: 'stopAdvertisingAsBeacon'
|
||||||
})
|
})
|
||||||
startAdvertisingAsBeacon(uuid: string, major: number, minor: number, regionId: string): Promise<any> {
|
startAdvertisingAsBeacon(
|
||||||
|
uuid: string,
|
||||||
|
major: number,
|
||||||
|
minor: number,
|
||||||
|
regionId: string
|
||||||
|
): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -382,7 +384,9 @@ export class EstimoteBeacons extends IonicNativePlugin {
|
|||||||
clearFunction: 'stopRangingSecureBeaconsInRegion',
|
clearFunction: 'stopRangingSecureBeaconsInRegion',
|
||||||
clearWithArgs: true
|
clearWithArgs: true
|
||||||
})
|
})
|
||||||
startRangingSecureBeaconsInRegion(region: EstimoteBeaconRegion): Observable<any> {
|
startRangingSecureBeaconsInRegion(
|
||||||
|
region: EstimoteBeaconRegion
|
||||||
|
): Observable<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -421,7 +425,10 @@ export class EstimoteBeacons extends IonicNativePlugin {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
startMonitoringForRegion(region: EstimoteBeaconRegion, notifyEntryStateOnDisplay: boolean): Observable<any> {
|
startMonitoringForRegion(
|
||||||
|
region: EstimoteBeaconRegion,
|
||||||
|
notifyEntryStateOnDisplay: boolean
|
||||||
|
): Observable<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -459,7 +466,10 @@ export class EstimoteBeacons extends IonicNativePlugin {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
startSecureMonitoringForRegion(region: EstimoteBeaconRegion, notifyEntryStateOnDisplay: boolean): Observable<any> {
|
startSecureMonitoringForRegion(
|
||||||
|
region: EstimoteBeaconRegion,
|
||||||
|
notifyEntryStateOnDisplay: boolean
|
||||||
|
): Observable<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -558,5 +568,4 @@ export class EstimoteBeacons extends IonicNativePlugin {
|
|||||||
writeConnectedMinor(minor: number): Promise<any> {
|
writeConnectedMinor(minor: number): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export interface NotificationData {
|
export interface NotificationData {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines whether the notification was pressed or not
|
* Determines whether the notification was pressed or not
|
||||||
*/
|
*/
|
||||||
@ -15,7 +14,6 @@ export interface NotificationData {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
[name: string]: any;
|
[name: string]: any;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -64,7 +62,6 @@ export interface NotificationData {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class FCM extends IonicNativePlugin {
|
export class FCM extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get's device's current registration id
|
* Get's device's current registration id
|
||||||
*
|
*
|
||||||
@ -124,5 +121,4 @@ export class FCM extends IonicNativePlugin {
|
|||||||
onNotification(): Observable<NotificationData> {
|
onNotification(): Observable<NotificationData> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export interface IDynamicLink {
|
export interface IDynamicLink {
|
||||||
matchType: 'Weak' | 'Strong';
|
matchType: 'Weak' | 'Strong';
|
||||||
@ -52,21 +52,22 @@ export interface IDynamicLink {
|
|||||||
plugin: ' cordova-plugin-firebase-dynamiclinks',
|
plugin: ' cordova-plugin-firebase-dynamiclinks',
|
||||||
pluginRef: 'cordova.plugins.firebase.dynamiclinks',
|
pluginRef: 'cordova.plugins.firebase.dynamiclinks',
|
||||||
repo: 'https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks',
|
repo: 'https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks',
|
||||||
install: 'ionic cordova plugin add cordova-plugin-firebase-dynamiclinks --save --variable APP_DOMAIN="example.com" --variable APP_PATH="/"',
|
install:
|
||||||
|
'ionic cordova plugin add cordova-plugin-firebase-dynamiclinks --save --variable APP_DOMAIN="example.com" --variable APP_PATH="/"',
|
||||||
installVariables: ['APP_DOMAIN', 'APP_PATH'],
|
installVariables: ['APP_DOMAIN', 'APP_PATH'],
|
||||||
platforms: ['Android', 'iOS']
|
platforms: ['Android', 'iOS']
|
||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class FirebaseDynamicLinks extends IonicNativePlugin {
|
export class FirebaseDynamicLinks extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers callback that is triggered on each dynamic link click.
|
* Registers callback that is triggered on each dynamic link click.
|
||||||
* @return {Observable<IDynamicLink>} Returns an observable
|
* @return {Observable<IDynamicLink>} Returns an observable
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse',
|
callbackOrder: 'reverse',
|
||||||
observable: true,
|
observable: true
|
||||||
})
|
})
|
||||||
onDynamicLink(): Observable<IDynamicLink> { return; }
|
onDynamicLink(): Observable<IDynamicLink> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @beta
|
* @beta
|
||||||
@ -30,7 +30,7 @@ import { Observable } from 'rxjs/Observable';
|
|||||||
plugin: 'cordova-plugin-firebase',
|
plugin: 'cordova-plugin-firebase',
|
||||||
pluginRef: 'FirebasePlugin',
|
pluginRef: 'FirebasePlugin',
|
||||||
repo: 'https://github.com/arnesson/cordova-plugin-firebase',
|
repo: 'https://github.com/arnesson/cordova-plugin-firebase',
|
||||||
platforms: ['Android', 'iOS'],
|
platforms: ['Android', 'iOS']
|
||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Firebase extends IonicNativePlugin {
|
export class Firebase extends IonicNativePlugin {
|
||||||
@ -293,7 +293,10 @@ export class Firebase extends IonicNativePlugin {
|
|||||||
successIndex: 2,
|
successIndex: 2,
|
||||||
errorIndex: 3
|
errorIndex: 3
|
||||||
})
|
})
|
||||||
verifyPhoneNumber(phoneNumber: string, timeoutDuration: number): Promise<any> {
|
verifyPhoneNumber(
|
||||||
|
phoneNumber: string,
|
||||||
|
timeoutDuration: number
|
||||||
|
): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, CordovaFunctionOverride, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import {
|
||||||
import { Observable } from 'rxjs/Observable';
|
Cordova,
|
||||||
|
CordovaFunctionOverride,
|
||||||
|
IonicNativePlugin,
|
||||||
|
Plugin
|
||||||
|
} from '@ionic-native/core';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
declare const window: any;
|
declare const window: any;
|
||||||
|
|
||||||
@ -84,7 +89,6 @@ declare const window: any;
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Geofence extends IonicNativePlugin {
|
export class Geofence extends IonicNativePlugin {
|
||||||
|
|
||||||
TransitionType = {
|
TransitionType = {
|
||||||
ENTER: 1,
|
ENTER: 1,
|
||||||
EXIT: 2,
|
EXIT: 2,
|
||||||
@ -157,13 +161,11 @@ export class Geofence extends IonicNativePlugin {
|
|||||||
* @returns {Observable<any>}
|
* @returns {Observable<any>}
|
||||||
*/
|
*/
|
||||||
onNotificationClicked(): Observable<any> {
|
onNotificationClicked(): Observable<any> {
|
||||||
|
return new Observable<any>(observer => {
|
||||||
return new Observable<any>((observer) => {
|
window &&
|
||||||
window && window.geofence && (window.geofence.onNotificationClicked = observer.next.bind(observer));
|
window.geofence &&
|
||||||
return () => window.geofence.onNotificationClicked = () => {
|
(window.geofence.onNotificationClicked = observer.next.bind(observer));
|
||||||
};
|
return () => (window.geofence.onNotificationClicked = () => {});
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
declare const navigator: any;
|
declare const navigator: any;
|
||||||
|
|
||||||
export interface Coordinates {
|
export interface Coordinates {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* a double representing the position's latitude in decimal degrees.
|
* a double representing the position's latitude in decimal degrees.
|
||||||
*/
|
*/
|
||||||
@ -49,7 +48,6 @@ export interface Coordinates {
|
|||||||
* This value can be null.
|
* This value can be null.
|
||||||
*/
|
*/
|
||||||
speed: number;
|
speed: number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Geoposition {
|
export interface Geoposition {
|
||||||
@ -65,7 +63,6 @@ export interface Geoposition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface PositionError {
|
export interface PositionError {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A code that indicates the error that occurred
|
* A code that indicates the error that occurred
|
||||||
*/
|
*/
|
||||||
@ -75,11 +72,9 @@ export interface PositionError {
|
|||||||
* A message that can describe the error that occurred
|
* A message that can describe the error that occurred
|
||||||
*/
|
*/
|
||||||
message: string;
|
message: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GeolocationOptions {
|
export interface GeolocationOptions {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is a positive long value indicating the maximum age in milliseconds of a
|
* Is a positive long value indicating the maximum age in milliseconds of a
|
||||||
* possible cached position that is acceptable to return. If set to 0, it
|
* possible cached position that is acceptable to return. If set to 0, it
|
||||||
@ -107,7 +102,6 @@ export interface GeolocationOptions {
|
|||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
*/
|
*/
|
||||||
enableHighAccuracy?: boolean;
|
enableHighAccuracy?: boolean;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -161,13 +155,13 @@ export interface GeolocationOptions {
|
|||||||
plugin: 'cordova-plugin-geolocation',
|
plugin: 'cordova-plugin-geolocation',
|
||||||
pluginRef: 'navigator.geolocation',
|
pluginRef: 'navigator.geolocation',
|
||||||
repo: 'https://github.com/apache/cordova-plugin-geolocation',
|
repo: 'https://github.com/apache/cordova-plugin-geolocation',
|
||||||
install: 'ionic cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION="To locate you"',
|
install:
|
||||||
|
'ionic cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION="To locate you"',
|
||||||
installVariables: ['GEOLOCATION_USAGE_DESCRIPTION'],
|
installVariables: ['GEOLOCATION_USAGE_DESCRIPTION'],
|
||||||
platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows']
|
platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows']
|
||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Geolocation extends IonicNativePlugin {
|
export class Geolocation extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the device's current position.
|
* Get the device's current position.
|
||||||
*
|
*
|
||||||
@ -200,12 +194,13 @@ export class Geolocation extends IonicNativePlugin {
|
|||||||
* @returns {Observable<Geoposition>} Returns an Observable that notifies with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or errors.
|
* @returns {Observable<Geoposition>} Returns an Observable that notifies with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or errors.
|
||||||
*/
|
*/
|
||||||
watchPosition(options?: GeolocationOptions): Observable<Geoposition> {
|
watchPosition(options?: GeolocationOptions): Observable<Geoposition> {
|
||||||
return new Observable<Geoposition>(
|
return new Observable<Geoposition>((observer: any) => {
|
||||||
(observer: any) => {
|
const watchId = navigator.geolocation.watchPosition(
|
||||||
const watchId = navigator.geolocation.watchPosition(observer.next.bind(observer), observer.next.bind(observer), options);
|
observer.next.bind(observer),
|
||||||
return () => navigator.geolocation.clearWatch(watchId);
|
observer.next.bind(observer),
|
||||||
}
|
options
|
||||||
);
|
);
|
||||||
|
return () => navigator.geolocation.clearWatch(watchId);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
declare const navigator: any;
|
declare const navigator: any;
|
||||||
@ -82,19 +82,20 @@ export interface GyroscopeOptions {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Gyroscope extends IonicNativePlugin {
|
export class Gyroscope extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Watching for gyroscope sensor changes
|
* Watching for gyroscope sensor changes
|
||||||
* @param {GyroscopeOptions} [options]
|
* @param {GyroscopeOptions} [options]
|
||||||
* @return {Observable<GyroscopeOrientation>} Returns an Observable that resolves GyroscopeOrientation
|
* @return {Observable<GyroscopeOrientation>} Returns an Observable that resolves GyroscopeOrientation
|
||||||
*/
|
*/
|
||||||
watch(options?: GyroscopeOptions): Observable<GyroscopeOrientation> {
|
watch(options?: GyroscopeOptions): Observable<GyroscopeOrientation> {
|
||||||
return new Observable<GyroscopeOrientation>(
|
return new Observable<GyroscopeOrientation>((observer: any) => {
|
||||||
(observer: any) => {
|
const watchId = navigator.gyroscope.watch(
|
||||||
const watchId = navigator.gyroscope.watch(observer.next.bind(observer), observer.next.bind(observer), options);
|
observer.next.bind(observer),
|
||||||
return () => navigator.gyroscope.clearWatch(watchId);
|
observer.next.bind(observer),
|
||||||
}
|
options
|
||||||
);
|
);
|
||||||
|
return () => navigator.gyroscope.clearWatch(watchId);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, Plugin, IonicNativePlugin, CordovaCheck } from '@ionic-native/core';
|
import {
|
||||||
import { Observable } from 'rxjs/Observable';
|
Cordova,
|
||||||
|
Plugin,
|
||||||
|
IonicNativePlugin,
|
||||||
|
CordovaCheck
|
||||||
|
} from '@ionic-native/core';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
declare var chcp: any;
|
declare var chcp: any;
|
||||||
|
|
||||||
@ -46,7 +51,7 @@ export interface HotCodePushRequestOptions {
|
|||||||
/**
|
/**
|
||||||
* Additional HTTP headers, that will be added to all requests in update download process, including loading configs and new/changed files.
|
* Additional HTTP headers, that will be added to all requests in update download process, including loading configs and new/changed files.
|
||||||
*/
|
*/
|
||||||
'request-headers'?: {[key: string]: any};
|
'request-headers'?: { [key: string]: any };
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -121,7 +126,9 @@ export class HotCodePush extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>} Resolves when the user is redirected to the store, rejects if the user declines.
|
* @returns {Promise<any>} Resolves when the user is redirected to the store, rejects if the user declines.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
requestApplicationUpdate(message: string): Promise<any> { return; }
|
requestApplicationUpdate(message: string): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Download updates from the server-side.
|
* Download updates from the server-side.
|
||||||
@ -131,13 +138,16 @@ export class HotCodePush extends IonicNativePlugin {
|
|||||||
@CordovaCheck()
|
@CordovaCheck()
|
||||||
fetchUpdate(options?: HotCodePushRequestOptions): Promise<any> {
|
fetchUpdate(options?: HotCodePushRequestOptions): Promise<any> {
|
||||||
return new Promise<any>((resolve, reject) => {
|
return new Promise<any>((resolve, reject) => {
|
||||||
HotCodePush.getPlugin().fetchUpdate((error: HotCodePushError, data: any) => {
|
HotCodePush.getPlugin().fetchUpdate(
|
||||||
if (error) {
|
(error: HotCodePushError, data: any) => {
|
||||||
reject(error);
|
if (error) {
|
||||||
} else {
|
reject(error);
|
||||||
resolve(data);
|
} else {
|
||||||
}
|
resolve(data);
|
||||||
}, options);
|
}
|
||||||
|
},
|
||||||
|
options
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,7 +158,9 @@ export class HotCodePush extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackStyle: 'node'
|
callbackStyle: 'node'
|
||||||
})
|
})
|
||||||
installUpdate(): Promise<any> { return; }
|
installUpdate(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if update was loaded and ready to be installed.
|
* Check if update was loaded and ready to be installed.
|
||||||
@ -157,7 +169,9 @@ export class HotCodePush extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackStyle: 'node'
|
callbackStyle: 'node'
|
||||||
})
|
})
|
||||||
isUpdateAvailableForInstallation(): Promise<HotCodePushUpdate> { return; }
|
isUpdateAvailableForInstallation(): Promise<HotCodePushUpdate> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets information about the app's versions.
|
* Gets information about the app's versions.
|
||||||
@ -166,7 +180,9 @@ export class HotCodePush extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackStyle: 'node'
|
callbackStyle: 'node'
|
||||||
})
|
})
|
||||||
getVersionInfo(): Promise<HotCodePushVersion> { return; }
|
getVersionInfo(): Promise<HotCodePushVersion> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event sent when new release was successfully loaded and ready to be installed.
|
* Event sent when new release was successfully loaded and ready to be installed.
|
||||||
@ -176,7 +192,9 @@ export class HotCodePush extends IonicNativePlugin {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'chcp_updateIsReadyToInstall'
|
event: 'chcp_updateIsReadyToInstall'
|
||||||
})
|
})
|
||||||
onUpdateIsReadyToInstall(): Observable<HotCodePushEventData> { return; }
|
onUpdateIsReadyToInstall(): Observable<HotCodePushEventData> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event sent when plugin couldn't load update from the server. Error details are attached to the event.
|
* Event sent when plugin couldn't load update from the server. Error details are attached to the event.
|
||||||
@ -186,7 +204,9 @@ export class HotCodePush extends IonicNativePlugin {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'chcp_updateLoadFailed'
|
event: 'chcp_updateLoadFailed'
|
||||||
})
|
})
|
||||||
onUpdateLoadFailed(): Observable<HotCodePushEventData> { return; }
|
onUpdateLoadFailed(): Observable<HotCodePushEventData> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event sent when we successfully loaded application config from the server, but there is nothing new is available.
|
* Event sent when we successfully loaded application config from the server, but there is nothing new is available.
|
||||||
@ -196,7 +216,9 @@ export class HotCodePush extends IonicNativePlugin {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'chcp_nothingToUpdate'
|
event: 'chcp_nothingToUpdate'
|
||||||
})
|
})
|
||||||
onNothingToUpdate(): Observable<HotCodePushEventData> { return; }
|
onNothingToUpdate(): Observable<HotCodePushEventData> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event sent when an update is about to be installed.
|
* Event sent when an update is about to be installed.
|
||||||
@ -206,7 +228,9 @@ export class HotCodePush extends IonicNativePlugin {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'chcp_beforeInstall'
|
event: 'chcp_beforeInstall'
|
||||||
})
|
})
|
||||||
onBeforeInstall(): Observable<HotCodePushEventData> { return; }
|
onBeforeInstall(): Observable<HotCodePushEventData> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event sent when update was successfully installed.
|
* Event sent when update was successfully installed.
|
||||||
@ -216,7 +240,9 @@ export class HotCodePush extends IonicNativePlugin {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'chcp_updateInstalled'
|
event: 'chcp_updateInstalled'
|
||||||
})
|
})
|
||||||
onUpdateInstalled(): Observable<HotCodePushEventData> { return; }
|
onUpdateInstalled(): Observable<HotCodePushEventData> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event sent when update installation failed. Error details are attached to the event.
|
* Event sent when update installation failed. Error details are attached to the event.
|
||||||
@ -226,7 +252,9 @@ export class HotCodePush extends IonicNativePlugin {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'chcp_updateInstallFailed'
|
event: 'chcp_updateInstallFailed'
|
||||||
})
|
})
|
||||||
onUpdateInstallFailed(): Observable<HotCodePushEventData> { return; }
|
onUpdateInstallFailed(): Observable<HotCodePushEventData> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event sent when there is nothing to install. Probably, nothing was loaded before that.
|
* Event sent when there is nothing to install. Probably, nothing was loaded before that.
|
||||||
@ -236,7 +264,9 @@ export class HotCodePush extends IonicNativePlugin {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'chcp_nothingToInstall'
|
event: 'chcp_nothingToInstall'
|
||||||
})
|
})
|
||||||
onNothingToInstall(): Observable<HotCodePushEventData> { return; }
|
onNothingToInstall(): Observable<HotCodePushEventData> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event sent when plugin is about to start installing bundle content on the external storage.
|
* Event sent when plugin is about to start installing bundle content on the external storage.
|
||||||
@ -246,7 +276,9 @@ export class HotCodePush extends IonicNativePlugin {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'chcp_beforeAssetsInstalledOnExternalStorage'
|
event: 'chcp_beforeAssetsInstalledOnExternalStorage'
|
||||||
})
|
})
|
||||||
onBeforeAssetsInstalledOnExternalStorage(): Observable<HotCodePushEventData> { return; }
|
onBeforeAssetsInstalledOnExternalStorage(): Observable<HotCodePushEventData> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event sent when plugin successfully copied web project files from bundle on the external storage. Most likely you will use it for debug purpose only. Or even never.
|
* Event sent when plugin successfully copied web project files from bundle on the external storage. Most likely you will use it for debug purpose only. Or even never.
|
||||||
@ -256,7 +288,9 @@ export class HotCodePush extends IonicNativePlugin {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'chcp_assetsInstalledOnExternalStorage'
|
event: 'chcp_assetsInstalledOnExternalStorage'
|
||||||
})
|
})
|
||||||
onAssetsInstalledOnExternalStorage(): Observable<HotCodePushEventData> { return; }
|
onAssetsInstalledOnExternalStorage(): Observable<HotCodePushEventData> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event sent when plugin couldn't copy files from bundle on the external storage. If this happens - plugin won't work. Can occur when there is not enough free space on the device.
|
* Event sent when plugin couldn't copy files from bundle on the external storage. If this happens - plugin won't work. Can occur when there is not enough free space on the device.
|
||||||
@ -266,5 +300,7 @@ export class HotCodePush extends IonicNativePlugin {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'chcp_assetsInstallationError'
|
event: 'chcp_assetsInstallationError'
|
||||||
})
|
})
|
||||||
onAssetsInstallationError(): Observable<HotCodePushEventData> { return; }
|
onAssetsInstallationError(): Observable<HotCodePushEventData> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export interface HttpdOptions {
|
export interface HttpdOptions {
|
||||||
/**
|
/**
|
||||||
@ -56,7 +56,6 @@ export interface HttpdOptions {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Httpd extends IonicNativePlugin {
|
export class Httpd extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts a web server.
|
* Starts a web server.
|
||||||
* @param options {HttpdOptions}
|
* @param options {HttpdOptions}
|
||||||
@ -87,5 +86,4 @@ export class Httpd extends IonicNativePlugin {
|
|||||||
getLocalPath(): Promise<string> {
|
getLocalPath(): Promise<string> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ import {
|
|||||||
IonicNativePlugin,
|
IonicNativePlugin,
|
||||||
Plugin
|
Plugin
|
||||||
} from '@ionic-native/core';
|
} from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
declare const cordova: any;
|
declare const cordova: any;
|
||||||
|
|
||||||
|
@ -5,8 +5,7 @@ import {
|
|||||||
IonicNativePlugin,
|
IonicNativePlugin,
|
||||||
Plugin
|
Plugin
|
||||||
} from '@ionic-native/core';
|
} from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable, Observer } from 'rxjs';
|
||||||
import { Observer } from 'rxjs/Observer';
|
|
||||||
|
|
||||||
declare const cordova: Cordova & { InAppBrowser: any };
|
declare const cordova: Cordova & { InAppBrowser: any };
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import {
|
|||||||
IonicNativePlugin,
|
IonicNativePlugin,
|
||||||
Plugin
|
Plugin
|
||||||
} from '@ionic-native/core';
|
} from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
declare const cordova: any;
|
declare const cordova: any;
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Keyboard
|
* @name Keyboard
|
||||||
@ -29,14 +28,12 @@ import { Observable } from 'rxjs/Observable';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Keyboard extends IonicNativePlugin {
|
export class Keyboard extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hide the keyboard accessory bar with the next, previous and done buttons.
|
* Hide the keyboard accessory bar with the next, previous and done buttons.
|
||||||
* @param hide {boolean}
|
* @param hide {boolean}
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
hideKeyboardAccessoryBar(hide: boolean): void {
|
hideKeyboardAccessoryBar(hide: boolean): void {}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Force keyboard to be shown.
|
* Force keyboard to be shown.
|
||||||
@ -45,8 +42,7 @@ export class Keyboard extends IonicNativePlugin {
|
|||||||
sync: true,
|
sync: true,
|
||||||
platforms: ['Android', 'BlackBerry 10', 'Windows']
|
platforms: ['Android', 'BlackBerry 10', 'Windows']
|
||||||
})
|
})
|
||||||
show(): void {
|
show(): void {}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close the keyboard if open.
|
* Close the keyboard if open.
|
||||||
@ -55,8 +51,7 @@ export class Keyboard extends IonicNativePlugin {
|
|||||||
sync: true,
|
sync: true,
|
||||||
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
||||||
})
|
})
|
||||||
close(): void {
|
close(): void {}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prevents the native UIScrollView from moving when an input is focused.
|
* Prevents the native UIScrollView from moving when an input is focused.
|
||||||
@ -66,8 +61,7 @@ export class Keyboard extends IonicNativePlugin {
|
|||||||
sync: true,
|
sync: true,
|
||||||
platforms: ['iOS', 'Windows']
|
platforms: ['iOS', 'Windows']
|
||||||
})
|
})
|
||||||
disableScroll(disable: boolean): void {
|
disableScroll(disable: boolean): void {}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an observable that notifies you when the keyboard is shown. Unsubscribe to observable to cancel event watch.
|
* Creates an observable that notifies you when the keyboard is shown. Unsubscribe to observable to cancel event watch.
|
||||||
@ -94,5 +88,4 @@ export class Keyboard extends IonicNativePlugin {
|
|||||||
onKeyboardHide(): Observable<any> {
|
onKeyboardHide(): Observable<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export enum ELocalNotificationTriggerUnit {
|
export enum ELocalNotificationTriggerUnit {
|
||||||
SECOND = 'second',
|
SECOND = 'second',
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import {
|
||||||
import { Observable } from 'rxjs/Observable';
|
Cordova,
|
||||||
|
CordovaProperty,
|
||||||
|
IonicNativePlugin,
|
||||||
|
Plugin
|
||||||
|
} from '@ionic-native/core';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
declare const navigator: any;
|
declare const navigator: any;
|
||||||
|
|
||||||
@ -33,7 +38,10 @@ export interface MediaFile {
|
|||||||
* @param {Function} successCallback
|
* @param {Function} successCallback
|
||||||
* @param {Function} errorCallback
|
* @param {Function} errorCallback
|
||||||
*/
|
*/
|
||||||
getFormatData(successCallback: (data: MediaFileData) => any, errorCallback?: (err: any) => any): void;
|
getFormatData(
|
||||||
|
successCallback: (data: MediaFileData) => any,
|
||||||
|
errorCallback?: (err: any) => any
|
||||||
|
): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MediaFileData {
|
export interface MediaFileData {
|
||||||
@ -155,22 +163,19 @@ export class MediaCapture extends IonicNativePlugin {
|
|||||||
* The recording image sizes and formats supported by the device.
|
* The recording image sizes and formats supported by the device.
|
||||||
* @returns {ConfigurationData[]}
|
* @returns {ConfigurationData[]}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty()
|
@CordovaProperty() supportedImageModes: ConfigurationData[];
|
||||||
supportedImageModes: ConfigurationData[];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The audio recording formats supported by the device.
|
* The audio recording formats supported by the device.
|
||||||
* @returns {ConfigurationData[]}
|
* @returns {ConfigurationData[]}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty()
|
@CordovaProperty() supportedAudioModes: ConfigurationData[];
|
||||||
supportedAudioModes: ConfigurationData[];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The recording video resolutions and formats supported by the device.
|
* The recording video resolutions and formats supported by the device.
|
||||||
* @returns {ConfigurationData[]}
|
* @returns {ConfigurationData[]}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty()
|
@CordovaProperty() supportedVideoModes: ConfigurationData[];
|
||||||
supportedVideoModes: ConfigurationData[];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start the audio recorder application and return information about captured audio clip files.
|
* Start the audio recorder application and return information about captured audio clip files.
|
||||||
@ -180,7 +185,9 @@ export class MediaCapture extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
captureAudio(options?: CaptureAudioOptions): Promise<MediaFile[] | CaptureError> {
|
captureAudio(
|
||||||
|
options?: CaptureAudioOptions
|
||||||
|
): Promise<MediaFile[] | CaptureError> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,7 +199,9 @@ export class MediaCapture extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
captureImage(options?: CaptureImageOptions): Promise<MediaFile[] | CaptureError> {
|
captureImage(
|
||||||
|
options?: CaptureImageOptions
|
||||||
|
): Promise<MediaFile[] | CaptureError> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,7 +213,9 @@ export class MediaCapture extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
captureVideo(options?: CaptureVideoOptions): Promise<MediaFile[] | CaptureError> {
|
captureVideo(
|
||||||
|
options?: CaptureVideoOptions
|
||||||
|
): Promise<MediaFile[] | CaptureError> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -231,5 +242,4 @@ export class MediaCapture extends IonicNativePlugin {
|
|||||||
onPendingCaptureError(): Observable<CaptureError> {
|
onPendingCaptureError(): Observable<CaptureError> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,7 @@ import {
|
|||||||
IonicNativePlugin,
|
IonicNativePlugin,
|
||||||
Plugin
|
Plugin
|
||||||
} from '@ionic-native/core';
|
} from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable, Observer } from 'rxjs';
|
||||||
import { Observer } from 'rxjs/Observer';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export interface MusicControlsOptions {
|
export interface MusicControlsOptions {
|
||||||
track?: string;
|
track?: string;
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, CordovaCheck, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import {
|
||||||
import { Observable } from 'rxjs/Observable';
|
Cordova,
|
||||||
import 'rxjs/add/observable/merge';
|
CordovaCheck,
|
||||||
|
CordovaProperty,
|
||||||
|
IonicNativePlugin,
|
||||||
|
Plugin
|
||||||
|
} from '@ionic-native/core';
|
||||||
|
import { merge, Observable } from 'rxjs';
|
||||||
|
|
||||||
declare const navigator: any;
|
declare const navigator: any;
|
||||||
|
|
||||||
@ -57,20 +61,17 @@ declare const navigator: any;
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Network extends IonicNativePlugin {
|
export class Network extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connection type
|
* Connection type
|
||||||
* @return {string}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty()
|
@CordovaProperty() type: string;
|
||||||
type: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Downlink Max Speed
|
* Downlink Max Speed
|
||||||
* @return {string}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty()
|
@CordovaProperty() downlinkMax: string;
|
||||||
downlinkMax: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an observable to watch connection changes
|
* Returns an observable to watch connection changes
|
||||||
@ -78,7 +79,7 @@ export class Network extends IonicNativePlugin {
|
|||||||
*/
|
*/
|
||||||
@CordovaCheck()
|
@CordovaCheck()
|
||||||
onchange(): Observable<any> {
|
onchange(): Observable<any> {
|
||||||
return Observable.merge(this.onConnect(), this.onDisconnect());
|
return merge(this.onConnect(), this.onDisconnect());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -104,5 +105,4 @@ export class Network extends IonicNativePlugin {
|
|||||||
onConnect(): Observable<any> {
|
onConnect(): Observable<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ import {
|
|||||||
IonicNativePlugin,
|
IonicNativePlugin,
|
||||||
Plugin
|
Plugin
|
||||||
} from '@ionic-native/core';
|
} from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
declare let window: any;
|
declare let window: any;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export interface OSNotification {
|
export interface OSNotification {
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -43,7 +43,6 @@ export interface IPedometerData {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Pedometer extends IonicNativePlugin {
|
export class Pedometer extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if step counting is available. Only works on iOS.
|
* Checks if step counting is available. Only works on iOS.
|
||||||
* @return {Promise<boolean>} Returns a promise that resolves when feature is supported (true) or not supported (false)
|
* @return {Promise<boolean>} Returns a promise that resolves when feature is supported (true) or not supported (false)
|
||||||
@ -110,8 +109,10 @@ export class Pedometer extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
queryData(options: { startDate: Date, endDate: Date }): Promise<IPedometerData> {
|
queryData(options: {
|
||||||
|
startDate: Date;
|
||||||
|
endDate: Date;
|
||||||
|
}): Promise<IPedometerData> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
import { Cordova, CordovaCheck, IonicNativePlugin, Plugin, wrap } from '@ionic-native/core';
|
import {
|
||||||
import { Observable } from 'rxjs/Observable';
|
Cordova,
|
||||||
|
CordovaCheck,
|
||||||
|
IonicNativePlugin,
|
||||||
|
Plugin,
|
||||||
|
wrap
|
||||||
|
} from '@ionic-native/core';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -44,13 +50,13 @@ import { Injectable } from '@angular/core';
|
|||||||
plugin: 'cordova-plugin-photo-library',
|
plugin: 'cordova-plugin-photo-library',
|
||||||
pluginRef: 'cordova.plugins.photoLibrary',
|
pluginRef: 'cordova.plugins.photoLibrary',
|
||||||
repo: 'https://github.com/terikon/cordova-plugin-photo-library',
|
repo: 'https://github.com/terikon/cordova-plugin-photo-library',
|
||||||
install: 'ionic cordova plugin add cordova-plugin-photo-library --variable PHOTO_LIBRARY_USAGE_DESCRIPTION="To choose photos"',
|
install:
|
||||||
|
'ionic cordova plugin add cordova-plugin-photo-library --variable PHOTO_LIBRARY_USAGE_DESCRIPTION="To choose photos"',
|
||||||
installVariables: ['PHOTO_LIBRARY_USAGE_DESCRIPTION'],
|
installVariables: ['PHOTO_LIBRARY_USAGE_DESCRIPTION'],
|
||||||
platforms: ['Android', 'Browser', 'iOS']
|
platforms: ['Android', 'Browser', 'iOS']
|
||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class PhotoLibrary extends IonicNativePlugin {
|
export class PhotoLibrary extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves library items. Library item contains photo metadata like width and height, as well as photoURL and thumbnailURL.
|
* Retrieves library items. Library item contains photo metadata like width and height, as well as photoURL and thumbnailURL.
|
||||||
* @param options {GetLibraryOptions} Optional, like thumbnail size and chunks settings.
|
* @param options {GetLibraryOptions} Optional, like thumbnail size and chunks settings.
|
||||||
@ -60,20 +66,24 @@ export class PhotoLibrary extends IonicNativePlugin {
|
|||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
getLibrary(options?: GetLibraryOptions): Observable<LibraryItem[]> {
|
getLibrary(options?: GetLibraryOptions): Observable<LibraryItem[]> {
|
||||||
const wrappedObservable: Observable<any> = wrap(this, 'getLibrary', { callbackOrder: 'reverse' }).apply(this, [options]);
|
const wrappedObservable: Observable<any> = wrap(this, 'getLibrary', {
|
||||||
return new Observable<any>((observer) => {
|
callbackOrder: 'reverse'
|
||||||
|
}).apply(this, [options]);
|
||||||
|
return new Observable<any>(observer => {
|
||||||
const wrappedSubscription = wrappedObservable.subscribe({
|
const wrappedSubscription = wrappedObservable.subscribe({
|
||||||
next: (x) => {
|
next: x => {
|
||||||
observer.next((result: { library: LibraryItem[] }) => {
|
observer.next((result: { library: LibraryItem[] }) => {
|
||||||
return result.library;
|
return result.library;
|
||||||
});
|
});
|
||||||
if ((result: { isLastChunk: boolean }) => {
|
if (
|
||||||
|
(result: { isLastChunk: boolean }) => {
|
||||||
return result.isLastChunk;
|
return result.isLastChunk;
|
||||||
}) {
|
}
|
||||||
|
) {
|
||||||
observer.complete();
|
observer.complete();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: (err) => {
|
error: err => {
|
||||||
observer.error(err);
|
observer.error(err);
|
||||||
},
|
},
|
||||||
complete: () => {
|
complete: () => {
|
||||||
@ -92,7 +102,7 @@ export class PhotoLibrary extends IonicNativePlugin {
|
|||||||
* @return { Promise<void>} Returns a promise that resolves when permissions are granted, and fails when not.
|
* @return { Promise<void>} Returns a promise that resolves when permissions are granted, and fails when not.
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse',
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
requestAuthorization(options?: RequestAuthorizationOptions): Promise<void> {
|
requestAuthorization(options?: RequestAuthorizationOptions): Promise<void> {
|
||||||
return;
|
return;
|
||||||
@ -103,7 +113,7 @@ export class PhotoLibrary extends IonicNativePlugin {
|
|||||||
* @return {Promise<AlbumItem[]>} Resolves to list of albums.
|
* @return {Promise<AlbumItem[]>} Resolves to list of albums.
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse',
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
getAlbums(): Promise<AlbumItem[]> {
|
getAlbums(): Promise<AlbumItem[]> {
|
||||||
return;
|
return;
|
||||||
@ -119,7 +129,10 @@ export class PhotoLibrary extends IonicNativePlugin {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
getThumbnailURL(photo: string | LibraryItem, options?: GetThumbnailOptions): Promise<string> {
|
getThumbnailURL(
|
||||||
|
photo: string | LibraryItem,
|
||||||
|
options?: GetThumbnailOptions
|
||||||
|
): Promise<string> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,7 +160,10 @@ export class PhotoLibrary extends IonicNativePlugin {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
getThumbnail(photo: string | LibraryItem, options?: GetThumbnailOptions): Promise<Blob> {
|
getThumbnail(
|
||||||
|
photo: string | LibraryItem,
|
||||||
|
options?: GetThumbnailOptions
|
||||||
|
): Promise<Blob> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,7 +193,11 @@ export class PhotoLibrary extends IonicNativePlugin {
|
|||||||
successIndex: 2,
|
successIndex: 2,
|
||||||
errorIndex: 3
|
errorIndex: 3
|
||||||
})
|
})
|
||||||
saveImage(url: string, album: AlbumItem | string, options?: GetThumbnailOptions): Promise<LibraryItem> {
|
saveImage(
|
||||||
|
url: string,
|
||||||
|
album: AlbumItem | string,
|
||||||
|
options?: GetThumbnailOptions
|
||||||
|
): Promise<LibraryItem> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,7 +214,6 @@ export class PhotoLibrary extends IonicNativePlugin {
|
|||||||
saveVideo(url: string, album: AlbumItem | string): Promise<void> {
|
saveVideo(url: string, album: AlbumItem | string): Promise<void> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Plugin, Cordova, CordovaCheck, CordovaInstance, IonicNativePlugin } from '@ionic-native/core';
|
import {
|
||||||
import { Observable } from 'rxjs/Observable';
|
Plugin,
|
||||||
|
Cordova,
|
||||||
|
CordovaCheck,
|
||||||
|
CordovaInstance,
|
||||||
|
IonicNativePlugin
|
||||||
|
} from '@ionic-native/core';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Information about the currently running app
|
* Information about the currently running app
|
||||||
@ -35,22 +41,25 @@ export interface DeployConfig {
|
|||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
export class ProDeploy {
|
export class ProDeploy {
|
||||||
|
constructor(private _objectInstance: any) {}
|
||||||
constructor(private _objectInstance: any) { }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Re-initialize Deploy plugin with a new App ID and host. Not used in most cases.
|
* Re-initialize Deploy plugin with a new App ID and host. Not used in most cases.
|
||||||
* @param config A valid Deploy config object
|
* @param config A valid Deploy config object
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
init(config: DeployConfig): Promise<any> { return; }
|
init(config: DeployConfig): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check a channel for an available update
|
* Check a channel for an available update
|
||||||
* @return {Promise<string>} Resolves with 'true' or 'false', or rejects with an error.
|
* @return {Promise<string>} Resolves with 'true' or 'false', or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
check(): Promise<string> { return; }
|
check(): Promise<string> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Download an available version
|
* Download an available version
|
||||||
@ -59,7 +68,9 @@ export class ProDeploy {
|
|||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
download(): Observable<any> { return; }
|
download(): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unzip the latest downloaded version
|
* Unzip the latest downloaded version
|
||||||
@ -68,7 +79,9 @@ export class ProDeploy {
|
|||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
extract(): Observable<any> { return; }
|
extract(): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reload app with the deployed version
|
* Reload app with the deployed version
|
||||||
@ -134,7 +147,8 @@ export class ProDeploy {
|
|||||||
pluginRef: 'IonicCordova',
|
pluginRef: 'IonicCordova',
|
||||||
repo: 'https://github.com/ionic-team/cordova-plugin-ionic',
|
repo: 'https://github.com/ionic-team/cordova-plugin-ionic',
|
||||||
platforms: ['Android', 'iOS'],
|
platforms: ['Android', 'iOS'],
|
||||||
install: 'ionic cordova plugin add cordova-plugin-ionic --save --variable APP_ID="XXXXXXXX" --variable CHANNEL_NAME="Channel"'
|
install:
|
||||||
|
'ionic cordova plugin add cordova-plugin-ionic --save --variable APP_ID="XXXXXXXX" --variable CHANNEL_NAME="Channel"'
|
||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Pro extends IonicNativePlugin {
|
export class Pro extends IonicNativePlugin {
|
||||||
@ -198,4 +212,3 @@ export class Pro extends IonicNativePlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,18 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { checkAvailability, Cordova, CordovaInstance, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import {
|
||||||
import { Observable } from 'rxjs/Observable';
|
checkAvailability,
|
||||||
|
Cordova,
|
||||||
|
CordovaInstance,
|
||||||
|
IonicNativePlugin,
|
||||||
|
Plugin
|
||||||
|
} from '@ionic-native/core';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
declare const window: any;
|
declare const window: any;
|
||||||
|
|
||||||
export type EventResponse = RegistrationEventResponse & NotificationEventResponse & Error;
|
export type EventResponse = RegistrationEventResponse &
|
||||||
|
NotificationEventResponse &
|
||||||
|
Error;
|
||||||
|
|
||||||
export interface RegistrationEventResponse {
|
export interface RegistrationEventResponse {
|
||||||
/**
|
/**
|
||||||
@ -13,7 +21,6 @@ export interface RegistrationEventResponse {
|
|||||||
registrationId: string;
|
registrationId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export interface NotificationEventResponse {
|
export interface NotificationEventResponse {
|
||||||
/**
|
/**
|
||||||
* The text of the push message sent from the 3rd party service.
|
* The text of the push message sent from the 3rd party service.
|
||||||
@ -203,7 +210,6 @@ export interface BrowserPushOptions {
|
|||||||
* Default: http://push.api.phonegap.com/v1/push Optional.
|
* Default: http://push.api.phonegap.com/v1/push Optional.
|
||||||
*/
|
*/
|
||||||
pushServiceURL?: string;
|
pushServiceURL?: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PushOptions {
|
export interface PushOptions {
|
||||||
@ -314,7 +320,6 @@ export type PushEvent = string;
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Push extends IonicNativePlugin {
|
export class Push extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Init push notifications
|
* Init push notifications
|
||||||
* @param options {PushOptions}
|
* @param options {PushOptions}
|
||||||
@ -340,7 +345,9 @@ export class Push extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
createChannel(channel?: Channel): Promise<any> { return; }
|
createChannel(channel?: Channel): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete a notification channel for Android O and above.
|
* Delete a notification channel for Android O and above.
|
||||||
@ -349,7 +356,9 @@ export class Push extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
deleteChannel(id?: string): Promise<any> { return; }
|
deleteChannel(id?: string): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of currently configured channels.
|
* Returns a list of currently configured channels.
|
||||||
@ -359,7 +368,6 @@ export class Push extends IonicNativePlugin {
|
|||||||
listChannels(): Promise<Channel[]> {
|
listChannels(): Promise<Channel[]> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -371,11 +379,12 @@ export class Push extends IonicNativePlugin {
|
|||||||
pluginRef: 'PushNotification'
|
pluginRef: 'PushNotification'
|
||||||
})
|
})
|
||||||
export class PushObject {
|
export class PushObject {
|
||||||
|
|
||||||
private _objectInstance: any;
|
private _objectInstance: any;
|
||||||
|
|
||||||
constructor(options: PushOptions) {
|
constructor(options: PushOptions) {
|
||||||
if (checkAvailability('PushNotification', 'init', 'PushNotification') === true) {
|
if (
|
||||||
|
checkAvailability('PushNotification', 'init', 'PushNotification') === true
|
||||||
|
) {
|
||||||
this._objectInstance = window.PushNotification.init(options);
|
this._objectInstance = window.PushNotification.init(options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -437,7 +446,9 @@ export class PushObject {
|
|||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
finish(id?: string): Promise<any> { return; }
|
finish(id?: string): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tells the OS to clear all notifications from the Notification Center
|
* Tells the OS to clear all notifications from the Notification Center
|
||||||
@ -466,5 +477,4 @@ export class PushObject {
|
|||||||
unsubscribe(topic: string): Promise<any> {
|
unsubscribe(topic: string): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export interface QRScannerStatus {
|
export interface QRScannerStatus {
|
||||||
/**
|
/**
|
||||||
@ -115,7 +115,6 @@ export interface QRScannerStatus {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class QRScanner extends IonicNativePlugin {
|
export class QRScanner extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request permission to use QR scanner.
|
* Request permission to use QR scanner.
|
||||||
* @return {Promise<QRScannerStatus>}
|
* @return {Promise<QRScannerStatus>}
|
||||||
@ -256,7 +255,5 @@ export class QRScanner extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
openSettings(): void {
|
openSettings(): void {}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export interface SafariViewControllerOptions {
|
export interface SafariViewControllerOptions {
|
||||||
animated?: boolean;
|
animated?: boolean;
|
||||||
@ -64,7 +64,6 @@ export interface SafariViewControllerOptions {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class SafariViewController extends IonicNativePlugin {
|
export class SafariViewController extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if SafariViewController is available
|
* Checks if SafariViewController is available
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
@ -123,5 +122,4 @@ export class SafariViewController extends IonicNativePlugin {
|
|||||||
mayLaunchUrl(url: string): Promise<any> {
|
mayLaunchUrl(url: string): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import {
|
||||||
import { Observable } from 'rxjs/Observable';
|
Cordova,
|
||||||
|
CordovaProperty,
|
||||||
|
IonicNativePlugin,
|
||||||
|
Plugin
|
||||||
|
} from '@ionic-native/core';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Screen Orientation
|
* @name Screen Orientation
|
||||||
@ -59,7 +64,6 @@ import { Observable } from 'rxjs/Observable';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ScreenOrientation extends IonicNativePlugin {
|
export class ScreenOrientation extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience enum for possible orientations
|
* Convenience enum for possible orientations
|
||||||
*/
|
*/
|
||||||
@ -75,8 +79,7 @@ export class ScreenOrientation extends IonicNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Get the current orientation of the device.
|
* Get the current orientation of the device.
|
||||||
*/
|
*/
|
||||||
@CordovaProperty()
|
@CordovaProperty() type: string;
|
||||||
type: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Listen to orientation change event
|
* Listen to orientation change event
|
||||||
@ -105,7 +108,5 @@ export class ScreenOrientation extends IonicNativePlugin {
|
|||||||
* Unlock and allow all orientations.
|
* Unlock and allow all orientations.
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
unlock(): void {
|
unlock(): void {}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
declare var serial: any;
|
declare var serial: any;
|
||||||
|
|
||||||
@ -58,7 +58,6 @@ export interface SerialOpenOptions {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Serial extends IonicNativePlugin {
|
export class Serial extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request permission to connect to a serial device
|
* Request permission to connect to a serial device
|
||||||
*
|
*
|
||||||
@ -137,5 +136,4 @@ export class Serial extends IonicNativePlugin {
|
|||||||
close(): Promise<any> {
|
close(): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Shake
|
* @name Shake
|
||||||
@ -43,5 +43,4 @@ export class Shake extends IonicNativePlugin {
|
|||||||
startWatch(sensitivity?: number): Observable<any> {
|
startWatch(sensitivity?: number): Observable<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export type SpeechRecognitionListeningOptions =
|
export type SpeechRecognitionListeningOptions =
|
||||||
SpeechRecognitionListeningOptionsIOS
|
| SpeechRecognitionListeningOptionsIOS
|
||||||
| SpeechRecognitionListeningOptionsAndroid;
|
| SpeechRecognitionListeningOptionsAndroid;
|
||||||
|
|
||||||
export interface SpeechRecognitionListeningOptionsIOS {
|
export interface SpeechRecognitionListeningOptionsIOS {
|
||||||
@ -103,7 +103,6 @@ export interface SpeechRecognitionListeningOptionsAndroid {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class SpeechRecognition extends IonicNativePlugin {
|
export class SpeechRecognition extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check feature available
|
* Check feature available
|
||||||
* @return {Promise<boolean>}
|
* @return {Promise<boolean>}
|
||||||
@ -119,10 +118,11 @@ export class SpeechRecognition extends IonicNativePlugin {
|
|||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse',
|
callbackOrder: 'reverse',
|
||||||
observable: true,
|
observable: true
|
||||||
|
|
||||||
})
|
})
|
||||||
startListening(options?: SpeechRecognitionListeningOptions): Observable<Array<string>> {
|
startListening(
|
||||||
|
options?: SpeechRecognitionListeningOptions
|
||||||
|
): Observable<Array<string>> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,5 +162,4 @@ export class SpeechRecognition extends IonicNativePlugin {
|
|||||||
requestPermission(): Promise<void> {
|
requestPermission(): Promise<void> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { CordovaInstance, InstanceCheck, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import {
|
||||||
import { Observable } from 'rxjs/Observable';
|
CordovaInstance,
|
||||||
|
InstanceCheck,
|
||||||
|
IonicNativePlugin,
|
||||||
|
Plugin
|
||||||
|
} from '@ionic-native/core';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
declare const cordova: any;
|
declare const cordova: any;
|
||||||
|
|
||||||
@ -71,15 +76,24 @@ export interface ThemeableBrowserOptions {
|
|||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
export class ThemeableBrowserObject {
|
export class ThemeableBrowserObject {
|
||||||
|
|
||||||
private _objectInstance: any;
|
private _objectInstance: any;
|
||||||
|
|
||||||
constructor(url: string, target: string, styleOptions: ThemeableBrowserOptions) {
|
constructor(
|
||||||
|
url: string,
|
||||||
|
target: string,
|
||||||
|
styleOptions: ThemeableBrowserOptions
|
||||||
|
) {
|
||||||
try {
|
try {
|
||||||
this._objectInstance = cordova.ThemeableBrowser.open(url, target, styleOptions);
|
this._objectInstance = cordova.ThemeableBrowser.open(
|
||||||
|
url,
|
||||||
|
target,
|
||||||
|
styleOptions
|
||||||
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
window.open(url);
|
window.open(url);
|
||||||
console.warn('Native: ThemeableBrowser is not installed or you are running on a browser. Falling back to window.open.');
|
console.warn(
|
||||||
|
'Native: ThemeableBrowser is not installed or you are running on a browser. Falling back to window.open.'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,22 +102,19 @@ export class ThemeableBrowserObject {
|
|||||||
* if the browser was already visible.
|
* if the browser was already visible.
|
||||||
*/
|
*/
|
||||||
@CordovaInstance({ sync: true })
|
@CordovaInstance({ sync: true })
|
||||||
show(): void {
|
show(): void {}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Closes the browser window.
|
* Closes the browser window.
|
||||||
*/
|
*/
|
||||||
@CordovaInstance({ sync: true })
|
@CordovaInstance({ sync: true })
|
||||||
close(): void {
|
close(): void {}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reloads the current page
|
* Reloads the current page
|
||||||
*/
|
*/
|
||||||
@CordovaInstance({ sync: true })
|
@CordovaInstance({ sync: true })
|
||||||
reload(): void {
|
reload(): void {}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injects JavaScript code into the browser window.
|
* Injects JavaScript code into the browser window.
|
||||||
@ -111,7 +122,7 @@ export class ThemeableBrowserObject {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
executeScript(script: { file?: string, code?: string }): Promise<any> {
|
executeScript(script: { file?: string; code?: string }): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,7 +132,7 @@ export class ThemeableBrowserObject {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
insertCss(css: { file?: string, code?: string }): Promise<any> {
|
insertCss(css: { file?: string; code?: string }): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,12 +144,18 @@ export class ThemeableBrowserObject {
|
|||||||
*/
|
*/
|
||||||
@InstanceCheck({ observable: true })
|
@InstanceCheck({ observable: true })
|
||||||
on(event: string): Observable<any> {
|
on(event: string): Observable<any> {
|
||||||
return new Observable<any>((observer) => {
|
return new Observable<any>(observer => {
|
||||||
this._objectInstance.addEventListener(event, observer.next.bind(observer));
|
this._objectInstance.addEventListener(
|
||||||
return () => this._objectInstance.removeEventListener(event, observer.next.bind(observer));
|
event,
|
||||||
|
observer.next.bind(observer)
|
||||||
|
);
|
||||||
|
return () =>
|
||||||
|
this._objectInstance.removeEventListener(
|
||||||
|
event,
|
||||||
|
observer.next.bind(observer)
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -231,11 +248,20 @@ export class ThemeableBrowserObject {
|
|||||||
plugin: 'cordova-plugin-themeablebrowser',
|
plugin: 'cordova-plugin-themeablebrowser',
|
||||||
pluginRef: 'cordova.ThemeableBrowser',
|
pluginRef: 'cordova.ThemeableBrowser',
|
||||||
repo: 'https://github.com/initialxy/cordova-plugin-themeablebrowser',
|
repo: 'https://github.com/initialxy/cordova-plugin-themeablebrowser',
|
||||||
platforms: ['Amazon Fire OS', 'Android', 'Blackberry 10', 'Browser', 'FirefoxOS', 'iOS', 'Ubuntu', 'Windows', 'Windows Phone']
|
platforms: [
|
||||||
|
'Amazon Fire OS',
|
||||||
|
'Android',
|
||||||
|
'Blackberry 10',
|
||||||
|
'Browser',
|
||||||
|
'FirefoxOS',
|
||||||
|
'iOS',
|
||||||
|
'Ubuntu',
|
||||||
|
'Windows',
|
||||||
|
'Windows Phone'
|
||||||
|
]
|
||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ThemeableBrowser extends IonicNativePlugin {
|
export class ThemeableBrowser extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a browser instance
|
* Creates a browser instance
|
||||||
* @param url {string} URL to open
|
* @param url {string} URL to open
|
||||||
@ -243,8 +269,11 @@ export class ThemeableBrowser extends IonicNativePlugin {
|
|||||||
* @param styleOptions {ThemeableBrowserOptions} Themeable browser options
|
* @param styleOptions {ThemeableBrowserOptions} Themeable browser options
|
||||||
* @returns {ThemeableBrowserObject}
|
* @returns {ThemeableBrowserObject}
|
||||||
*/
|
*/
|
||||||
create(url: string, target: string, styleOptions: ThemeableBrowserOptions): ThemeableBrowserObject {
|
create(
|
||||||
|
url: string,
|
||||||
|
target: string,
|
||||||
|
styleOptions: ThemeableBrowserOptions
|
||||||
|
): ThemeableBrowserObject {
|
||||||
return new ThemeableBrowserObject(url, target, styleOptions);
|
return new ThemeableBrowserObject(url, target, styleOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, CordovaFunctionOverride, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import {
|
||||||
import { Observable } from 'rxjs/Observable';
|
Cordova,
|
||||||
|
CordovaFunctionOverride,
|
||||||
|
IonicNativePlugin,
|
||||||
|
Plugin
|
||||||
|
} from '@ionic-native/core';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export interface ThreeDeeTouchQuickAction {
|
export interface ThreeDeeTouchQuickAction {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type that can be used in the onHomeIconPressed callback
|
* Type that can be used in the onHomeIconPressed callback
|
||||||
*/
|
*/
|
||||||
@ -28,11 +32,9 @@ export interface ThreeDeeTouchQuickAction {
|
|||||||
* Icon template
|
* Icon template
|
||||||
*/
|
*/
|
||||||
iconTemplate?: string;
|
iconTemplate?: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ThreeDeeTouchForceTouch {
|
export interface ThreeDeeTouchForceTouch {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Touch force
|
* Touch force
|
||||||
*/
|
*/
|
||||||
@ -52,7 +54,6 @@ export interface ThreeDeeTouchForceTouch {
|
|||||||
* Y coordinate of action
|
* Y coordinate of action
|
||||||
*/
|
*/
|
||||||
y: number;
|
y: number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -128,7 +129,6 @@ export interface ThreeDeeTouchForceTouch {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ThreeDeeTouch extends IonicNativePlugin {
|
export class ThreeDeeTouch extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* You need an iPhone 6S or some future tech to use the features of this plugin, so you can check at runtime if the user's device is supported.
|
* You need an iPhone 6S or some future tech to use the features of this plugin, so you can check at runtime if the user's device is supported.
|
||||||
* @returns {Promise<boolean>} returns a promise that resolves with a boolean that indicates whether the plugin is available or not
|
* @returns {Promise<boolean>} returns a promise that resolves with a boolean that indicates whether the plugin is available or not
|
||||||
@ -160,8 +160,7 @@ export class ThreeDeeTouch extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
configureQuickActions(quickActions: Array<ThreeDeeTouchQuickAction>): void {
|
configureQuickActions(quickActions: Array<ThreeDeeTouchQuickAction>): void {}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When a home icon is pressed, your app launches and this JS callback is invoked.
|
* When a home icon is pressed, your app launches and this JS callback is invoked.
|
||||||
@ -179,8 +178,7 @@ export class ThreeDeeTouch extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
enableLinkPreview(): void {
|
enableLinkPreview(): void {}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disabled the link preview feature, if enabled.
|
* Disabled the link preview feature, if enabled.
|
||||||
@ -188,7 +186,5 @@ export class ThreeDeeTouch extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
disableLinkPreview(): void {
|
disableLinkPreview(): void {}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export interface ToastOptions {
|
export interface ToastOptions {
|
||||||
/**
|
/**
|
||||||
@ -69,7 +69,6 @@ export interface ToastOptions {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Toast extends IonicNativePlugin {
|
export class Toast extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show a native toast for the given duration at the specified position.
|
* Show a native toast for the given duration at the specified position.
|
||||||
*
|
*
|
||||||
@ -140,7 +139,6 @@ export class Toast extends IonicNativePlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shorthand for `show(message, 'short', 'bottom')`.
|
* Shorthand for `show(message, 'short', 'bottom')`.
|
||||||
* @param message {string}
|
* @param message {string}
|
||||||
@ -154,7 +152,6 @@ export class Toast extends IonicNativePlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shorthand for `show(message, 'long', 'top')`.
|
* Shorthand for `show(message, 'long', 'top')`.
|
||||||
* @param message {string}
|
* @param message {string}
|
||||||
@ -168,7 +165,6 @@ export class Toast extends IonicNativePlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shorthand for `show(message, 'long', 'center')`.
|
* Shorthand for `show(message, 'long', 'center')`.
|
||||||
* @param message {string}
|
* @param message {string}
|
||||||
@ -182,7 +178,6 @@ export class Toast extends IonicNativePlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shorthand for `show(message, 'long', 'bottom')`.
|
* Shorthand for `show(message, 'long', 'bottom')`.
|
||||||
* @param message {string}
|
* @param message {string}
|
||||||
@ -195,5 +190,4 @@ export class Toast extends IonicNativePlugin {
|
|||||||
showLongBottom(message: string): Observable<any> {
|
showLongBottom(message: string): Observable<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import {
|
||||||
import { Observable } from 'rxjs/Observable';
|
Cordova,
|
||||||
|
CordovaProperty,
|
||||||
|
IonicNativePlugin,
|
||||||
|
Plugin
|
||||||
|
} from '@ionic-native/core';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Web Intent
|
* @name Web Intent
|
||||||
@ -30,7 +35,8 @@ import { Observable } from 'rxjs/Observable';
|
|||||||
pluginName: 'WebIntent',
|
pluginName: 'WebIntent',
|
||||||
plugin: 'com-darryncampbell-cordova-plugin-intent',
|
plugin: 'com-darryncampbell-cordova-plugin-intent',
|
||||||
pluginRef: 'plugins.intentShim',
|
pluginRef: 'plugins.intentShim',
|
||||||
repo: 'https://github.com/darryncampbell/darryncampbell-cordova-plugin-intent',
|
repo:
|
||||||
|
'https://github.com/darryncampbell/darryncampbell-cordova-plugin-intent',
|
||||||
platforms: ['Android']
|
platforms: ['Android']
|
||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@ -39,71 +45,61 @@ export class WebIntent extends IonicNativePlugin {
|
|||||||
* Convenience constant for actions
|
* Convenience constant for actions
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty()
|
@CordovaProperty() ACTION_SEND: string;
|
||||||
ACTION_SEND: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for actions
|
* Convenience constant for actions
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty()
|
@CordovaProperty() ACTION_VIEW: string;
|
||||||
ACTION_VIEW: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for extras
|
* Convenience constant for extras
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty()
|
@CordovaProperty() EXTRA_TEXT: string;
|
||||||
EXTRA_TEXT: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for extras
|
* Convenience constant for extras
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty()
|
@CordovaProperty() EXTRA_SUBJECT: string;
|
||||||
EXTRA_SUBJECT: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for extras
|
* Convenience constant for extras
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty()
|
@CordovaProperty() EXTRA_STREAM: string;
|
||||||
EXTRA_STREAM: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for extras
|
* Convenience constant for extras
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty()
|
@CordovaProperty() EXTRA_EMAIL: string;
|
||||||
EXTRA_EMAIL: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for actions
|
* Convenience constant for actions
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty()
|
@CordovaProperty() ACTION_CALL: string;
|
||||||
ACTION_CALL: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for actions
|
* Convenience constant for actions
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty()
|
@CordovaProperty() ACTION_SENDTO: string;
|
||||||
ACTION_SENDTO: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for actions
|
* Convenience constant for actions
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty()
|
@CordovaProperty() ACTION_GET_CONTENT: string;
|
||||||
ACTION_GET_CONTENT: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for actions
|
* Convenience constant for actions
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty()
|
@CordovaProperty() ACTION_PICK: string;
|
||||||
ACTION_PICK: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Launches an Android intent
|
* Launches an Android intent
|
||||||
@ -126,7 +122,11 @@ export class WebIntent extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
startActivityForResult(options: { action: any, url: string, type?: string }): Promise<any> {
|
startActivityForResult(options: {
|
||||||
|
action: any;
|
||||||
|
url: string;
|
||||||
|
type?: string;
|
||||||
|
}): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,7 +176,10 @@ export class WebIntent extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
sendBroadcast(options: { action: string, extras?: { option: boolean } }): Promise<any> {
|
sendBroadcast(options: {
|
||||||
|
action: string;
|
||||||
|
extras?: { option: boolean };
|
||||||
|
}): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,29 +201,25 @@ export class WebIntent extends IonicNativePlugin {
|
|||||||
* @param filters {any}
|
* @param filters {any}
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
registerBroadcastReceiver(filters: any): void {
|
registerBroadcastReceiver(filters: any): void {}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unregisters a broadcast receiver
|
* Unregisters a broadcast receiver
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
unregisterBroadcastReceiver(): void {
|
unregisterBroadcastReceiver(): void {}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the content of the intent used whenever the application activity is launched
|
* Returns the content of the intent used whenever the application activity is launched
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
onIntent(): void {
|
onIntent(): void {}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
onActivityResult(): void {
|
onActivityResult(): void {}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -229,5 +228,4 @@ export class WebIntent extends IonicNativePlugin {
|
|||||||
getIntent(): Promise<any> {
|
getIntent(): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export interface ZeroconfService {
|
export interface ZeroconfService {
|
||||||
domain: string;
|
domain: string;
|
||||||
@ -79,7 +79,13 @@ export class Zeroconf extends IonicNativePlugin {
|
|||||||
* @return {Promise<ZeroconfResult>} Returns a Promise that resolves with the registered service.
|
* @return {Promise<ZeroconfResult>} Returns a Promise that resolves with the registered service.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
register(type: string, domain: string, name: string, port: number, txtRecord: any): Promise<ZeroconfResult> {
|
register(
|
||||||
|
type: string,
|
||||||
|
domain: string,
|
||||||
|
name: string,
|
||||||
|
port: number,
|
||||||
|
txtRecord: any
|
||||||
|
): Promise<ZeroconfResult> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,7 +150,9 @@ export class Zeroconf extends IonicNativePlugin {
|
|||||||
* @return {Promise<void>}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
reInit(): Promise<void> { return; }
|
reInit(): Promise<void> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Family of addresses to register: ipv4, ipv6 or any.
|
* Family of addresses to register: ipv4, ipv6 or any.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user