mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-04 00:13:06 +08:00
Merge branch 'ZiFFeL1992-reindent-angularize'
This commit is contained in:
commit
fe74f9d277
@ -1,6 +1,9 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
|
||||||
declare var window: any;
|
declare var window: any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name 3DTouch
|
* @name 3DTouch
|
||||||
* @description
|
* @description
|
||||||
@ -74,7 +77,7 @@ export class ThreeDeeTouch {
|
|||||||
* @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
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isAvailable(): Promise<boolean> {return; }
|
static isAvailable(): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* You can get a notification when the user force touches the webview. The plugin defines a Force Touch when at least 75% of the maximum force is applied to the screen. Your app will receive the x and y coordinates, so you have to figure out which UI element was touched.
|
* You can get a notification when the user force touches the webview. The plugin defines a Force Touch when at least 75% of the maximum force is applied to the screen. Your app will receive the x and y coordinates, so you have to figure out which UI element was touched.
|
||||||
@ -83,7 +86,7 @@ export class ThreeDeeTouch {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
static watchForceTouches(): Observable<ThreeDeeTouchForceTouch> {return; }
|
static watchForceTouches(): Observable<ThreeDeeTouchForceTouch> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setup the 3D-touch actions, takes an array of objects with the following
|
* setup the 3D-touch actions, takes an array of objects with the following
|
||||||
@ -95,7 +98,7 @@ export class ThreeDeeTouch {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static configureQuickActions(quickActions: Array<ThreeDeeTouchQuickAction>): void {}
|
static 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.
|
||||||
@ -118,7 +121,7 @@ export class ThreeDeeTouch {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static enableLinkPreview(): void {}
|
static enableLinkPreview(): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disabled the link preview feature, if enabled.
|
* Disabled the link preview feature, if enabled.
|
||||||
@ -126,7 +129,7 @@ export class ThreeDeeTouch {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static disableLinkPreview(): void {}
|
static disableLinkPreview(): void { }
|
||||||
}
|
}
|
||||||
export interface ThreeDeeTouchQuickAction {
|
export interface ThreeDeeTouchQuickAction {
|
||||||
type?: string;
|
type?: string;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Action Sheet
|
* @name Action Sheet
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name AdMob
|
* @name AdMob
|
||||||
@ -22,7 +22,7 @@ export class AdMob {
|
|||||||
* @param adIdOrOptions
|
* @param adIdOrOptions
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static createBanner(adIdOrOptions: any): Promise<any> {return; }
|
static createBanner(adIdOrOptions: any): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -30,7 +30,7 @@ export class AdMob {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static removeBanner(): void {}
|
static removeBanner(): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -39,7 +39,7 @@ export class AdMob {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static showBanner(position: any): void {}
|
static showBanner(position: any): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -49,7 +49,7 @@ export class AdMob {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static showBannerAtXY(x: number, y: number): void {}
|
static showBannerAtXY(x: number, y: number): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -57,14 +57,14 @@ export class AdMob {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static hideBanner(): void {}
|
static hideBanner(): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param adIdOrOptions
|
* @param adIdOrOptions
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static prepareInterstitial(adIdOrOptions: any): Promise<any> {return; }
|
static prepareInterstitial(adIdOrOptions: any): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show interstitial
|
* Show interstitial
|
||||||
@ -72,20 +72,20 @@ export class AdMob {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static showInterstitial(): void {}
|
static showInterstitial(): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isInterstitialReady (): Promise<boolean> {return; }
|
static isInterstitialReady(): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepare a reward video ad
|
* Prepare a reward video ad
|
||||||
* @param adIdOrOptions
|
* @param adIdOrOptions
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static prepareRewardVideoAd(adIdOrOptions: any): Promise<any> {return; }
|
static prepareRewardVideoAd(adIdOrOptions: any): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show a reward video ad
|
* Show a reward video ad
|
||||||
@ -100,14 +100,14 @@ export class AdMob {
|
|||||||
* @param options Returns a promise that resolves if the options are set successfully
|
* @param options Returns a promise that resolves if the options are set successfully
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static setOptions(options: any): Promise<any> {return; }
|
static setOptions(options: any): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get user ad settings
|
* Get user ad settings
|
||||||
* @returns {Promise<any>} Returns a promise that resolves with the ad settings
|
* @returns {Promise<any>} Returns a promise that resolves with the ad settings
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getAdSettings(): Promise<any> {return; }
|
static getAdSettings(): Promise<any> { return; }
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
|
|
||||||
@ -115,65 +115,65 @@ export class AdMob {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'onBannerFailedToReceive'
|
event: 'onBannerFailedToReceive'
|
||||||
})
|
})
|
||||||
static onBannerFailedToReceive (): Observable<any> {return; }
|
static onBannerFailedToReceive(): Observable<any> { return; }
|
||||||
|
|
||||||
@Cordova({
|
@Cordova({
|
||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'onBannerReceive'
|
event: 'onBannerReceive'
|
||||||
})
|
})
|
||||||
static onBannerReceive (): Observable<any> {return; }
|
static onBannerReceive(): Observable<any> { return; }
|
||||||
|
|
||||||
@Cordova({
|
@Cordova({
|
||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'onBannerPresent'
|
event: 'onBannerPresent'
|
||||||
})
|
})
|
||||||
static onBannerPresent (): Observable<any> {return; }
|
static onBannerPresent(): Observable<any> { return; }
|
||||||
|
|
||||||
@Cordova({
|
@Cordova({
|
||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'onBannerLeaveApp'
|
event: 'onBannerLeaveApp'
|
||||||
})
|
})
|
||||||
static onBannerLeaveApp (): Observable<any> {return; }
|
static onBannerLeaveApp(): Observable<any> { return; }
|
||||||
|
|
||||||
@Cordova({
|
@Cordova({
|
||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'onBannerDismiss'
|
event: 'onBannerDismiss'
|
||||||
})
|
})
|
||||||
static onBannerDismiss (): Observable<any> {return; }
|
static onBannerDismiss(): Observable<any> { return; }
|
||||||
|
|
||||||
|
|
||||||
@Cordova({
|
@Cordova({
|
||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'onInterstitialFailedToReceive'
|
event: 'onInterstitialFailedToReceive'
|
||||||
})
|
})
|
||||||
static onInterstitialFailedToReceive (): Observable<any> {return; }
|
static onInterstitialFailedToReceive(): Observable<any> { return; }
|
||||||
|
|
||||||
|
|
||||||
@Cordova({
|
@Cordova({
|
||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'onInterstitialReceive'
|
event: 'onInterstitialReceive'
|
||||||
})
|
})
|
||||||
static onInterstitialReceive (): Observable<any> {return; }
|
static onInterstitialReceive(): Observable<any> { return; }
|
||||||
|
|
||||||
|
|
||||||
@Cordova({
|
@Cordova({
|
||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'onInterstitialPresent'
|
event: 'onInterstitialPresent'
|
||||||
})
|
})
|
||||||
static onInterstitialPresent (): Observable<any> {return; }
|
static onInterstitialPresent(): Observable<any> { return; }
|
||||||
|
|
||||||
|
|
||||||
@Cordova({
|
@Cordova({
|
||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'onInterstitialLeaveApp'
|
event: 'onInterstitialLeaveApp'
|
||||||
})
|
})
|
||||||
static onInterstitialLeaveApp (): Observable<any> {return; }
|
static onInterstitialLeaveApp(): Observable<any> { return; }
|
||||||
|
|
||||||
|
|
||||||
@Cordova({
|
@Cordova({
|
||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'onInterstitialDismiss'
|
event: 'onInterstitialDismiss'
|
||||||
})
|
})
|
||||||
static onInterstitialDismiss (): Observable<any> {return; }
|
static onInterstitialDismiss(): Observable<any> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name App Availability
|
* @name App Availability
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova, CordovaProperty} from './plugin';
|
import { Cordova, CordovaProperty, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
declare var window;
|
declare var window;
|
||||||
|
|
||||||
@ -62,6 +63,6 @@ export class AppRate {
|
|||||||
* @param {boolean} immediately Show the rating prompt immediately.
|
* @param {boolean} immediately Show the rating prompt immediately.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static promptForRating(immediately: boolean): void {};
|
static promptForRating(immediately: boolean): void { };
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name App Version
|
* @name App Version
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
|
||||||
declare var window;
|
declare var window;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Background Mode
|
* @name Background Mode
|
||||||
@ -39,28 +39,28 @@ export class BackgroundMode {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static enable(): void {}
|
static enable(): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disable the background mode.
|
* Disable the background mode.
|
||||||
* Once the background mode has been disabled, the app will be paused when in background.
|
* Once the background mode has been disabled, the app will be paused when in background.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static disable(): void {}
|
static disable(): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if background mode is enabled or not.
|
* Checks if background mode is enabled or not.
|
||||||
* @returns {boolean} returns a true of false if the background mode is enabled.
|
* @returns {boolean} returns a true of false if the background mode is enabled.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isEnabled(): Promise<boolean> {return; }
|
static isEnabled(): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Can be used to get the information if the background mode is active.
|
* Can be used to get the information if the background mode is active.
|
||||||
* @returns {boolean} returns tru or flase if the background mode is active.
|
* @returns {boolean} returns tru or flase if the background mode is active.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isActive(): Promise<boolean> {return; }
|
static isActive(): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the default title, ticker and text.
|
* Override the default title, ticker and text.
|
||||||
@ -70,7 +70,7 @@ export class BackgroundMode {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android']
|
platforms: ['Android']
|
||||||
})
|
})
|
||||||
static setDefaults(options?: Configure): void {}
|
static setDefaults(options?: Configure): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Modify the displayed information.
|
* Modify the displayed information.
|
||||||
@ -80,7 +80,7 @@ export class BackgroundMode {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android']
|
platforms: ['Android']
|
||||||
})
|
})
|
||||||
static update(options?: Configure): void {}
|
static update(options?: Configure): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets a callback for a specific event
|
* Sets a callback for a specific event
|
||||||
@ -90,7 +90,7 @@ export class BackgroundMode {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static on(eventName: string, callback: any): void {}
|
static on(eventName: string, callback: any): void { }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Badge
|
* @name Badge
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Barcode Scanner
|
* @name Barcode Scanner
|
||||||
@ -52,6 +52,6 @@ export class BarcodeScanner {
|
|||||||
* @param data
|
* @param data
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static encode(type: string, data: any): Promise<any> {return; }
|
static encode(type: string, data: any): Promise<any> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
/**
|
/**
|
||||||
* @name Base64 To Gallery
|
* @name Base64 To Gallery
|
||||||
* @description This plugin allows you to save base64 data as a png image into the device
|
* @description This plugin allows you to save base64 data as a png image into the device
|
||||||
@ -24,11 +24,11 @@ export class Base64ToGallery {
|
|||||||
/**
|
/**
|
||||||
* Converts a base64 string to an image file in the device gallery
|
* Converts a base64 string to an image file in the device gallery
|
||||||
* @param {string} data The actual base64 string that you want to save
|
* @param {string} data The actual base64 string that you want to save
|
||||||
* @param {sstring} prefix Prefix the file with a string. Default is 'img_'. Optional.
|
* @param {string} prefix Prefix the file with a string. Default is 'img_'. Optional.
|
||||||
* @returns {Promise} returns a promise that resolves when the image is saved.
|
* @returns {Promise} returns a promise that resolves when the image is saved.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static base64ToGallery(data: string , prefix?: string ): Promise<any> {
|
static base64ToGallery(data: string, prefix?: string): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Battery Status
|
* @name Battery Status
|
||||||
@ -39,7 +39,7 @@ export class BatteryStatus {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'batterystatus'
|
event: 'batterystatus'
|
||||||
})
|
})
|
||||||
static onChange (): Observable<StatusObject> {return; }
|
static onChange(): Observable<StatusObject> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Watch when the battery level goes low
|
* Watch when the battery level goes low
|
||||||
@ -49,7 +49,7 @@ export class BatteryStatus {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'batterylow'
|
event: 'batterylow'
|
||||||
})
|
})
|
||||||
static onLow (): Observable<StatusObject> {return; }
|
static onLow(): Observable<StatusObject> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Watch when the battery level goes to critial
|
* Watch when the battery level goes to critial
|
||||||
@ -59,7 +59,7 @@ export class BatteryStatus {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'batterycritical'
|
event: 'batterycritical'
|
||||||
})
|
})
|
||||||
static onCritical (): Observable<StatusObject> {return; }
|
static onCritical(): Observable<StatusObject> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name BLE
|
* @name BLE
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Bluetooth Serial
|
* @name Bluetooth Serial
|
||||||
@ -42,7 +42,7 @@ export class BluetoothSerial {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'disconnect'
|
clearFunction: 'disconnect'
|
||||||
})
|
})
|
||||||
static connect (macAddress_or_uuid: string): Observable<any> {return; }
|
static connect(macAddress_or_uuid: string): Observable<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect insecurely to a Bluetooth device
|
* Connect insecurely to a Bluetooth device
|
||||||
@ -54,7 +54,7 @@ export class BluetoothSerial {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'disconnect'
|
clearFunction: 'disconnect'
|
||||||
})
|
})
|
||||||
static connectInsecure (macAddress: string): Observable<any> {return; }
|
static connectInsecure(macAddress: string): Observable<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes data to the serial port
|
* Writes data to the serial port
|
||||||
@ -64,7 +64,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static write (data: any): Promise<any> {return; }
|
static write(data: any): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the number of bytes of data available
|
* Gets the number of bytes of data available
|
||||||
@ -72,7 +72,7 @@ export class BluetoothSerial {
|
|||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
}) static available (): Promise<any> {return; }
|
}) static available(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads data from the buffer
|
* Reads data from the buffer
|
||||||
@ -81,7 +81,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static read (): Promise<any> {return; }
|
static read(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads data from the buffer until it reaches a delimiter
|
* Reads data from the buffer until it reaches a delimiter
|
||||||
@ -91,7 +91,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static readUntil (delimiter: string): Promise<any> {return; }
|
static readUntil(delimiter: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Subscribe to be notified when data is received
|
* Subscribe to be notified when data is received
|
||||||
@ -103,7 +103,7 @@ export class BluetoothSerial {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'unsubscribe'
|
clearFunction: 'unsubscribe'
|
||||||
})
|
})
|
||||||
static subscribe (delimiter: string): Observable<any> {return; }
|
static subscribe(delimiter: string): Observable<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Subscribe to be notified when data is received
|
* Subscribe to be notified when data is received
|
||||||
@ -114,7 +114,7 @@ export class BluetoothSerial {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'unsubscribeRawData'
|
clearFunction: 'unsubscribeRawData'
|
||||||
})
|
})
|
||||||
static subscribeRawData (): Observable<any> {return; }
|
static subscribeRawData(): Observable<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears data in buffer
|
* Clears data in buffer
|
||||||
@ -123,7 +123,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static clear (): Promise<any> {return; }
|
static clear(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lists bonded devices
|
* Lists bonded devices
|
||||||
@ -132,7 +132,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static list (): Promise<any> {return; }
|
static list(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reports if bluetooth is enabled
|
* Reports if bluetooth is enabled
|
||||||
@ -141,7 +141,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static isEnabled (): Promise<any> {return; }
|
static isEnabled(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reports the connection status
|
* Reports the connection status
|
||||||
@ -150,7 +150,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static isConnected (): Promise<any> {return; }
|
static isConnected(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads the RSSI from the connected peripheral
|
* Reads the RSSI from the connected peripheral
|
||||||
@ -159,7 +159,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static readRSSI (): Promise<any> {return; }
|
static readRSSI(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the Bluetooth settings on the device
|
* Show the Bluetooth settings on the device
|
||||||
@ -168,7 +168,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static showBluetoothSettings (): Promise<any> {return; }
|
static showBluetoothSettings(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable Bluetooth on the device
|
* Enable Bluetooth on the device
|
||||||
@ -177,7 +177,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static enable (): Promise<any> {return; }
|
static enable(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Discover unpaired devices
|
* Discover unpaired devices
|
||||||
@ -186,7 +186,7 @@ export class BluetoothSerial {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android', 'iOS', 'Windows Phone']
|
platforms: ['Android', 'iOS', 'Windows Phone']
|
||||||
})
|
})
|
||||||
static discoverUnpaired (): Promise<any> {return; }
|
static discoverUnpaired(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Subscribe to be notified on Bluetooth device discovery. Discovery process must be initiated with the `discoverUnpaired` function.
|
* Subscribe to be notified on Bluetooth device discovery. Discovery process must be initiated with the `discoverUnpaired` function.
|
||||||
@ -197,7 +197,7 @@ export class BluetoothSerial {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'clearDeviceDiscoveredListener'
|
clearFunction: 'clearDeviceDiscoveredListener'
|
||||||
})
|
})
|
||||||
static setDeviceDiscoveredListener (): Observable<any> {return; }
|
static setDeviceDiscoveredListener(): Observable<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the human readable device name that is broadcasted to other devices
|
* Sets the human readable device name that is broadcasted to other devices
|
||||||
@ -207,7 +207,7 @@ export class BluetoothSerial {
|
|||||||
platforms: ['Android'],
|
platforms: ['Android'],
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static setName (newName: string): void {}
|
static setName(newName: string): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes the device discoverable by other devices
|
* Makes the device discoverable by other devices
|
||||||
@ -217,5 +217,5 @@ export class BluetoothSerial {
|
|||||||
platforms: ['Android'],
|
platforms: ['Android'],
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static setDiscoverable (discoverableDuration: number): void {}
|
static setDiscoverable(discoverableDuration: number): void { }
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Brightness
|
* @name Brightness
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
export interface CalendarOptions {
|
export interface CalendarOptions {
|
||||||
firstReminderMinutes?: number;
|
firstReminderMinutes?: number;
|
||||||
@ -53,35 +54,35 @@ export class Calendar {
|
|||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static hasReadPermission(): Promise<boolean> {return; }
|
static hasReadPermission(): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if we have write permission
|
* Check if we have write permission
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static hasWritePermission(): Promise<boolean> {return; }
|
static hasWritePermission(): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request write permission
|
* Request write permission
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static requestWritePermission(): Promise<any> {return; }
|
static requestWritePermission(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request read permission
|
* Request read permission
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static requestReadPermission(): Promise<any> {return; }
|
static requestReadPermission(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests read/write permissions
|
* Requests read/write permissions
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static requestReadWritePermission(): Promise<any> {return; }
|
static requestReadWritePermission(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a calendar. (iOS only)
|
* Create a calendar. (iOS only)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
export interface CameraOptions {
|
export interface CameraOptions {
|
||||||
@ -164,7 +164,7 @@ export class Camera {
|
|||||||
/** Allow selection of video only, ONLY RETURNS URL */
|
/** Allow selection of video only, ONLY RETURNS URL */
|
||||||
VIDEO: 1,
|
VIDEO: 1,
|
||||||
/** Allow selection from all media types */
|
/** Allow selection from all media types */
|
||||||
ALLMEDIA : 2
|
ALLMEDIA: 2
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -173,11 +173,11 @@ export class Camera {
|
|||||||
*/
|
*/
|
||||||
static PictureSourceType = {
|
static PictureSourceType = {
|
||||||
/** Choose image from picture library (same as SAVEDPHOTOALBUM for Android) */
|
/** Choose image from picture library (same as SAVEDPHOTOALBUM for Android) */
|
||||||
PHOTOLIBRARY : 0,
|
PHOTOLIBRARY: 0,
|
||||||
/** Take picture from camera */
|
/** Take picture from camera */
|
||||||
CAMERA : 1,
|
CAMERA: 1,
|
||||||
/** Choose image from picture library (same as PHOTOLIBRARY for Android) */
|
/** Choose image from picture library (same as PHOTOLIBRARY for Android) */
|
||||||
SAVEDPHOTOALBUM : 2
|
SAVEDPHOTOALBUM: 2
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -186,11 +186,11 @@ export class Camera {
|
|||||||
* @enum {number}
|
* @enum {number}
|
||||||
*/
|
*/
|
||||||
static PopoverArrowDirection = {
|
static PopoverArrowDirection = {
|
||||||
ARROW_UP : 1,
|
ARROW_UP: 1,
|
||||||
ARROW_DOWN : 2,
|
ARROW_DOWN: 2,
|
||||||
ARROW_LEFT : 4,
|
ARROW_LEFT: 4,
|
||||||
ARROW_RIGHT : 8,
|
ARROW_RIGHT: 8,
|
||||||
ARROW_ANY : 15
|
ARROW_ANY: 15
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name CardIO
|
* @name CardIO
|
||||||
@ -37,20 +37,20 @@ export class CardIO {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static canScan(): Promise<boolean> {return; }
|
static canScan(): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scan a credit card with card.io.
|
* Scan a credit card with card.io.
|
||||||
* @param {CardIOOptions} options Options for configuring the plugin
|
* @param {CardIOOptions} options Options for configuring the plugin
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static scan(options?: CardIOOptions): Promise<any> {return; }
|
static scan(options?: CardIOOptions): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the version of the card.io library. Useful when contacting support.
|
* Retrieve the version of the card.io library. Useful when contacting support.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static version(): Promise<string> {return; }
|
static version(): Promise<string> { return; }
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CardIOOptions {
|
export interface CardIOOptions {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Clipboard
|
* @name Clipboard
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
import {Plugin, Cordova, InstanceProperty, CordovaInstance} from './plugin';
|
import { Cordova, CordovaInstance, Plugin, InstanceProperty } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
declare var window: any,
|
declare var window: any,
|
||||||
navigator: any;
|
navigator: any;
|
||||||
|
|
||||||
export interface IContactProperties {
|
export interface IContactProperties {
|
||||||
/** A globally unique identifier. */
|
/** A globally unique identifier. */
|
||||||
id?: string;
|
id?: string;
|
||||||
@ -32,29 +35,30 @@ export interface IContactProperties {
|
|||||||
urls?: IContactField[];
|
urls?: IContactField[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
export class Contact implements IContactProperties {
|
export class Contact implements IContactProperties {
|
||||||
private _objectInstance: any;
|
private _objectInstance: any;
|
||||||
@InstanceProperty get id(): string {return; }
|
@InstanceProperty get id(): string { return; }
|
||||||
@InstanceProperty get displayName(): string {return; }
|
@InstanceProperty get displayName(): string { return; }
|
||||||
@InstanceProperty get name(): IContactName {return; }
|
@InstanceProperty get name(): IContactName {return; }
|
||||||
@InstanceProperty get nickname(): string {return; }
|
@InstanceProperty get nickname(): string { return; }
|
||||||
@InstanceProperty get phoneNumbers(): IContactField[] {return; }
|
@InstanceProperty get phoneNumbers(): IContactField[] { return; }
|
||||||
@InstanceProperty get emails(): IContactField[] {return; }
|
@InstanceProperty get emails(): IContactField[] { return; }
|
||||||
@InstanceProperty get addresses(): IContactAddress[] {return; }
|
@InstanceProperty get addresses(): IContactAddress[] { return; }
|
||||||
@InstanceProperty get ims(): IContactField[] {return; }
|
@InstanceProperty get ims(): IContactField[] { return; }
|
||||||
@InstanceProperty get organizations(): IContactOrganization[] {return; }
|
@InstanceProperty get organizations(): IContactOrganization[] { return; }
|
||||||
@InstanceProperty get birthday(): Date {return; }
|
@InstanceProperty get birthday(): Date { return; }
|
||||||
@InstanceProperty get note(): string {return; }
|
@InstanceProperty get note(): string { return; }
|
||||||
@InstanceProperty get photos(): IContactField[] {return; }
|
@InstanceProperty get photos(): IContactField[] { return; }
|
||||||
@InstanceProperty get categories(): IContactField[] {return; }
|
@InstanceProperty get categories(): IContactField[] { return; }
|
||||||
@InstanceProperty get urls(): IContactField[] {return; }
|
@InstanceProperty get urls(): IContactField[] { return; }
|
||||||
constructor () {
|
|
||||||
|
constructor() {
|
||||||
this._objectInstance = navigator.contacts.create();
|
this._objectInstance = navigator.contacts.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
clone(): Contact {
|
clone(): Contact {
|
||||||
let newContact = new Contact();
|
let newContact = new Contact();
|
||||||
for (let prop in this) {
|
for (let prop in this) {
|
||||||
@ -63,19 +67,23 @@ export class Contact implements IContactProperties {
|
|||||||
}
|
}
|
||||||
return newContact;
|
return newContact;
|
||||||
}
|
}
|
||||||
|
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
remove(): Promise<any> {return; }
|
remove(): Promise<any> { return; }
|
||||||
|
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
save(): Promise<any> {return; }
|
save(): Promise<any> { return; }
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IContactError {
|
interface IContactError {
|
||||||
/** Error code */
|
/** Error code */
|
||||||
code: number;
|
code: number;
|
||||||
/** Error message */
|
/** Error message */
|
||||||
message: string;
|
message: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare var ContactError: {
|
declare var ContactError: {
|
||||||
new(code: number): IContactError;
|
new (code: number): IContactError;
|
||||||
UNKNOWN_ERROR: number;
|
UNKNOWN_ERROR: number;
|
||||||
INVALID_ARGUMENT_ERROR: number;
|
INVALID_ARGUMENT_ERROR: number;
|
||||||
TIMEOUT_ERROR: number;
|
TIMEOUT_ERROR: number;
|
||||||
@ -84,6 +92,7 @@ declare var ContactError: {
|
|||||||
NOT_SUPPORTED_ERROR: number;
|
NOT_SUPPORTED_ERROR: number;
|
||||||
PERMISSION_DENIED_ERROR: number
|
PERMISSION_DENIED_ERROR: number
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface IContactName {
|
export interface IContactName {
|
||||||
/** The complete name of the contact. */
|
/** The complete name of the contact. */
|
||||||
formatted?: string;
|
formatted?: string;
|
||||||
@ -104,15 +113,17 @@ export interface IContactName {
|
|||||||
*/
|
*/
|
||||||
export class ContactName implements IContactName {
|
export class ContactName implements IContactName {
|
||||||
private _objectInstance: any;
|
private _objectInstance: any;
|
||||||
|
|
||||||
constructor(formatted?: string, familyName?: string, givenName?: string, middleName?: string, honorificPrefix?: string, honorificSuffix?: string) {
|
constructor(formatted?: string, familyName?: string, givenName?: string, middleName?: string, honorificPrefix?: string, honorificSuffix?: string) {
|
||||||
this._objectInstance = new window.ContactName(formatted, familyName, givenName, middleName, honorificPrefix, honorificSuffix);
|
this._objectInstance = new window.ContactName(formatted, familyName, givenName, middleName, honorificPrefix, honorificSuffix);
|
||||||
}
|
}
|
||||||
@InstanceProperty get formatted(): string {return; }
|
|
||||||
@InstanceProperty get familyName(): string {return; }
|
@InstanceProperty get formatted(): string { return; }
|
||||||
@InstanceProperty get givenName(): string {return; }
|
@InstanceProperty get familyName(): string { return; }
|
||||||
@InstanceProperty get middleName(): string {return; }
|
@InstanceProperty get givenName(): string { return; }
|
||||||
@InstanceProperty get honorificPrefix(): string {return; }
|
@InstanceProperty get middleName(): string { return; }
|
||||||
@InstanceProperty get honorificSuffix(): string {return; }
|
@InstanceProperty get honorificPrefix(): string { return; }
|
||||||
|
@InstanceProperty get honorificSuffix(): string { return; }
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IContactField {
|
export interface IContactField {
|
||||||
@ -129,12 +140,14 @@ export interface IContactField {
|
|||||||
*/
|
*/
|
||||||
export class ContactField implements IContactField {
|
export class ContactField implements IContactField {
|
||||||
private _objectInstance: any;
|
private _objectInstance: any;
|
||||||
|
|
||||||
constructor(type?: string, value?: string, pref?: boolean) {
|
constructor(type?: string, value?: string, pref?: boolean) {
|
||||||
this._objectInstance = new window.ContactField(type, value, pref);
|
this._objectInstance = new window.ContactField(type, value, pref);
|
||||||
}
|
}
|
||||||
@InstanceProperty get type(): string {return; }
|
|
||||||
@InstanceProperty get value(): string {return; }
|
@InstanceProperty get type(): string { return; }
|
||||||
@InstanceProperty get pref(): boolean {return; }
|
@InstanceProperty get value(): string { return; }
|
||||||
|
@InstanceProperty get pref(): boolean { return; }
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IContactAddress {
|
export interface IContactAddress {
|
||||||
@ -161,7 +174,8 @@ export interface IContactAddress {
|
|||||||
*/
|
*/
|
||||||
export class ContactAddress implements IContactAddress {
|
export class ContactAddress implements IContactAddress {
|
||||||
private _objectInstance: any;
|
private _objectInstance: any;
|
||||||
constructor (pref?: boolean,
|
|
||||||
|
constructor(pref?: boolean,
|
||||||
type?: string,
|
type?: string,
|
||||||
formatted?: string,
|
formatted?: string,
|
||||||
streetAddress?: string,
|
streetAddress?: string,
|
||||||
@ -171,14 +185,15 @@ export class ContactAddress implements IContactAddress {
|
|||||||
country?: string) {
|
country?: string) {
|
||||||
this._objectInstance = new window.ContactAddress(pref, type, formatted, streetAddress, locality, region, postalCode, country);
|
this._objectInstance = new window.ContactAddress(pref, type, formatted, streetAddress, locality, region, postalCode, country);
|
||||||
}
|
}
|
||||||
@InstanceProperty get pref(): boolean {return; }
|
|
||||||
@InstanceProperty get type(): string {return; }
|
@InstanceProperty get pref(): boolean { return; }
|
||||||
@InstanceProperty get formatted(): string {return; }
|
@InstanceProperty get type(): string { return; }
|
||||||
@InstanceProperty get streetAddress(): string {return; }
|
@InstanceProperty get formatted(): string { return; }
|
||||||
@InstanceProperty get locality(): string {return; }
|
@InstanceProperty get streetAddress(): string { return; }
|
||||||
@InstanceProperty get region(): string {return; }
|
@InstanceProperty get locality(): string { return; }
|
||||||
@InstanceProperty get postalCode(): string {return; }
|
@InstanceProperty get region(): string { return; }
|
||||||
@InstanceProperty get country(): string {return; }
|
@InstanceProperty get postalCode(): string { return; }
|
||||||
|
@InstanceProperty get country(): string { return; }
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IContactOrganization {
|
export interface IContactOrganization {
|
||||||
@ -199,14 +214,14 @@ export interface IContactOrganization {
|
|||||||
*/
|
*/
|
||||||
export class ContactOrganization implements IContactOrganization {
|
export class ContactOrganization implements IContactOrganization {
|
||||||
private _objectInstance: any;
|
private _objectInstance: any;
|
||||||
constructor () {
|
constructor() {
|
||||||
this._objectInstance = new window.ContactOrganization();
|
this._objectInstance = new window.ContactOrganization();
|
||||||
}
|
}
|
||||||
@InstanceProperty get pref(): boolean {return; }
|
@InstanceProperty get pref(): boolean { return; }
|
||||||
@InstanceProperty get type(): string {return; }
|
@InstanceProperty get type(): string { return; }
|
||||||
@InstanceProperty get name(): string {return; }
|
@InstanceProperty get name(): string { return; }
|
||||||
@InstanceProperty get department(): string {return; }
|
@InstanceProperty get department(): string { return; }
|
||||||
@InstanceProperty get title(): string {return; }
|
@InstanceProperty get title(): string { return; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Search options to filter navigator.contacts. */
|
/** Search options to filter navigator.contacts. */
|
||||||
@ -224,13 +239,15 @@ export interface IContactFindOptions {
|
|||||||
*/
|
*/
|
||||||
export class ContactFindOptions implements IContactFindOptions {
|
export class ContactFindOptions implements IContactFindOptions {
|
||||||
private _objectInstance: any;
|
private _objectInstance: any;
|
||||||
constructor () {
|
|
||||||
|
constructor() {
|
||||||
this._objectInstance = new window.ContactFindOptions();
|
this._objectInstance = new window.ContactFindOptions();
|
||||||
}
|
}
|
||||||
@InstanceProperty get filter(): string {return; }
|
|
||||||
@InstanceProperty get multiple(): boolean {return; }
|
@InstanceProperty get filter(): string { return; }
|
||||||
@InstanceProperty get desiredFields(): any {return; }
|
@InstanceProperty get multiple(): boolean { return; }
|
||||||
@InstanceProperty get hasPhoneNumber(): boolean {return; }
|
@InstanceProperty get desiredFields(): any { return; }
|
||||||
|
@InstanceProperty get hasPhoneNumber(): boolean { return; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -264,6 +281,7 @@ export class Contacts {
|
|||||||
static create(): Contact {
|
static create(): Contact {
|
||||||
return new Contact();
|
return new Contact();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search for contacts in the Contacts list.
|
* Search for contacts in the Contacts list.
|
||||||
* @param fields {string[]} Contact fields to be used as a search qualifier.
|
* @param fields {string[]} Contact fields to be used as a search qualifier.
|
||||||
@ -283,10 +301,11 @@ export class Contacts {
|
|||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
static find(fields: string[], options?: any): Promise<any> { return; }
|
static find(fields: string[], options?: any): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Select a single Contact.
|
* Select a single Contact.
|
||||||
* @return Returns a Promise that resolves with the selected Contact
|
* @return Returns a Promise that resolves with the selected Contact
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static pickContact(): Promise<any> {return; }
|
static pickContact(): Promise<any> { return; }
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
export interface DatePickerOptions {
|
export interface DatePickerOptions {
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name DB Meter
|
* @name DB Meter
|
||||||
* @description This plugin defines a global DBMeter object, which permits to get the decibel values from the microphone.
|
* @description This plugin defines a global DBMeter object, which permits to get the decibel values from the microphone.
|
||||||
@ -45,27 +47,27 @@ export class DBMeter {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'stop'
|
clearFunction: 'stop'
|
||||||
})
|
})
|
||||||
static start (): Observable<any> {return; }
|
static start(): Observable<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops listening
|
* Stops listening
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static stop (): Promise<any> {return; }
|
static stop(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the DB Meter is listening
|
* Check if the DB Meter is listening
|
||||||
* @return {Promise<boolean>} Returns a promise that resolves with a boolean that tells us whether the DB meter is listening
|
* @return {Promise<boolean>} Returns a promise that resolves with a boolean that tells us whether the DB meter is listening
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isListening(): Promise<boolean> {return; }
|
static isListening(): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete the DB Meter instance
|
* Delete the DB Meter instance
|
||||||
* @return {Promise<any>} Returns a promise that will resolve if the instance has been deleted, and rejects if errors occur.
|
* @return {Promise<any>} Returns a promise that will resolve if the instance has been deleted, and rejects if errors occur.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static delete(): Promise<any> {return; }
|
static delete(): Promise<any> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
|
||||||
export interface DeeplinkMatch {
|
export interface DeeplinkMatch {
|
||||||
/**
|
/**
|
||||||
@ -52,7 +53,7 @@ export class Deeplinks {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
static route(paths): Observable<DeeplinkMatch> {return; }
|
static route(paths): Observable<DeeplinkMatch> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -75,5 +76,5 @@ export class Deeplinks {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
static routeWithNavController(navController, paths): Observable<DeeplinkMatch> {return; }
|
static routeWithNavController(navController, paths): Observable<DeeplinkMatch> { return; }
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, CordovaProperty} from './plugin';
|
import { CordovaProperty, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
declare var window: {
|
declare var window: {
|
||||||
device: Device
|
device: Device
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
import {Cordova, Plugin} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
@Plugin({
|
@Plugin({
|
||||||
plugin: 'https://github.com/loicknuchel/cordova-device-accounts.git',
|
plugin: 'https://github.com/loicknuchel/cordova-device-accounts.git',
|
||||||
pluginRef: 'plugins.DeviceAccounts',
|
pluginRef: 'plugins.DeviceAccounts',
|
||||||
@ -11,23 +13,23 @@ export class DeviceAccounts {
|
|||||||
* Gets all accounts registered on the Android Device
|
* Gets all accounts registered on the Android Device
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static get(): Promise<any> {return; }
|
static get(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all accounts registered on Android device for requested type
|
* Get all accounts registered on Android device for requested type
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getByType(type: string): Promise<any> {return; }
|
static getByType(type: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all emails registered on Android device (accounts with 'com.google' type)
|
* Get all emails registered on Android device (accounts with 'com.google' type)
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getEmails(): Promise<any> {return; }
|
static getEmails(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the first email registered on Android device
|
* Get the first email registered on Android device
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getEmail(): Promise<any> {return; }
|
static getEmail(): Promise<any> { return; }
|
||||||
}
|
}
|
@ -1,5 +1,6 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
|
||||||
export interface AccelerationData {
|
export interface AccelerationData {
|
||||||
|
|
||||||
@ -73,9 +74,7 @@ export class DeviceMotion {
|
|||||||
* @returns {Promise<any>} Returns object with x, y, z, and timestamp properties
|
* @returns {Promise<any>} Returns object with x, y, z, and timestamp properties
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getCurrentAcceleration(): Promise<AccelerationData> {
|
static getCurrentAcceleration(): Promise<AccelerationData> { return; }
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Watch the device acceleration. Clear the watch by unsubscribing from the observable.
|
* Watch the device acceleration. Clear the watch by unsubscribing from the observable.
|
||||||
@ -87,7 +86,5 @@ export class DeviceMotion {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'clearWatch'
|
clearFunction: 'clearWatch'
|
||||||
})
|
})
|
||||||
static watchAcceleration(options?: AccelerometerOptions): Observable<AccelerationData> {
|
static watchAcceleration(options?: AccelerometerOptions): Observable<AccelerationData> { return; }
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
|
||||||
export interface CompassHeading {
|
export interface CompassHeading {
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
@Plugin({
|
@Plugin({
|
||||||
plugin: 'cordova.plugins.diagnostic',
|
plugin: 'cordova.plugins.diagnostic',
|
||||||
@ -10,28 +11,28 @@ export class Diagnostic {
|
|||||||
* Checks if app is able to access device location.
|
* Checks if app is able to access device location.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isLocationEnabled(): Promise<any> {return; }
|
static isLocationEnabled(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if Wifi is connected/enabled. On iOS this returns true if the device is connected to a network by WiFi. On Android and Windows 10 Mobile this returns true if the WiFi setting is set to enabled.
|
* Checks if Wifi is connected/enabled. On iOS this returns true if the device is connected to a network by WiFi. On Android and Windows 10 Mobile this returns true if the WiFi setting is set to enabled.
|
||||||
* On Android this requires permission. `<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />`
|
* On Android this requires permission. `<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />`
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isWifiEnabled(): Promise<any> {return; }
|
static isWifiEnabled(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the device has a camera. On Android this returns true if the device has a camera. On iOS this returns true if both the device has a camera AND the application is authorized to use it. On Windows 10 Mobile this returns true if both the device has a rear-facing camera AND the
|
* Checks if the device has a camera. On Android this returns true if the device has a camera. On iOS this returns true if both the device has a camera AND the application is authorized to use it. On Windows 10 Mobile this returns true if both the device has a rear-facing camera AND the
|
||||||
* application is authorized to use it.
|
* application is authorized to use it.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isCameraEnabled(): Promise<any> {return; }
|
static isCameraEnabled(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the device has Bluetooth capabilities and if so that Bluetooth is switched on (same on Android, iOS and Windows 10 Mobile)
|
* Checks if the device has Bluetooth capabilities and if so that Bluetooth is switched on (same on Android, iOS and Windows 10 Mobile)
|
||||||
* On Android this requires permission <uses-permission android:name="android.permission.BLUETOOTH" />
|
* On Android this requires permission <uses-permission android:name="android.permission.BLUETOOTH" />
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isBluetoothEnabled(): Promise<any> {return; }
|
static isBluetoothEnabled(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the location authorization status for the application.
|
* Returns the location authorization status for the application.
|
||||||
@ -40,27 +41,27 @@ export class Diagnostic {
|
|||||||
* mode - (iOS-only / optional) location authorization mode: "always" or "when_in_use". If not specified, defaults to "when_in_use".
|
* mode - (iOS-only / optional) location authorization mode: "always" or "when_in_use". If not specified, defaults to "when_in_use".
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static requestLocationAuthorization(mode?: string): Promise<any> {return; }
|
static requestLocationAuthorization(mode?: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the application is authorized to use location.
|
* Checks if the application is authorized to use location.
|
||||||
* Note for Android: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
|
* Note for Android: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isLocationAuthorized(): Promise<any> {return; }
|
static isLocationAuthorized(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if camera hardware is present on device.
|
* Checks if camera hardware is present on device.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isCameraPresent(): Promise<any> {return; }
|
static isCameraPresent(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the application is authorized to use the camera.
|
* Checks if the application is authorized to use the camera.
|
||||||
* Note for Android: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return TRUE as permissions are already granted at installation time.
|
* Note for Android: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return TRUE as permissions are already granted at installation time.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isCameraAuthorized(): Promise<any> {return; }
|
static isCameraAuthorized(): Promise<any> { return; }
|
||||||
/**
|
/**
|
||||||
* Checks if location mode is set to return high-accuracy locations from GPS hardware.
|
* Checks if location mode is set to return high-accuracy locations from GPS hardware.
|
||||||
* Returns true if Location mode is enabled and is set to either:
|
* Returns true if Location mode is enabled and is set to either:
|
||||||
@ -68,7 +69,7 @@ export class Diagnostic {
|
|||||||
* - High accuracy = GPS hardware, network triangulation and Wifi network IDs (high and low accuracy)
|
* - High accuracy = GPS hardware, network triangulation and Wifi network IDs (high and low accuracy)
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isGpsLocationEnabled(): Promise<any> {return; }
|
static isGpsLocationEnabled(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if location mode is set to return low-accuracy locations from network triangulation/WiFi access points.
|
* Checks if location mode is set to return low-accuracy locations from network triangulation/WiFi access points.
|
||||||
@ -77,7 +78,7 @@ export class Diagnostic {
|
|||||||
* - High accuracy = GPS hardware, network triangulation and Wifi network IDs (high and low accuracy)
|
* - High accuracy = GPS hardware, network triangulation and Wifi network IDs (high and low accuracy)
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isNetworkLocationEnabled(): Promise<any> {return; }
|
static isNetworkLocationEnabled(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if remote (push) notifications are enabled.
|
* Checks if remote (push) notifications are enabled.
|
||||||
@ -85,7 +86,7 @@ export class Diagnostic {
|
|||||||
* On iOS <=7, returns true if app is registered for remote notifications AND alert style is not set to "None" (i.e. "Banners" or "Alerts") - same as isRegisteredForRemoteNotifications().
|
* On iOS <=7, returns true if app is registered for remote notifications AND alert style is not set to "None" (i.e. "Banners" or "Alerts") - same as isRegisteredForRemoteNotifications().
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isRemoteNotificationsEnabled(): Promise<any> {return; }
|
static isRemoteNotificationsEnabled(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates if the app is registered for remote (push) notifications on the device.
|
* Indicates if the app is registered for remote (push) notifications on the device.
|
||||||
@ -93,5 +94,5 @@ export class Diagnostic {
|
|||||||
* On iOS <=7, returns true if app is registered for remote notifications AND alert style is not set to "None" (i.e. "Banners" or "Alerts") - same as isRemoteNotificationsEnabled().
|
* On iOS <=7, returns true if app is registered for remote notifications AND alert style is not set to "None" (i.e. "Banners" or "Alerts") - same as isRemoteNotificationsEnabled().
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isRegisteredForRemoteNotifications(): Promise<any> {return; }
|
static isRegisteredForRemoteNotifications(): Promise<any> { return; }
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
export interface PromptCallback {
|
export interface PromptCallback {
|
||||||
|
|
||||||
@ -11,7 +12,6 @@ export interface PromptCallback {
|
|||||||
* The text entered in the prompt dialog box. (String)
|
* The text entered in the prompt dialog box. (String)
|
||||||
*/
|
*/
|
||||||
input1: string;
|
input1: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ export class Dialogs {
|
|||||||
message,
|
message,
|
||||||
title: string = 'Alert',
|
title: string = 'Alert',
|
||||||
buttonName: string = 'OK'
|
buttonName: string = 'OK'
|
||||||
): Promise<any> {return; }
|
): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays a customizable confirmation dialog box.
|
* Displays a customizable confirmation dialog box.
|
||||||
@ -99,6 +99,6 @@ export class Dialogs {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static beep(times: number): void {}
|
static beep(times: number): void { }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
declare var cordova: any;
|
declare var cordova: any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Email Composer
|
* @name Email Composer
|
||||||
* @description
|
* @description
|
||||||
@ -53,7 +56,7 @@ export class EmailComposer {
|
|||||||
* @param app {string?} An optional app id or uri scheme.
|
* @param app {string?} An optional app id or uri scheme.
|
||||||
* @returns {Promise<boolean>} Resolves if available, rejects if not available
|
* @returns {Promise<boolean>} Resolves if available, rejects if not available
|
||||||
*/
|
*/
|
||||||
static isAvailable (app?: string): Promise<any> {
|
static isAvailable(app?: string): Promise<any> {
|
||||||
return new Promise<boolean>((resolve, reject) => {
|
return new Promise<boolean>((resolve, reject) => {
|
||||||
if (app) cordova.plugins.email.isAvailable(app, (isAvailable) => { if (isAvailable) resolve(); else reject(); });
|
if (app) cordova.plugins.email.isAvailable(app, (isAvailable) => { if (isAvailable) resolve(); else reject(); });
|
||||||
else cordova.plugins.email.isAvailable((isAvailable) => { if (isAvailable) resolve(); else reject(); });
|
else cordova.plugins.email.isAvailable((isAvailable) => { if (isAvailable) resolve(); else reject(); });
|
||||||
@ -67,7 +70,7 @@ export class EmailComposer {
|
|||||||
* @param packageName {string} The package name
|
* @param packageName {string} The package name
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static addAlias(alias: string, packageName: string): void {}
|
static addAlias(alias: string, packageName: string): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays the email composer pre-filled with data.
|
* Displays the email composer pre-filled with data.
|
||||||
@ -80,9 +83,10 @@ export class EmailComposer {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 3
|
errorIndex: 3
|
||||||
})
|
})
|
||||||
static open(email: Email, scope?: any): Promise<any> {return; }
|
static open(email: Email, scope?: any): Promise<any> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Email {
|
export interface Email {
|
||||||
app?: string;
|
app?: string;
|
||||||
to?: string | Array<string>;
|
to?: string | Array<string>;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Facebook
|
* @name Facebook
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
declare var window;
|
declare var window;
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, CordovaInstance} from './plugin';
|
import { CordovaInstance, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
declare var FileTransfer;
|
declare var FileTransfer;
|
||||||
|
|
||||||
@ -189,6 +190,6 @@ export class Transfer {
|
|||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
abort(): void {}
|
abort(): void { }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Flashlight
|
* @name Flashlight
|
||||||
@ -21,7 +22,6 @@ import {Plugin, Cordova} from './plugin';
|
|||||||
})
|
})
|
||||||
export class Flashlight {
|
export class Flashlight {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the flashlight is available
|
* Checks if the flashlight is available
|
||||||
* @returns {Promise<boolean>} Returns a promise that resolves with a boolean stating if the flashlight is available.
|
* @returns {Promise<boolean>} Returns a promise that resolves with a boolean stating if the flashlight is available.
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
|
||||||
declare var navigator: any;
|
declare var navigator: any;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Globalization
|
* @name Globalization
|
||||||
@ -23,14 +23,14 @@ export class Globalization {
|
|||||||
* @return {Promise<{value: string}>}
|
* @return {Promise<{value: string}>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getPreferredLanguage(): Promise<{value: string}> {return; }
|
static getPreferredLanguage(): Promise<{ value: string }> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the BCP 47 compliant locale identifier string to the successCallback with a properties object as a parameter.
|
* Returns the BCP 47 compliant locale identifier string to the successCallback with a properties object as a parameter.
|
||||||
* @return {Promise<{value: string}>}
|
* @return {Promise<{value: string}>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getLocaleName(): Promise<{value: string}> {return; }
|
static getLocaleName(): Promise<{ value: string }> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts date to string
|
* Converts date to string
|
||||||
@ -40,9 +40,9 @@ export class Globalization {
|
|||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex 2
|
||||||
})
|
})
|
||||||
static dateToString(date: Date, options: {formatLength: string, selector: string}): Promise<{value: string}> {return; }
|
static dateToString(date: Date, options: { formatLength: string, selector: string }): Promise<{ value: string }> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses a date formatted as a string, according to the client's user preferences and calendar using the time zone of the client, and returns the corresponding date object.
|
* Parses a date formatted as a string, according to the client's user preferences and calendar using the time zone of the client, and returns the corresponding date object.
|
||||||
@ -54,8 +54,7 @@ export class Globalization {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
static stringToDate(dateString: string, options: {formatLength: string, selector: string}): Promise<{year: number, month: number, day: number, hour: number, minute: number, second: number, millisecond: number}> {return; }
|
static stringToDate(dateString: string, options: { formatLength: string, selector: string }): Promise<{ year: number, month: number, day: number, hour: number, minute: number, second: number, millisecond: number }> { return; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a pattern string to format and parse dates according to the client's user preferences.
|
* Returns a pattern string to format and parse dates according to the client's user preferences.
|
||||||
@ -65,8 +64,7 @@ export class Globalization {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
static getDatePattern(options: {formatLength: string, selector: string}): Promise<{pattern: string}> {return; }
|
static getDatePattern(options: { formatLength: string, selector: string }): Promise<{ pattern: string }> { return; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array of the names of the months or days of the week, depending on the client's user preferences and calendar.
|
* Returns an array of the names of the months or days of the week, depending on the client's user preferences and calendar.
|
||||||
@ -76,7 +74,7 @@ export class Globalization {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
static getDateNames(options: {type: string, item: string}): Promise<{value: Array<string>}> {return; }
|
static getDateNames(options: { type: string, item: string }): Promise<{ value: Array<string> }> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether daylight savings time is in effect for a given date using the client's time zone and calendar.
|
* Indicates whether daylight savings time is in effect for a given date using the client's time zone and calendar.
|
||||||
@ -84,14 +82,14 @@ export class Globalization {
|
|||||||
* @returns {Promise<dst>} reutrns a promise with the value
|
* @returns {Promise<dst>} reutrns a promise with the value
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isDayLightSavingsTime(date: Date): Promise<{dst: string}> {return; }
|
static isDayLightSavingsTime(date: Date): Promise<{ dst: string }> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the first day of the week according to the client's user preferences and calendar.
|
* Returns the first day of the week according to the client's user preferences and calendar.
|
||||||
* @returns {Promise<value>} reutrns a promise with the value
|
* @returns {Promise<value>} reutrns a promise with the value
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getFirstDayOfWeek(): Promise<{value: string}> {return; }
|
static getFirstDayOfWeek(): Promise<{ value: string }> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a number formatted as a string according to the client's user preferences.
|
* Returns a number formatted as a string according to the client's user preferences.
|
||||||
@ -101,7 +99,7 @@ export class Globalization {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
static numberToString(options: {type: string}): Promise<{value: string}> {return; }
|
static numberToString(options: { type: string }): Promise<{ value: string }> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -113,7 +111,7 @@ export class Globalization {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
static stringToNumber(stringToConvert: string, options: {type: string}): Promise<{value: number|string}> {return; }
|
static stringToNumber(stringToConvert: string, options: { type: string }): Promise<{ value: number | string }> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a pattern string to format and parse numbers according to the client's user preferences.
|
* Returns a pattern string to format and parse numbers according to the client's user preferences.
|
||||||
@ -123,7 +121,7 @@ export class Globalization {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
static getNumberPattern(options: {type: string}): Promise<{pattern: string, symbol: string, fraction: number, rounding: number, positive: string, negative: string, decimal: string, grouping: string}> {return; }
|
static getNumberPattern(options: { type: string }): Promise<{ pattern: string, symbol: string, fraction: number, rounding: number, positive: string, negative: string, decimal: string, grouping: string }> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a pattern string to format and parse currency values according to the client's user preferences and ISO 4217 currency code.
|
* Returns a pattern string to format and parse currency values according to the client's user preferences and ISO 4217 currency code.
|
||||||
@ -131,6 +129,6 @@ export class Globalization {
|
|||||||
* @returns {Promise} returns a promise with the value
|
* @returns {Promise} returns a promise with the value
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getCurrencyPattern(currencyCode: string): Promise<{pattern: string, code: string, fraction: number, rounding: number, decimal: number, grouping: string}> {return; }
|
static getCurrencyPattern(currencyCode: string): Promise<{ pattern: string, code: string, fraction: number, rounding: number, decimal: number, grouping: string }> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Google Plus
|
* @name Google Plus
|
||||||
@ -22,25 +23,25 @@ export class GooglePlus {
|
|||||||
* @param options
|
* @param options
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static login(options?: any): Promise<any> {return; }
|
static login(options?: any): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* You can call trySilentLogin to check if they're already signed in to the app and sign them in silently if they are.
|
* You can call trySilentLogin to check if they're already signed in to the app and sign them in silently if they are.
|
||||||
* @param options
|
* @param options
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static trySilentLogin(options?: any): Promise<any> {return; }
|
static trySilentLogin(options?: any): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This will clear the OAuth2 token.
|
* This will clear the OAuth2 token.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static logout(): Promise<any> {return; }
|
static logout(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This will clear the OAuth2 token, forget which account was used to login, and disconnect that account from the app. This will require the user to allow the app access again next time they sign in. Be aware that this effect is not always instantaneous. It can take time to completely disconnect.
|
* This will clear the OAuth2 token, forget which account was used to login, and disconnect that account from the app. This will require the user to allow the app access again next time they sign in. Be aware that this effect is not always instantaneous. It can take time to completely disconnect.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static disconnect(): Promise<any> {return; }
|
static disconnect(): Promise<any> { return; }
|
||||||
|
|
||||||
}
|
}
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
declare var window;
|
declare var window;
|
||||||
|
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
import { Cordova, CordovaInstance, Plugin } from './plugin';
|
import { Cordova, CordovaInstance, Plugin } from './plugin';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* Created by Ibrahim on 3/29/2016.
|
* Created by Ibrahim on 3/29/2016.
|
||||||
*/
|
*/
|
||||||
declare var plugin: any;
|
declare var plugin: any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* You can listen to these events where appropriate
|
* You can listen to these events where appropriate
|
||||||
@ -944,7 +947,7 @@ export class GoogleMapsKmlOverlay {
|
|||||||
export class GoogleMapsLatLngBounds {
|
export class GoogleMapsLatLngBounds {
|
||||||
private _objectInstance: any;
|
private _objectInstance: any;
|
||||||
|
|
||||||
constructor(public southwestOrArrayOfLatLng: GoogleMapsLatLng|GoogleMapsLatLng[], public northeast?: GoogleMapsLatLng) {
|
constructor(public southwestOrArrayOfLatLng: GoogleMapsLatLng | GoogleMapsLatLng[], public northeast?: GoogleMapsLatLng) {
|
||||||
let args = !!northeast ? [southwestOrArrayOfLatLng, northeast] : southwestOrArrayOfLatLng;
|
let args = !!northeast ? [southwestOrArrayOfLatLng, northeast] : southwestOrArrayOfLatLng;
|
||||||
this._objectInstance = new plugin.google.maps.LatLngBounds(args);
|
this._objectInstance = new plugin.google.maps.LatLngBounds(args);
|
||||||
}
|
}
|
||||||
@ -1004,13 +1007,13 @@ export class GoogleMapsLatLng {
|
|||||||
*/
|
*/
|
||||||
export interface GeocoderRequest {
|
export interface GeocoderRequest {
|
||||||
address?: string;
|
address?: string;
|
||||||
position?: {lat: number; lng: number};
|
position?: { lat: number; lng: number };
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
export interface GeocoderResult {
|
export interface GeocoderResult {
|
||||||
position?: {lat: number; lng: number};
|
position?: { lat: number; lng: number };
|
||||||
subThoroughfare?: string;
|
subThoroughfare?: string;
|
||||||
thoroughfare?: string;
|
thoroughfare?: string;
|
||||||
locality?: string;
|
locality?: string;
|
||||||
@ -1029,7 +1032,7 @@ export class Geocoder {
|
|||||||
*/
|
*/
|
||||||
static geocode(request: GeocoderRequest): Promise<GeocoderResult[]> {
|
static geocode(request: GeocoderRequest): Promise<GeocoderResult[]> {
|
||||||
return new Promise<GeocoderResult[]>((resolve, reject) => {
|
return new Promise<GeocoderResult[]>((resolve, reject) => {
|
||||||
if (!plugin || !plugin.google || !plugin.google.maps || !plugin.google.maps.Geocoder) reject({error: 'plugin_not_installed'});
|
if (!plugin || !plugin.google || !plugin.google.maps || !plugin.google.maps.Geocoder) reject({ error: 'plugin_not_installed' });
|
||||||
else plugin.google.maps.Geocoder.geocode(request, resolve);
|
else plugin.google.maps.Geocoder.geocode(request, resolve);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Hotspot
|
* @name Hotspot
|
||||||
@ -24,10 +24,10 @@ import {Plugin, Cordova} from './plugin';
|
|||||||
export class Hotspot {
|
export class Hotspot {
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isAvailable(): Promise<boolean> {return; }
|
static isAvailable(): Promise<boolean> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static toggleWifi(): Promise<boolean> {return; }
|
static toggleWifi(): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configures and starts hotspot with SSID and Password
|
* Configures and starts hotspot with SSID and Password
|
||||||
@ -39,7 +39,7 @@ export class Hotspot {
|
|||||||
* @return {Promise<void>} - Promise to call once hotspot is started, or reject upon failure
|
* @return {Promise<void>} - Promise to call once hotspot is started, or reject upon failure
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static createHotspot(ssid: string, mode: string, password: string): Promise<void> {return; }
|
static createHotspot(ssid: string, mode: string, password: string): Promise<void> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turns on Access Point
|
* Turns on Access Point
|
||||||
@ -47,7 +47,7 @@ export class Hotspot {
|
|||||||
* @return {Promise<boolean>} - true if AP is started
|
* @return {Promise<boolean>} - true if AP is started
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static startHotspot(): Promise<boolean> {return; }
|
static startHotspot(): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configures hotspot with SSID and Password
|
* Configures hotspot with SSID and Password
|
||||||
@ -59,7 +59,7 @@ export class Hotspot {
|
|||||||
* @return {Promise<void>} - Promise to call when hotspot is configured, or reject upon failure
|
* @return {Promise<void>} - Promise to call when hotspot is configured, or reject upon failure
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static configureHotspot(ssid: string, mode: string, password: string): Promise<void> {return; }
|
static configureHotspot(ssid: string, mode: string, password: string): Promise<void> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turns off Access Point
|
* Turns off Access Point
|
||||||
@ -67,7 +67,7 @@ export class Hotspot {
|
|||||||
* @return {Promise<boolean>} - Promise to turn off the hotspot, true on success, false on failure
|
* @return {Promise<boolean>} - Promise to turn off the hotspot, true on success, false on failure
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static stopHotspot(): Promise<boolean> {return; }
|
static stopHotspot(): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if hotspot is enabled
|
* Checks if hotspot is enabled
|
||||||
@ -75,10 +75,10 @@ export class Hotspot {
|
|||||||
* @return {Promise<void>} - Promise that hotspot is enabled, rejected if it is not enabled
|
* @return {Promise<void>} - Promise that hotspot is enabled, rejected if it is not enabled
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isHotspotEnabled(): Promise<void> {return; }
|
static isHotspotEnabled(): Promise<void> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getAllHotspotDevices(): Promise<Array<HotspotDevice>> {return; }
|
static getAllHotspotDevices(): Promise<Array<HotspotDevice>> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to a WiFi network
|
* Connect to a WiFi network
|
||||||
@ -92,7 +92,7 @@ export class Hotspot {
|
|||||||
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
|
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static connectToWifi(ssid: string, password: string): Promise<void> {return; }
|
static connectToWifi(ssid: string, password: string): Promise<void> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to a WiFi network
|
* Connect to a WiFi network
|
||||||
@ -110,7 +110,7 @@ export class Hotspot {
|
|||||||
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
|
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: Array<string>): Promise<void> {return; }
|
static connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: Array<string>): Promise<void> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a WiFi network
|
* Add a WiFi network
|
||||||
@ -126,7 +126,7 @@ export class Hotspot {
|
|||||||
* Promise that adding the WiFi network was successfull, rejected if unsuccessful
|
* Promise that adding the WiFi network was successfull, rejected if unsuccessful
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static addWifiNetwork(ssid: string, mode: string, password: string): Promise<void> {return; }
|
static addWifiNetwork(ssid: string, mode: string, password: string): Promise<void> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove a WiFi network
|
* Remove a WiFi network
|
||||||
@ -138,43 +138,43 @@ export class Hotspot {
|
|||||||
* Promise that removing the WiFi network was successfull, rejected if unsuccessful
|
* Promise that removing the WiFi network was successfull, rejected if unsuccessful
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static removeWifiNetwork(ssid: string): Promise<void> {return; }
|
static removeWifiNetwork(ssid: string): Promise<void> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isConnectedToInternet(): Promise<boolean> {return; }
|
static isConnectedToInternet(): Promise<boolean> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isConnectedToInternetViaWifi(): Promise<boolean> {return; }
|
static isConnectedToInternetViaWifi(): Promise<boolean> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isWifiOn(): Promise<boolean> {return; }
|
static isWifiOn(): Promise<boolean> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isWifiSupported(): Promise<boolean> {return; }
|
static isWifiSupported(): Promise<boolean> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isWifiDirectSupported(): Promise<boolean> {return; }
|
static isWifiDirectSupported(): Promise<boolean> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static scanWifi(): Promise<Array<Network>> {return; }
|
static scanWifi(): Promise<Array<Network>> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static scanWifiByLevel(): Promise<Array<Network>> {return; }
|
static scanWifiByLevel(): Promise<Array<Network>> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static startWifiPeriodicallyScan(interval: number, duration: number): Promise<any> {return; }
|
static startWifiPeriodicallyScan(interval: number, duration: number): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static stopWifiPeriodicallyScan(): Promise<any> {return; }
|
static stopWifiPeriodicallyScan(): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getNetConfig(): Promise<NetworkConfig> {return; }
|
static getNetConfig(): Promise<NetworkConfig> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getConnectionInfo(): Promise<ConnectionInfo> {return; }
|
static getConnectionInfo(): Promise<ConnectionInfo> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static pingHost(ip: string): Promise<string> {return; }
|
static pingHost(ip: string): Promise<string> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets MAC Address associated with IP Address from ARP File
|
* Gets MAC Address associated with IP Address from ARP File
|
||||||
@ -184,7 +184,7 @@ export class Hotspot {
|
|||||||
* @return {Promise<string>} - A Promise for the MAC Address
|
* @return {Promise<string>} - A Promise for the MAC Address
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getMacAddressOfHost(ip: string): Promise<string> {return; }
|
static getMacAddressOfHost(ip: string): Promise<string> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if IP is live using DNS
|
* Checks if IP is live using DNS
|
||||||
@ -194,7 +194,7 @@ export class Hotspot {
|
|||||||
* @return {Promise<boolean>} - A Promise for whether the IP Address is reachable
|
* @return {Promise<boolean>} - A Promise for whether the IP Address is reachable
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isDnsLive(ip: string): Promise<boolean> {return; }
|
static isDnsLive(ip: string): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if IP is live using socket And PORT
|
* Checks if IP is live using socket And PORT
|
||||||
@ -204,7 +204,7 @@ export class Hotspot {
|
|||||||
* @return {Promise<boolean>} - A Promise for whether the IP Address is reachable
|
* @return {Promise<boolean>} - A Promise for whether the IP Address is reachable
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isPortLive(ip: string): Promise<boolean> {return; }
|
static isPortLive(ip: string): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if device is rooted
|
* Checks if device is rooted
|
||||||
@ -212,7 +212,7 @@ export class Hotspot {
|
|||||||
* @return {Promise<boolean>} - A Promise for whether the device is rooted
|
* @return {Promise<boolean>} - A Promise for whether the device is rooted
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isRooted(): Promise<boolean> {return; }
|
static isRooted(): Promise<boolean> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Httpd
|
* @name Httpd
|
||||||
* @description
|
* @description
|
||||||
@ -23,22 +25,24 @@ export class Httpd {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'stopServer'
|
clearFunction: 'stopServer'
|
||||||
})
|
})
|
||||||
static startServer(options: any): Observable<string> {return; }
|
static startServer(options: any): Observable<string> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the URL of the running server
|
* Gets the URL of the running server
|
||||||
* @returns {Promise<string>} Returns a promise that resolves with the URL of the web server.
|
* @returns {Promise<string>} Returns a promise that resolves with the URL of the web server.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getUrl(): Promise<string> {return; }
|
static getUrl(): Promise<string> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the local path of the running webserver
|
* Get the local path of the running webserver
|
||||||
* @returns {Promise<string>} Returns a promise that resolves with the local path of the web server.
|
* @returns {Promise<string>} Returns a promise that resolves with the local path of the web server.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getLocalPath(): Promise<string> {return; }
|
static getLocalPath(): Promise<string> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* These options are used for the Httpd.startServer() function.
|
* These options are used for the Httpd.startServer() function.
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
|
||||||
declare var cordova: any;
|
declare var cordova: any;
|
||||||
|
|
||||||
@ -47,6 +48,7 @@ export interface Beacon {
|
|||||||
accuracy: number;
|
accuracy: number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BeaconRegion {
|
export interface BeaconRegion {
|
||||||
/**
|
/**
|
||||||
* A unique identifier for this region.
|
* A unique identifier for this region.
|
||||||
@ -76,6 +78,7 @@ export interface BeaconRegion {
|
|||||||
*/
|
*/
|
||||||
notifyEntryStateOnDisplay?: boolean;
|
notifyEntryStateOnDisplay?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CircularRegion {
|
export interface CircularRegion {
|
||||||
/**
|
/**
|
||||||
* A unique identifier for this region.
|
* A unique identifier for this region.
|
||||||
@ -97,6 +100,7 @@ export interface CircularRegion {
|
|||||||
*/
|
*/
|
||||||
radius: number;
|
radius: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Region = BeaconRegion | CircularRegion;
|
export type Region = BeaconRegion | CircularRegion;
|
||||||
|
|
||||||
export interface PluginResult {
|
export interface PluginResult {
|
||||||
@ -131,6 +135,7 @@ export interface PluginResult {
|
|||||||
*/
|
*/
|
||||||
error: string;
|
error: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Delegate {
|
export interface Delegate {
|
||||||
/**
|
/**
|
||||||
* An observable that publishes information about the location permission authorization status.
|
* An observable that publishes information about the location permission authorization status.
|
||||||
@ -270,7 +275,6 @@ export interface Delegate {
|
|||||||
})
|
})
|
||||||
export class IBeacon {
|
export class IBeacon {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instances of this class are delegates between the {@link LocationManager} and
|
* Instances of this class are delegates between the {@link LocationManager} and
|
||||||
* the code that consumes the messages generated on in the native layer.
|
* the code that consumes the messages generated on in the native layer.
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
export interface ImagePickerOptions {
|
export interface ImagePickerOptions {
|
||||||
// max images to be selected, defaults to 15. If this is set to 1, upon
|
// max images to be selected, defaults to 15. If this is set to 1, upon
|
||||||
@ -55,4 +56,5 @@ export class ImagePicker {
|
|||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
static getPictures(options: ImagePickerOptions): Promise<any> { return; }
|
static getPictures(options: ImagePickerOptions): Promise<any> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
export interface InAppBrowserEvent extends Event {
|
export interface InAppBrowserEvent extends Event {
|
||||||
/** the eventname, either loadstart, loadstop, loaderror, or exit. */
|
/** the eventname, either loadstart, loadstop, loaderror, or exit. */
|
||||||
@ -54,14 +55,14 @@ export interface InAppBrowserRef {
|
|||||||
* For multi-line scripts, this is the return value of the last statement,
|
* For multi-line scripts, this is the return value of the last statement,
|
||||||
* or the last expression evaluated.
|
* or the last expression evaluated.
|
||||||
*/
|
*/
|
||||||
executeScript(script: {file?: string, code?: string}, callback?: (result?: any) => void);
|
executeScript(script: { file?: string, code?: string }, callback?: (result?: any) => void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injects CSS into the InAppBrowser window.
|
* Injects CSS into the InAppBrowser window.
|
||||||
* @param css Details of the script to run, specifying either a file or code key.
|
* @param css Details of the script to run, specifying either a file or code key.
|
||||||
* @param callback The function that executes after the CSS is injected.
|
* @param callback The function that executes after the CSS is injected.
|
||||||
*/
|
*/
|
||||||
insertCSS(css: {file?: string, code?: string}, callback?: () => void);
|
insertCSS(css: { file?: string, code?: string }, callback?: () => void);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Plugin({
|
@Plugin({
|
||||||
@ -82,4 +83,5 @@ export class InAppBrowser {
|
|||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static open(url: string, target?: string, options?: string): InAppBrowserRef { return; }
|
static open(url: string, target?: string, options?: string): InAppBrowserRef { return; }
|
||||||
|
|
||||||
}
|
}
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Insomnia
|
* @name Insomnia
|
||||||
@ -44,4 +45,5 @@ export class Insomnia {
|
|||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static allowSleepAgain(): Promise<any> { return; }
|
static allowSleepAgain(): Promise<any> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import {Cordova, Plugin} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Keyboard
|
* @name Keyboard
|
||||||
@ -34,7 +35,7 @@ export class Keyboard {
|
|||||||
sync: true,
|
sync: true,
|
||||||
platforms: ['Android', 'BlackBerry 10', 'Windows']
|
platforms: ['Android', 'BlackBerry 10', 'Windows']
|
||||||
})
|
})
|
||||||
static show(): void {}
|
static show(): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close the keyboard if open.
|
* Close the keyboard if open.
|
||||||
@ -43,7 +44,7 @@ export class Keyboard {
|
|||||||
sync: true,
|
sync: true,
|
||||||
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
||||||
})
|
})
|
||||||
static close(): void {}
|
static close(): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prevents the native UIScrollView from moving when an input is focused.
|
* Prevents the native UIScrollView from moving when an input is focused.
|
||||||
@ -53,7 +54,7 @@ export class Keyboard {
|
|||||||
sync: true,
|
sync: true,
|
||||||
platforms: ['iOS', 'Windows']
|
platforms: ['iOS', 'Windows']
|
||||||
})
|
})
|
||||||
static disableScroll(disable: boolean): void {}
|
static 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.
|
||||||
@ -63,7 +64,7 @@ export class Keyboard {
|
|||||||
event: 'native.keyboardshow',
|
event: 'native.keyboardshow',
|
||||||
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
||||||
})
|
})
|
||||||
static onKeyboardShow(): Observable<any> {return; }
|
static onKeyboardShow(): Observable<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an observable that notifies you when the keyboard is hidden. Unsubscribe to observable to cancel event watch.
|
* Creates an observable that notifies you when the keyboard is hidden. Unsubscribe to observable to cancel event watch.
|
||||||
@ -73,6 +74,6 @@ export class Keyboard {
|
|||||||
event: 'native.keyboardhide',
|
event: 'native.keyboardhide',
|
||||||
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
platforms: ['iOS', 'Android', 'BlackBerry 10', 'Windows']
|
||||||
})
|
})
|
||||||
static onKeyboardHide(): Observable<any> {return; }
|
static onKeyboardHide(): Observable<any> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
export interface LaunchNavigatorOptions {
|
export interface LaunchNavigatorOptions {
|
||||||
|
|
||||||
@ -15,7 +16,7 @@ export interface LaunchNavigatorOptions {
|
|||||||
/**
|
/**
|
||||||
* Start point of the navigation
|
* Start point of the navigation
|
||||||
*/
|
*/
|
||||||
start?: string|number[];
|
start?: string | number[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nickname to display in app for start . e.g. "My House".
|
* nickname to display in app for start . e.g. "My House".
|
||||||
@ -98,7 +99,7 @@ export class LaunchNavigator {
|
|||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
static navigate(
|
static navigate(
|
||||||
destination: string|number[],
|
destination: string | number[],
|
||||||
options?: LaunchNavigatorOptions
|
options?: LaunchNavigatorOptions
|
||||||
): Promise<any> { return; }
|
): Promise<any> { return; }
|
||||||
|
|
||||||
@ -107,43 +108,43 @@ export class LaunchNavigator {
|
|||||||
* @param app {string}
|
* @param app {string}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isAppAvailable(app: string): Promise<any> {return; }
|
static isAppAvailable(app: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list indicating which apps are installed and available on the current device.
|
* Returns a list indicating which apps are installed and available on the current device.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static availableApps(): Promise<string[]> {return; }
|
static availableApps(): Promise<string[]> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the display name of the specified app.
|
* Returns the display name of the specified app.
|
||||||
* @param app {string}
|
* @param app {string}
|
||||||
*/
|
*/
|
||||||
@Cordova({sync: true})
|
@Cordova({ sync: true })
|
||||||
static getAppDisplayName(app: string): string {return; }
|
static getAppDisplayName(app: string): string { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns list of supported apps on a given platform.
|
* Returns list of supported apps on a given platform.
|
||||||
* @param platform {string}
|
* @param platform {string}
|
||||||
*/
|
*/
|
||||||
@Cordova({sync: true})
|
@Cordova({ sync: true })
|
||||||
static getAppsForPlatform(platform: string): string[] {return; }
|
static getAppsForPlatform(platform: string): string[] { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates if an app on a given platform supports specification of transport mode.
|
* Indicates if an app on a given platform supports specification of transport mode.
|
||||||
* @param app {string} specified as a string, you can use one of the constants, e.g `LaunchNavigator.APP.GOOGLE_MAPS`
|
* @param app {string} specified as a string, you can use one of the constants, e.g `LaunchNavigator.APP.GOOGLE_MAPS`
|
||||||
* @param platform {string}
|
* @param platform {string}
|
||||||
*/
|
*/
|
||||||
@Cordova({sync: true})
|
@Cordova({ sync: true })
|
||||||
static supportsTransportMode(app: string, platform: string): boolean {return; }
|
static supportsTransportMode(app: string, platform: string): boolean { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the list of transport modes supported by an app on a given platform.
|
* Returns the list of transport modes supported by an app on a given platform.
|
||||||
* @param app {string}
|
* @param app {string}
|
||||||
* @param platform {string}
|
* @param platform {string}
|
||||||
*/
|
*/
|
||||||
@Cordova({sync: true})
|
@Cordova({ sync: true })
|
||||||
static getTransportModes(app: string, platform: string): string[] {return; }
|
static getTransportModes(app: string, platform: string): string[] { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates if an app on a given platform supports specification of launch mode.
|
* Indicates if an app on a given platform supports specification of launch mode.
|
||||||
@ -151,25 +152,25 @@ export class LaunchNavigator {
|
|||||||
* @param app {string}
|
* @param app {string}
|
||||||
* @param platform {string}
|
* @param platform {string}
|
||||||
*/
|
*/
|
||||||
@Cordova({sync: true})
|
@Cordova({ sync: true })
|
||||||
static supportsLaunchMode(app: string, platform: string): boolean {return; }
|
static supportsLaunchMode(app: string, platform: string): boolean { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates if an app on a given platform supports specification of start location.
|
* Indicates if an app on a given platform supports specification of start location.
|
||||||
* @param app {string}
|
* @param app {string}
|
||||||
* @param platform {string}
|
* @param platform {string}
|
||||||
*/
|
*/
|
||||||
@Cordova({sync: true})
|
@Cordova({ sync: true })
|
||||||
static supportsStart(app: string, platform: string): boolean {return; }
|
static supportsStart(app: string, platform: string): boolean { return; }
|
||||||
|
|
||||||
@Cordova({sync: true})
|
@Cordova({ sync: true })
|
||||||
static supportsStartName(app: string, platform: string): boolean {return; }
|
static supportsStartName(app: string, platform: string): boolean { return; }
|
||||||
|
|
||||||
@Cordova({sync: true})
|
@Cordova({ sync: true })
|
||||||
static supportsDestName(app: string, platform: string): boolean {return; }
|
static supportsDestName(app: string, platform: string): boolean { return; }
|
||||||
|
|
||||||
@Cordova({sync: true})
|
@Cordova({ sync: true })
|
||||||
static userSelect(destination: string|number[], options: LaunchNavigatorOptions): void { }
|
static userSelect(destination: string | number[], options: LaunchNavigatorOptions): void { }
|
||||||
|
|
||||||
static APP: any = {
|
static APP: any = {
|
||||||
USER_SELECT: 'user_select',
|
USER_SELECT: 'user_select',
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Local Notifications
|
* @name Local Notifications
|
||||||
* @description
|
* @description
|
||||||
@ -57,7 +59,7 @@ export class LocalNotifications {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static schedule(options?: Notification|Array<Notification>): void {}
|
static schedule(options?: Notification | Array<Notification>): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates a previously scheduled notification. Must include the id in the options parameter.
|
* Updates a previously scheduled notification. Must include the id in the options parameter.
|
||||||
@ -66,14 +68,14 @@ export class LocalNotifications {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static update(options?: Notification): void {}
|
static update(options?: Notification): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears single or multiple notifications
|
* Clears single or multiple notifications
|
||||||
* @param notificationId A single notification id, or an array of notification ids.
|
* @param notificationId A single notification id, or an array of notification ids.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static clear(notificationId: any): Promise<any> {return; }
|
static clear(notificationId: any): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears all notifications
|
* Clears all notifications
|
||||||
@ -82,14 +84,14 @@ export class LocalNotifications {
|
|||||||
successIndex: 0,
|
successIndex: 0,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
static clearAll(): Promise<any> {return; }
|
static clearAll(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cancels single or multiple notifications
|
* Cancels single or multiple notifications
|
||||||
* @param notificationId A single notification id, or an array of notification ids.
|
* @param notificationId A single notification id, or an array of notification ids.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static cancel(notificationId: any): Promise<any> {return; }
|
static cancel(notificationId: any): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cancels all notifications
|
* Cancels all notifications
|
||||||
@ -98,85 +100,85 @@ export class LocalNotifications {
|
|||||||
successIndex: 0,
|
successIndex: 0,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
static cancelAll(): Promise<any> {return; }
|
static cancelAll(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks presence of a notification
|
* Checks presence of a notification
|
||||||
* @param notificationId
|
* @param notificationId
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isPresent (notificationId: number): Promise<boolean> {return; }
|
static isPresent(notificationId: number): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks is a notification is scheduled
|
* Checks is a notification is scheduled
|
||||||
* @param notificationId
|
* @param notificationId
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isScheduled (notificationId: number): Promise<boolean> {return; }
|
static isScheduled(notificationId: number): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if a notification is triggered
|
* Checks if a notification is triggered
|
||||||
* @param notificationId
|
* @param notificationId
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isTriggered (notificationId: number): Promise<boolean> {return; }
|
static isTriggered(notificationId: number): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all the notification ids
|
* Get all the notification ids
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getAllIds (): Promise<Array<number>> {return; }
|
static getAllIds(): Promise<Array<number>> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the ids of triggered notifications
|
* Get the ids of triggered notifications
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getTriggeredIds (): Promise<Array<number>> {return; }
|
static getTriggeredIds(): Promise<Array<number>> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the ids of scheduled notifications
|
* Get the ids of scheduled notifications
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getScheduledIds (): Promise<Array<number>> {return; }
|
static getScheduledIds(): Promise<Array<number>> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a notification object
|
* Get a notification object
|
||||||
* @param notificationId The id of the notification to get
|
* @param notificationId The id of the notification to get
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static get (notificationId: any): Promise <Notification> {return; }
|
static get(notificationId: any): Promise<Notification> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a scheduled notification object
|
* Get a scheduled notification object
|
||||||
* @param notificationId The id of the notification to get
|
* @param notificationId The id of the notification to get
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getScheduled (notificationId: any): Promise <Notification> {return; }
|
static getScheduled(notificationId: any): Promise<Notification> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a triggered notification object
|
* Get a triggered notification object
|
||||||
* @param notificationId The id of the notification to get
|
* @param notificationId The id of the notification to get
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getTriggered (notificationId: any): Promise <Notification> {return; }
|
static getTriggered(notificationId: any): Promise<Notification> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all notification objects
|
* Get all notification objects
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getAll(): Promise<Array<Notification>> {return; }
|
static getAll(): Promise<Array<Notification>> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all scheduled notification objects
|
* Get all scheduled notification objects
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getAllScheduled(): Promise<Array<Notification>> {return; }
|
static getAllScheduled(): Promise<Array<Notification>> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all triggered notification objects
|
* Get all triggered notification objects
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getAllTriggered(): Promise<Array<Notification>> {return; }
|
static getAllTriggered(): Promise<Array<Notification>> { return; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -187,7 +189,7 @@ export class LocalNotifications {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static on(eventName: string, callback: any): void {}
|
static on(eventName: string, callback: any): void { }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
import {Plugin, Cordova, CordovaProperty} from './plugin';
|
import { Cordova, CordovaProperty, Plugin } from './plugin';
|
||||||
import {Observable} from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
|
|
||||||
|
|
||||||
declare var navigator: any;
|
declare var navigator: any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Media Capture
|
* @name Media Capture
|
||||||
* @description
|
* @description
|
||||||
@ -59,7 +62,7 @@ export class MediaCapture {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
static captureAudio(options?: CaptureAudioOptions): Promise<MediaFile[]|CaptureError> {return; }
|
static captureAudio(options?: CaptureAudioOptions): Promise<MediaFile[] | CaptureError> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start the camera application and return information about captured image files.
|
* Start the camera application and return information about captured image files.
|
||||||
@ -68,7 +71,7 @@ export class MediaCapture {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
static captureImage(options?: CaptureImageOptions): Promise<MediaFile[]|CaptureError> {return; }
|
static captureImage(options?: CaptureImageOptions): Promise<MediaFile[] | CaptureError> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start the video recorder application and return information about captured video clip files.
|
* Start the video recorder application and return information about captured video clip files.
|
||||||
@ -77,7 +80,7 @@ export class MediaCapture {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
static captureVideo(options?: CaptureVideoOptions): Promise<MediaFile[]|CaptureError> {return; }
|
static captureVideo(options?: CaptureVideoOptions): Promise<MediaFile[] | CaptureError> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* is fired if the capture call is successful
|
* is fired if the capture call is successful
|
||||||
@ -86,7 +89,7 @@ export class MediaCapture {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'pendingcaptureresult'
|
event: 'pendingcaptureresult'
|
||||||
})
|
})
|
||||||
static onPendingCaptureResult(): Observable<MediaFile[]> {return; }
|
static onPendingCaptureResult(): Observable<MediaFile[]> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* is fired if the capture call is unsuccessful
|
* is fired if the capture call is unsuccessful
|
||||||
@ -95,7 +98,7 @@ export class MediaCapture {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'pendingcaptureerror'
|
event: 'pendingcaptureerror'
|
||||||
})
|
})
|
||||||
static onPendingCaptureError(): Observable<CaptureError> {return; }
|
static onPendingCaptureError(): Observable<CaptureError> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
import {CordovaInstance, Plugin} from './plugin';
|
import { CordovaInstance, Plugin } from './plugin';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
|
||||||
declare var Media: any;
|
declare var Media: any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name MediaPlugin
|
* @name MediaPlugin
|
||||||
* @description
|
* @description
|
||||||
@ -85,9 +88,9 @@ export class MediaPlugin {
|
|||||||
* Open a media file
|
* Open a media file
|
||||||
* @param src {string} A URI containing the audio content.
|
* @param src {string} A URI containing the audio content.
|
||||||
*/
|
*/
|
||||||
constructor (src: string) {
|
constructor(src: string) {
|
||||||
let res, rej, next;
|
let res, rej, next;
|
||||||
this.init = new Promise<any>((resolve, reject) => {res = resolve; rej = reject; });
|
this.init = new Promise<any>((resolve, reject) => { res = resolve; rej = reject; });
|
||||||
this.status = new Observable((observer) => {
|
this.status = new Observable((observer) => {
|
||||||
next = data => observer.next(data);
|
next = data => observer.next(data);
|
||||||
});
|
});
|
||||||
@ -98,13 +101,13 @@ export class MediaPlugin {
|
|||||||
* Returns the current amplitude of the current recording.
|
* Returns the current amplitude of the current recording.
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
getCurrentAmplitude (): Promise<any> {return; }
|
getCurrentAmplitude(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the current position within an audio file. Also updates the Media object's position parameter.
|
* Returns the current position within an audio file. Also updates the Media object's position parameter.
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
getCurrentPosition (): Promise<any> {return; }
|
getCurrentPosition(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the duration of an audio file in seconds. If the duration is unknown, it returns a value of -1.
|
* Returns the duration of an audio file in seconds. If the duration is unknown, it returns a value of -1.
|
||||||
@ -112,7 +115,7 @@ export class MediaPlugin {
|
|||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
getDuration (): number {return; }
|
getDuration(): number { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts or resumes playing an audio file.
|
* Starts or resumes playing an audio file.
|
||||||
@ -120,10 +123,10 @@ export class MediaPlugin {
|
|||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
play (iosOptions?: {
|
play(iosOptions?: {
|
||||||
numberOfLoops?: number,
|
numberOfLoops?: number,
|
||||||
playAudioWhenScreenIsLocked?: boolean
|
playAudioWhenScreenIsLocked?: boolean
|
||||||
}): void {}
|
}): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pauses playing an audio file.
|
* Pauses playing an audio file.
|
||||||
@ -131,7 +134,7 @@ export class MediaPlugin {
|
|||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
pause (): void {}
|
pause(): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Releases the underlying operating system's audio resources. This is particularly important for Android, since there are a finite amount of OpenCore instances for media playback. Applications should call the release function for any Media resource that is no longer needed.
|
* Releases the underlying operating system's audio resources. This is particularly important for Android, since there are a finite amount of OpenCore instances for media playback. Applications should call the release function for any Media resource that is no longer needed.
|
||||||
@ -139,7 +142,7 @@ export class MediaPlugin {
|
|||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
release (): void {}
|
release(): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the current position within an audio file.
|
* Sets the current position within an audio file.
|
||||||
@ -148,7 +151,7 @@ export class MediaPlugin {
|
|||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
seekTo (milliseconds: number): void {}
|
seekTo(milliseconds: number): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the volume for an audio file.
|
* Set the volume for an audio file.
|
||||||
@ -157,7 +160,7 @@ export class MediaPlugin {
|
|||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
setVolume (volume: number): void {}
|
setVolume(volume: number): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts recording an audio file.
|
* Starts recording an audio file.
|
||||||
@ -165,7 +168,7 @@ export class MediaPlugin {
|
|||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
startRecord (): void {}
|
startRecord(): void { }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -174,7 +177,7 @@ export class MediaPlugin {
|
|||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
stopRecord (): void {}
|
stopRecord(): void { }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -183,17 +186,15 @@ export class MediaPlugin {
|
|||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
stop (): void {}
|
stop(): void { }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class MediaError {
|
export class MediaError {
|
||||||
static get MEDIA_ERR_ABORTED () {return 1; }
|
static get MEDIA_ERR_ABORTED() { return 1; }
|
||||||
static get MEDIA_ERR_NETWORK () {return 2; }
|
static get MEDIA_ERR_NETWORK() { return 2; }
|
||||||
static get MEDIA_ERR_DECODE () {return 3; }
|
static get MEDIA_ERR_DECODE() { return 3; }
|
||||||
static get MEDIA_ERR_NONE_SUPPORTED () {return 4; }
|
static get MEDIA_ERR_NONE_SUPPORTED() { return 4; }
|
||||||
code: number;
|
code: number;
|
||||||
message: string;
|
message: string;
|
||||||
}
|
}
|
@ -1,4 +1,6 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Native Storage
|
* @name Native Storage
|
||||||
* @description
|
* @description
|
||||||
@ -53,4 +55,5 @@ export class NativeStorage {
|
|||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static clear(): Promise<any> {return; }
|
static clear(): Promise<any> {return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import {Plugin, Cordova, CordovaProperty} from './plugin';
|
import { Cordova, CordovaProperty, Plugin } from './plugin';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
|
||||||
declare var navigator: any;
|
declare var navigator: any;
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name OneSignal
|
* @name OneSignal
|
||||||
@ -250,4 +251,5 @@ export class OneSignal {
|
|||||||
logLevel: number,
|
logLevel: number,
|
||||||
visualLevel: number
|
visualLevel: number
|
||||||
}): void { }
|
}): void { }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Pin Dialog
|
* @name Pin Dialog
|
||||||
* @description
|
* @description
|
||||||
@ -33,5 +35,6 @@ export class PinDialog {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 1
|
successIndex: 1
|
||||||
})
|
})
|
||||||
static prompt(message: string, title: string, buttons: string[]): Promise<{buttonIndex: number, input1: string}> {return; }
|
static prompt(message: string, title: string, buttons: string[]): Promise<{ buttonIndex: number, input1: string }> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {get} from '../util';
|
import { get } from '../util';
|
||||||
|
|
||||||
declare var window;
|
declare var window;
|
||||||
declare var Promise;
|
declare var Promise;
|
||||||
@ -36,7 +36,7 @@ export const cordovaWarn = function(pluginName: string, method: string) {
|
|||||||
if (method) console.warn('Native: tried calling ' + pluginName + '.' + method + ', but Cordova is not available. Make sure to include cordova.js or run in a device/simulator');
|
if (method) console.warn('Native: tried calling ' + pluginName + '.' + method + ', but Cordova is not available. Make sure to include cordova.js or run in a device/simulator');
|
||||||
else console.warn('Native: tried accessing the ' + pluginName + ' plugin but Cordova is not available. Make sure to include cordova.js or run in a device/simulator');
|
else console.warn('Native: tried accessing the ' + pluginName + ' plugin but Cordova is not available. Make sure to include cordova.js or run in a device/simulator');
|
||||||
};
|
};
|
||||||
function setIndex (args: any[], opts: any= {}, resolve?: Function, reject?: Function): any {
|
function setIndex(args: any[], opts: any = {}, resolve?: Function, reject?: Function): any {
|
||||||
// If the plugin method expects myMethod(success, err, options)
|
// If the plugin method expects myMethod(success, err, options)
|
||||||
if (opts.callbackOrder === 'reverse') {
|
if (opts.callbackOrder === 'reverse') {
|
||||||
// Get those arguments in the order [resolve, reject, ...restOfArgs]
|
// Get those arguments in the order [resolve, reject, ...restOfArgs]
|
||||||
@ -55,10 +55,10 @@ function setIndex (args: any[], opts: any= {}, resolve?: Function, reject?: Func
|
|||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
|
|
||||||
function callCordovaPlugin(pluginObj: any, methodName: string, args: any[], opts: any= {}, resolve?: Function, reject?: Function) {
|
function callCordovaPlugin(pluginObj: any, methodName: string, args: any[], opts: any = {}, resolve?: Function, reject?: Function) {
|
||||||
// Try to figure out where the success/error callbacks need to be bound
|
// Try to figure out where the success/error callbacks need to be bound
|
||||||
// to our promise resolve/reject handlers.
|
// to our promise resolve/reject handlers.
|
||||||
args = setIndex (args, opts, resolve, reject);
|
args = setIndex(args, opts, resolve, reject);
|
||||||
|
|
||||||
let pluginInstance = getPlugin(pluginObj.pluginRef);
|
let pluginInstance = getPlugin(pluginObj.pluginRef);
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ function getPromise(cb) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function wrapPromise(pluginObj: any, methodName: string, args: any[], opts: any= {}) {
|
function wrapPromise(pluginObj: any, methodName: string, args: any[], opts: any = {}) {
|
||||||
let pluginResult, rej;
|
let pluginResult, rej;
|
||||||
const p = getPromise((resolve, reject) => {
|
const p = getPromise((resolve, reject) => {
|
||||||
pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts, resolve, reject);
|
pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts, resolve, reject);
|
||||||
@ -106,7 +106,7 @@ function wrapPromise(pluginObj: any, methodName: string, args: any[], opts: any=
|
|||||||
// a warning that Cordova is undefined or the plugin is uninstalled, so there is no reason
|
// a warning that Cordova is undefined or the plugin is uninstalled, so there is no reason
|
||||||
// to error
|
// to error
|
||||||
if (pluginResult && pluginResult.error) {
|
if (pluginResult && pluginResult.error) {
|
||||||
p.catch(() => {});
|
p.catch(() => { });
|
||||||
rej(pluginResult.error);
|
rej(pluginResult.error);
|
||||||
}
|
}
|
||||||
return p;
|
return p;
|
||||||
@ -139,7 +139,7 @@ function callInstance(pluginObj: any, methodName: string, args: any[], opts: any
|
|||||||
return pluginObj._objectInstance[methodName].apply(pluginObj._objectInstance, args);
|
return pluginObj._objectInstance[methodName].apply(pluginObj._objectInstance, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
function wrapInstance (pluginObj: any, methodName: string, opts: any = {}) {
|
function wrapInstance(pluginObj: any, methodName: string, opts: any = {}) {
|
||||||
return (...args) => {
|
return (...args) => {
|
||||||
if (opts.sync) {
|
if (opts.sync) {
|
||||||
// Sync doesn't wrap the plugin with a promise or observable, it returns the result as-is
|
// Sync doesn't wrap the plugin with a promise or observable, it returns the result as-is
|
||||||
@ -172,7 +172,7 @@ function wrapInstance (pluginObj: any, methodName: string, opts: any = {}) {
|
|||||||
* @param event
|
* @param event
|
||||||
* @returns {Observable}
|
* @returns {Observable}
|
||||||
*/
|
*/
|
||||||
function wrapEventObservable (event: string): Observable<any> {
|
function wrapEventObservable(event: string): Observable<any> {
|
||||||
return new Observable(observer => {
|
return new Observable(observer => {
|
||||||
window.addEventListener(event, observer.next.bind(observer), false);
|
window.addEventListener(event, observer.next.bind(observer), false);
|
||||||
return () => window.removeEventListener(event, observer.next.bind(observer), false);
|
return () => window.removeEventListener(event, observer.next.bind(observer), false);
|
||||||
@ -288,7 +288,7 @@ export function CordovaProperty(target: Function, key: string, descriptor: Typed
|
|||||||
let pluginInstance = getPlugin(pluginObj.pluginRef);
|
let pluginInstance = getPlugin(pluginObj.pluginRef);
|
||||||
if (!pluginInstance) {
|
if (!pluginInstance) {
|
||||||
pluginWarn(this, key);
|
pluginWarn(this, key);
|
||||||
return { };
|
return {};
|
||||||
}
|
}
|
||||||
return originalMethod.apply(this, args);
|
return originalMethod.apply(this, args);
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
declare var cordova: any;
|
declare var cordova: any;
|
||||||
|
|
||||||
export interface PrintOptions {
|
export interface PrintOptions {
|
||||||
@ -61,4 +63,5 @@ export class Printer {
|
|||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static print(content: string | HTMLElement, options?: PrintOptions): Promise<any> { return; }
|
static print(content: string | HTMLElement, options?: PrintOptions): Promise<any> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
export type EventResponse = RegistrationEventResponse | NotificationEventResponse | Error;
|
export type EventResponse = RegistrationEventResponse | NotificationEventResponse | Error;
|
||||||
|
|
||||||
@ -265,7 +266,7 @@ export interface PushOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare var PushNotification: {
|
declare var PushNotification: {
|
||||||
new(): PushNotification
|
new (): PushNotification
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name SafariViewController
|
* @name SafariViewController
|
||||||
@ -50,39 +51,40 @@ export class SafariViewController {
|
|||||||
* Checks if SafariViewController is available
|
* Checks if SafariViewController is available
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isAvailable(): Promise<boolean> {return; }
|
static isAvailable(): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shows Safari View Controller
|
* Shows Safari View Controller
|
||||||
* @param options
|
* @param options
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static show(options?: SafariViewControllerOptions): Promise<any> {return; }
|
static show(options?: SafariViewControllerOptions): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hides Safari View Controller
|
* Hides Safari View Controller
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static hide(): void {}
|
static hide(): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tries to connect to the Chrome's custom tabs service. you must call this method before calling any of the other methods listed below.
|
* Tries to connect to the Chrome's custom tabs service. you must call this method before calling any of the other methods listed below.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static connectToService(): Promise<any> {return; }
|
static connectToService(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this method whenever there's a chance the user will open an external url.
|
* Call this method whenever there's a chance the user will open an external url.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static warmUp(): Promise<any> {return; }
|
static warmUp(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For even better performance optimization, call this methods if there's more than a 50% chance the user will open a certain URL.
|
* For even better performance optimization, call this methods if there's more than a 50% chance the user will open a certain URL.
|
||||||
* @param url
|
* @param url
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static mayLaunchUrl(url: string): Promise<any> {return; }
|
static mayLaunchUrl(url: string): Promise<any> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SafariViewControllerOptions {
|
export interface SafariViewControllerOptions {
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
import {Cordova, Plugin} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
declare var navigator: any;
|
declare var navigator: any;
|
||||||
|
|
||||||
@Plugin({
|
@Plugin({
|
||||||
plugin: 'https://github.com/gitawego/cordova-screenshot.git',
|
plugin: 'https://github.com/gitawego/cordova-screenshot.git',
|
||||||
pluginRef: 'navigator.screenshot',
|
pluginRef: 'navigator.screenshot',
|
||||||
@ -7,7 +10,7 @@ declare var navigator: any;
|
|||||||
})
|
})
|
||||||
export class Screenshot {
|
export class Screenshot {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Takes screenshot and saves the image
|
* Takes screenshot and saves the image
|
||||||
*
|
*
|
||||||
* @param {string} format. Format can take the value of either 'jpg' or 'png'
|
* @param {string} format. Format can take the value of either 'jpg' or 'png'
|
||||||
@ -16,14 +19,14 @@ export class Screenshot {
|
|||||||
* Default quality is set to 100.
|
* Default quality is set to 100.
|
||||||
* @param {string} filename. Name of the file as stored on the storage
|
* @param {string} filename. Name of the file as stored on the storage
|
||||||
*/
|
*/
|
||||||
static save (format?: string, quality?: number, filename?: string): Promise<any> {
|
static save(format?: string, quality?: number, filename?: string): Promise<any> {
|
||||||
return new Promise<any>(
|
return new Promise<any>(
|
||||||
(resolve, reject) => {
|
(resolve, reject) => {
|
||||||
navigator.screenshot.save(
|
navigator.screenshot.save(
|
||||||
(error, result) => {
|
(error, result) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(error);
|
reject(error);
|
||||||
}else {
|
} else {
|
||||||
resolve(result);
|
resolve(result);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -35,20 +38,20 @@ export class Screenshot {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Takes screenshot and returns the image as an URI
|
* Takes screenshot and returns the image as an URI
|
||||||
*
|
*
|
||||||
* @param {number} quality. Determines the quality of the screenshot.
|
* @param {number} quality. Determines the quality of the screenshot.
|
||||||
* Default quality is set to 100.
|
* Default quality is set to 100.
|
||||||
*/
|
*/
|
||||||
static URI (quality?: number): Promise<any> {
|
static URI(quality?: number): Promise<any> {
|
||||||
return new Promise<any>(
|
return new Promise<any>(
|
||||||
(resolve, reject) => {
|
(resolve, reject) => {
|
||||||
navigator.screenshot.URI(
|
navigator.screenshot.URI(
|
||||||
(error, result) => {
|
(error, result) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(error);
|
reject(error);
|
||||||
}else {
|
} else {
|
||||||
resolve(result);
|
resolve(result);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Sim
|
* @name Sim
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Options for sending an SMS
|
* Options for sending an SMS
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Social Sharing
|
* @name Social Sharing
|
||||||
@ -20,7 +21,6 @@ import {Plugin, Cordova} from './plugin';
|
|||||||
})
|
})
|
||||||
export class SocialSharing {
|
export class SocialSharing {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shares using the share sheet
|
* Shares using the share sheet
|
||||||
* @param message {string} The message you would like to share.
|
* @param message {string} The message you would like to share.
|
||||||
@ -29,7 +29,7 @@ export class SocialSharing {
|
|||||||
* @param url {string} A URL to share
|
* @param url {string} A URL to share
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static share (message?: string, subject?: string, file?: string|Array<string>, url?: string): Promise<any> {return; }
|
static share(message?: string, subject?: string, file?: string | Array<string>, url?: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shares using the share sheet with additional options and returns a result object or an error message (requires plugin version 5.1.0+)
|
* Shares using the share sheet with additional options and returns a result object or an error message (requires plugin version 5.1.0+)
|
||||||
@ -38,7 +38,7 @@ export class SocialSharing {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS', 'Android']
|
platforms: ['iOS', 'Android']
|
||||||
})
|
})
|
||||||
static shareWithOptions (options: { message?: string, subject?: string, file?: string|Array<string>, url?: string, chooserTitle?: string }): Promise<any> {return; }
|
static shareWithOptions(options: { message?: string, subject?: string, file?: string | Array<string>, url?: string, chooserTitle?: string }): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if you can share via a specific app.
|
* Checks if you can share via a specific app.
|
||||||
@ -47,7 +47,7 @@ export class SocialSharing {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS', 'Android']
|
platforms: ['iOS', 'Android']
|
||||||
})
|
})
|
||||||
static canShareVia (appName: string): Promise<any> {return; }
|
static canShareVia(appName: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shares directly to Twitter
|
* Shares directly to Twitter
|
||||||
@ -58,7 +58,7 @@ export class SocialSharing {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS', 'Android']
|
platforms: ['iOS', 'Android']
|
||||||
})
|
})
|
||||||
static shareViaTwitter (message: string, image?: string, url?: string): Promise<any> {return; }
|
static shareViaTwitter(message: string, image?: string, url?: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shares directly to Facebook
|
* Shares directly to Facebook
|
||||||
@ -69,7 +69,7 @@ export class SocialSharing {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS', 'Android']
|
platforms: ['iOS', 'Android']
|
||||||
})
|
})
|
||||||
static shareViaFacebook (message: string, image?: string, url?: string): Promise<any> {return; }
|
static shareViaFacebook(message: string, image?: string, url?: string): Promise<any> { return; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -82,7 +82,7 @@ export class SocialSharing {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS', 'Android']
|
platforms: ['iOS', 'Android']
|
||||||
})
|
})
|
||||||
static shareViaFacebookWithPasteMessageHint (message: string, image?: string, url?: string, pasteMessageHint?: string): Promise<any> {return; }
|
static shareViaFacebookWithPasteMessageHint(message: string, image?: string, url?: string, pasteMessageHint?: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shares directly to Instagram
|
* Shares directly to Instagram
|
||||||
@ -92,7 +92,7 @@ export class SocialSharing {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS', 'Android']
|
platforms: ['iOS', 'Android']
|
||||||
})
|
})
|
||||||
static shareViaInstagram (message: string, image: string): Promise<any> {return; }
|
static shareViaInstagram(message: string, image: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shares directly to WhatsApp
|
* Shares directly to WhatsApp
|
||||||
@ -103,7 +103,7 @@ export class SocialSharing {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS', 'Android']
|
platforms: ['iOS', 'Android']
|
||||||
})
|
})
|
||||||
static shareViaWhatsApp (message: string, image?: string, url?: string): Promise<any> {return; }
|
static shareViaWhatsApp(message: string, image?: string, url?: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shares directly to a WhatsApp Contact
|
* Shares directly to a WhatsApp Contact
|
||||||
@ -115,7 +115,7 @@ export class SocialSharing {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS', 'Android']
|
platforms: ['iOS', 'Android']
|
||||||
})
|
})
|
||||||
static shareViaWhatsAppToReceiver (receiver: string, message: string, image?: string, url?: string): Promise<any> {return; }
|
static shareViaWhatsAppToReceiver(receiver: string, message: string, image?: string, url?: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Share via SMS
|
* Share via SMS
|
||||||
@ -125,7 +125,7 @@ export class SocialSharing {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS', 'Android']
|
platforms: ['iOS', 'Android']
|
||||||
})
|
})
|
||||||
static shareViaSMS(messge: string, phoneNumber: string): Promise<any> {return; }
|
static shareViaSMS(messge: string, phoneNumber: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Share via Email
|
* Share via Email
|
||||||
@ -139,7 +139,6 @@ export class SocialSharing {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS', 'Android']
|
platforms: ['iOS', 'Android']
|
||||||
})
|
})
|
||||||
static shareViaEmail(message: string, subject: string, to: Array<string>, cc: Array<string>, bcc: Array<string>, files: string|Array<string>): Promise<any> {return; }
|
static shareViaEmail(message: string, subject: string, to: Array<string>, cc: Array<string>, bcc: Array<string>, files: string | Array<string>): Promise<any> { return; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Spinner Dialog
|
* @name Spinner Dialog
|
||||||
@ -22,7 +23,6 @@ import {Plugin, Cordova} from './plugin';
|
|||||||
})
|
})
|
||||||
export class SpinnerDialog {
|
export class SpinnerDialog {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shows the spinner dialog
|
* Shows the spinner dialog
|
||||||
* @param title {string} Spinner title (shows on Android only)
|
* @param title {string} Spinner title (shows on Android only)
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Splashscreen
|
* @name Splashscreen
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
import {CordovaInstance, Plugin, Cordova} from './plugin';
|
import { Cordova, CordovaInstance, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
declare var sqlitePlugin;
|
declare var sqlitePlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name SQLite
|
* @name SQLite
|
||||||
*
|
*
|
||||||
@ -39,7 +42,7 @@ export class SQLite {
|
|||||||
return this._objectInstance.databaseFeatures;
|
return this._objectInstance.databaseFeatures;
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor () {}
|
constructor() { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open or create a SQLite database file.
|
* Open or create a SQLite database file.
|
||||||
@ -67,7 +70,7 @@ export class SQLite {
|
|||||||
* });
|
* });
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
openDatabase (config: any): Promise<any> {
|
openDatabase(config: any): Promise<any> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
sqlitePlugin.openDatabase(config, db => {
|
sqlitePlugin.openDatabase(config, db => {
|
||||||
this._objectInstance = db;
|
this._objectInstance = db;
|
||||||
@ -82,26 +85,26 @@ export class SQLite {
|
|||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
addTransaction (transaction: any): void {}
|
addTransaction(transaction: any): void { }
|
||||||
|
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
transaction (fn: any): Promise<any> {return; }
|
transaction(fn: any): Promise<any> { return; }
|
||||||
|
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
readTransaction (fn: any): Promise<any> {return; }
|
readTransaction(fn: any): Promise<any> { return; }
|
||||||
|
|
||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
startNextTransaction (): void {}
|
startNextTransaction(): void { }
|
||||||
|
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
close (): Promise<any> {return; }
|
close(): Promise<any> { return; }
|
||||||
|
|
||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
start (): void {}
|
start(): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute SQL on the opened database. Note, you must call `openDatabase` first, and
|
* Execute SQL on the opened database. Note, you must call `openDatabase` first, and
|
||||||
@ -117,59 +120,59 @@ export class SQLite {
|
|||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
executeSql (statement: string, params: any): Promise<any> {return; }
|
executeSql(statement: string, params: any): Promise<any> { return; }
|
||||||
|
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
addSatement (sql, values): Promise<any> {return; }
|
addSatement(sql, values): Promise<any> { return; }
|
||||||
|
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
sqlBatch (sqlStatements: any): Promise<any> {return; }
|
sqlBatch(sqlStatements: any): Promise<any> { return; }
|
||||||
|
|
||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
abortallPendingTransactions (): void {}
|
abortallPendingTransactions(): void { }
|
||||||
|
|
||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
handleStatementSuccess (handler, response): void {}
|
handleStatementSuccess(handler, response): void { }
|
||||||
|
|
||||||
|
|
||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
handleStatementFailure (handler, response): void {}
|
handleStatementFailure(handler, response): void { }
|
||||||
|
|
||||||
|
|
||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
run (): void {}
|
run(): void { }
|
||||||
|
|
||||||
|
|
||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
abort (txFailure): void {}
|
abort(txFailure): void { }
|
||||||
|
|
||||||
|
|
||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
finish (): void {}
|
finish(): void { }
|
||||||
|
|
||||||
|
|
||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
abortFromQ (sqlerror): void {}
|
abortFromQ(sqlerror): void { }
|
||||||
|
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static echoTest (): Promise<any> {return; }
|
static echoTest(): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static deleteDatabase (first): Promise<any> {return; }
|
static deleteDatabase(first): Promise<any> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova, CordovaProperty} from './plugin';
|
import { Cordova, CordovaProperty, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
declare var window;
|
declare var window;
|
||||||
|
|
||||||
@ -37,7 +38,7 @@ export class StatusBar {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static overlaysWebView(doesOverlay: boolean) {};
|
static overlaysWebView(doesOverlay: boolean) { };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the default statusbar (dark text, for light backgrounds).
|
* Use the default statusbar (dark text, for light backgrounds).
|
||||||
@ -45,7 +46,7 @@ export class StatusBar {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static styleDefault() {};
|
static styleDefault() { };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the lightContent statusbar (light text, for dark backgrounds).
|
* Use the lightContent statusbar (light text, for dark backgrounds).
|
||||||
@ -53,7 +54,7 @@ export class StatusBar {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static styleLightContent() {};
|
static styleLightContent() { };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the blackTranslucent statusbar (light text, for dark backgrounds).
|
* Use the blackTranslucent statusbar (light text, for dark backgrounds).
|
||||||
@ -61,7 +62,7 @@ export class StatusBar {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static styleBlackTranslucent() {};
|
static styleBlackTranslucent() { };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use the blackOpaque statusbar (light text, for dark backgrounds).
|
* Use the blackOpaque statusbar (light text, for dark backgrounds).
|
||||||
@ -69,7 +70,7 @@ export class StatusBar {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static styleBlackOpaque() {};
|
static styleBlackOpaque() { };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the status bar to a specific named color. Valid options:
|
* Set the status bar to a specific named color. Valid options:
|
||||||
@ -82,7 +83,7 @@ export class StatusBar {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static backgroundColorByName(colorName: string) {};
|
static backgroundColorByName(colorName: string) { };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the status bar to a specific hex color (CSS shorthand supported!).
|
* Set the status bar to a specific hex color (CSS shorthand supported!).
|
||||||
@ -94,7 +95,7 @@ export class StatusBar {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static backgroundColorByHexString(hexString: string) {};
|
static backgroundColorByHexString(hexString: string) { };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hide the StatusBar
|
* Hide the StatusBar
|
||||||
@ -102,7 +103,7 @@ export class StatusBar {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static hide() {};
|
static hide() { };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the StatusBar
|
* Show the StatusBar
|
||||||
@ -110,11 +111,12 @@ export class StatusBar {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static show() {};
|
static show() { };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the StatusBar is currently visible or not.
|
* Whether the StatusBar is currently visible or not.
|
||||||
*/
|
*/
|
||||||
@CordovaProperty
|
@CordovaProperty
|
||||||
static get isVisible() { return window.StatusBar.isVisible; }
|
static get isVisible() { return window.StatusBar.isVisible; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
|
||||||
export interface ToastOptions {
|
export interface ToastOptions {
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name TouchID
|
* @name TouchID
|
||||||
@ -82,4 +83,5 @@ export class TouchID {
|
|||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static verifyFingerprintWithCustomPasswordFallbackAndEnterPasswordLabel(message: string, enterPasswordLabel: string): Promise<any> { return; }
|
static verifyFingerprintWithCustomPasswordFallbackAndEnterPasswordLabel(message: string, enterPasswordLabel: string): Promise<any> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Vibration
|
* @name Vibration
|
||||||
* @description Vibrates the device
|
* @description Vibrates the device
|
||||||
@ -37,6 +39,6 @@ export class Vibration {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static vibrate(time: number|Array<number>) {}
|
static vibrate(time: number | Array<number>) { }
|
||||||
|
|
||||||
}
|
}
|
@ -1,5 +1,8 @@
|
|||||||
import {Cordova, CordovaProperty, Plugin} from './plugin';
|
import { Cordova, CordovaProperty, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
declare var window;
|
declare var window;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name WebIntent
|
* @name WebIntent
|
||||||
* @description
|
* @description
|
||||||
@ -15,31 +18,31 @@ declare var window;
|
|||||||
export class WebIntent {
|
export class WebIntent {
|
||||||
|
|
||||||
@CordovaProperty
|
@CordovaProperty
|
||||||
static get ACTION_VIEW () {
|
static get ACTION_VIEW() {
|
||||||
return window.plugins.webintent.ACTION_VIEW;
|
return window.plugins.webintent.ACTION_VIEW;
|
||||||
}
|
}
|
||||||
|
|
||||||
@CordovaProperty
|
@CordovaProperty
|
||||||
static get EXTRA_TEXT () {
|
static get EXTRA_TEXT() {
|
||||||
return window.plugins.webintent.EXTRA_TEXT;
|
return window.plugins.webintent.EXTRA_TEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static startActivity (options: {action: any, url: string}): Promise<any> {return; }
|
static startActivity(options: { action: any, url: string }): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static hasExtra (extra: any): Promise<any> {return; }
|
static hasExtra(extra: any): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getExtra (extra: any): Promise<any> {return; }
|
static getExtra(extra: any): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getUri (): Promise<string> {return; };
|
static getUri(): Promise<string> { return; };
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static onNewIntent(): Promise<string> {return; };
|
static onNewIntent(): Promise<string> { return; };
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static sendBroadcast(options: {action: string, extras?: {option: boolean}}): Promise<any> {return; }
|
static sendBroadcast(options: { action: string, extras?: { option: boolean } }): Promise<any> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user