Merge branch 'master' into patch-1
This commit is contained in:
commit
00e42438aa
@ -21,7 +21,7 @@ export interface ActionSheetOptions {
|
|||||||
/**
|
/**
|
||||||
* Theme to be used on Android
|
* Theme to be used on Android
|
||||||
*/
|
*/
|
||||||
androidTheme?: number;
|
androidTheme?: 1 | 2 | 3 | 4 | 5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable a cancel on Android
|
* Enable a cancel on Android
|
||||||
@ -46,7 +46,7 @@ export interface ActionSheetOptions {
|
|||||||
/**
|
/**
|
||||||
* On an iPad, set the X,Y position
|
* On an iPad, set the X,Y position
|
||||||
*/
|
*/
|
||||||
position?: number[];
|
position?: [number, number];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Choose if destructive button will be the last
|
* Choose if destructive button will be the last
|
||||||
@ -123,7 +123,7 @@ export class ActionSheet extends IonicNativePlugin {
|
|||||||
* button pressed (1 based, so 1, 2, 3, etc.)
|
* button pressed (1 based, so 1, 2, 3, etc.)
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
show(options?: ActionSheetOptions): Promise<any> { return; }
|
show(options?: ActionSheetOptions): Promise<number> { return; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,8 +14,6 @@ export enum AndroidSystemUiFlags {
|
|||||||
HideNavigation = 2,
|
HideNavigation = 2,
|
||||||
/** View has requested to go into the normal fullscreen mode so that its content can take over the screen while still allowing the user to interact with the application. SYSTEM_UI_FLAG_FULLSCREEN */
|
/** View has requested to go into the normal fullscreen mode so that its content can take over the screen while still allowing the user to interact with the application. SYSTEM_UI_FLAG_FULLSCREEN */
|
||||||
Fullscreen = 4,
|
Fullscreen = 4,
|
||||||
/** Requests the navigation bar to draw in a mode that is compatible with light navigation bar backgrounds. SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR */
|
|
||||||
LightNavigationBar = 16,
|
|
||||||
/** When using other layout flags, we would like a stable view of the content insets given to fitSystemWindows(Rect). SYSTEM_UI_FLAG_LAYOUT_STABLE */
|
/** When using other layout flags, we would like a stable view of the content insets given to fitSystemWindows(Rect). SYSTEM_UI_FLAG_LAYOUT_STABLE */
|
||||||
LayoutStable = 256,
|
LayoutStable = 256,
|
||||||
/** View would like its window to be laid out as if it has requested SYSTEM_UI_FLAG_HIDE_NAVIGATION, even if it currently hasn't. SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION */
|
/** View would like its window to be laid out as if it has requested SYSTEM_UI_FLAG_HIDE_NAVIGATION, even if it currently hasn't. SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION */
|
||||||
@ -45,8 +43,8 @@ export enum AndroidSystemUiFlags {
|
|||||||
* ...
|
* ...
|
||||||
*
|
*
|
||||||
* this.androidFullScreen.isImmersiveModeSupported()
|
* this.androidFullScreen.isImmersiveModeSupported()
|
||||||
* .then(() => this.androidFullScreen.immersiveMode())
|
* .then(() => console.log('Immersive mode supported'))
|
||||||
* .catch((error: any) => console.log(error));
|
* .catch(err => console.log(error));
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
|
|
||||||
export interface AppRatePreferences {
|
export interface AppRatePreferences {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom BCP 47 language tag
|
* Custom BCP 47 language tag
|
||||||
*/
|
*/
|
||||||
@ -41,7 +40,7 @@ export interface AppRatePreferences {
|
|||||||
/**
|
/**
|
||||||
* Custom locale object
|
* Custom locale object
|
||||||
*/
|
*/
|
||||||
customLocale?: any;
|
customLocale?: AppRateCustomLocale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callbacks for events
|
* Callbacks for events
|
||||||
@ -52,11 +51,38 @@ export interface AppRatePreferences {
|
|||||||
* App Store URLS
|
* App Store URLS
|
||||||
*/
|
*/
|
||||||
storeAppURL?: AppUrls;
|
storeAppURL?: AppUrls;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AppRateCustomLocale {
|
||||||
|
/** Title */
|
||||||
|
title?: string;
|
||||||
|
|
||||||
|
/** Message */
|
||||||
|
message?: string;
|
||||||
|
|
||||||
|
/** Cancel button label */
|
||||||
|
cancelButtonLabel?: string;
|
||||||
|
|
||||||
|
/** Later button label */
|
||||||
|
laterButtonLabel?: string;
|
||||||
|
|
||||||
|
/** Rate button label */
|
||||||
|
rateButtonLabel?: string;
|
||||||
|
|
||||||
|
/** Yes button label */
|
||||||
|
yesButtonLabel?: string;
|
||||||
|
|
||||||
|
/** No button label */
|
||||||
|
noButtonLabel?: string;
|
||||||
|
|
||||||
|
/** App rate promt title */
|
||||||
|
appRatePromptTitle?: string;
|
||||||
|
|
||||||
|
/** Feedback prompt title */
|
||||||
|
feedbackPromptTitle?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AppRateCallbacks {
|
export interface AppRateCallbacks {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* call back function. called when user clicked on rate-dialog buttons
|
* call back function. called when user clicked on rate-dialog buttons
|
||||||
*/
|
*/
|
||||||
@ -70,11 +96,9 @@ export interface AppRateCallbacks {
|
|||||||
* call back function. called when user clicked on negative feedback
|
* call back function. called when user clicked on negative feedback
|
||||||
*/
|
*/
|
||||||
handleNegativeFeedback?: Function;
|
handleNegativeFeedback?: Function;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AppUrls {
|
export interface AppUrls {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* application id in AppStore
|
* application id in AppStore
|
||||||
*/
|
*/
|
||||||
@ -99,7 +123,6 @@ export interface AppUrls {
|
|||||||
* application URL in WindowsStore
|
* application URL in WindowsStore
|
||||||
*/
|
*/
|
||||||
windows8?: string;
|
windows8?: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -142,6 +165,7 @@ export interface AppUrls {
|
|||||||
* AppRatePreferences
|
* AppRatePreferences
|
||||||
* AppUrls
|
* AppUrls
|
||||||
* AppRateCallbacks
|
* AppRateCallbacks
|
||||||
|
* AppRateCustomLocal
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
@ -153,25 +177,22 @@ export interface AppUrls {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AppRate extends IonicNativePlugin {
|
export class AppRate extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configure various settings for the Rating View.
|
* Configure various settings for the Rating View.
|
||||||
* See table below for options
|
* See table below for options
|
||||||
*/
|
*/
|
||||||
@CordovaProperty
|
@CordovaProperty preferences: AppRatePreferences;
|
||||||
preferences: AppRatePreferences;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prompts the user for rating
|
* Prompts the user for rating
|
||||||
* @param {boolean} immediately Show the rating prompt immediately.
|
* @param {boolean} immediately Show the rating prompt immediately.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
promptForRating(immediately: boolean): void { };
|
promptForRating(immediately: boolean): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Immediately send the user to the app store rating page
|
* Immediately send the user to the app store rating page
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
navigateToAppStore(): void { };
|
navigateToAppStore(): void {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
|
|
||||||
|
export interface AppUpdateOptions {
|
||||||
|
authType: string;
|
||||||
|
username?: string;
|
||||||
|
password?: string;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name App Update
|
* @name App Update
|
||||||
@ -24,13 +30,15 @@ import { Injectable } from '@angular/core';
|
|||||||
*
|
*
|
||||||
* constructor(private appUpdate: AppUpdate) {
|
* constructor(private appUpdate: AppUpdate) {
|
||||||
*
|
*
|
||||||
* const updateUrl = 'http://your-remote-api.com/update.xml';
|
* const updateUrl = 'https://your-remote-api.com/update.xml';
|
||||||
* this.appUpdate.checkAppUpdate(updateUrl);
|
* this.appUpdate.checkAppUpdate(updateUrl).then(() => { console.log('Update available') });
|
||||||
*
|
*
|
||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* The plugin will compare the app version and update it automatically if the API has a newer version to install.
|
* The plugin will compare the app version and update it automatically if the API has a newer version to install.
|
||||||
|
* @interfaces
|
||||||
|
* AppUpdateOptions
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'AppUpdate',
|
pluginName: 'AppUpdate',
|
||||||
@ -49,5 +57,7 @@ export class AppUpdate extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
checkAppUpdate(updateUrl: string): Promise<any> { return; }
|
checkAppUpdate(updateUrl: string, options?: AppUpdateOptions): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,30 +38,30 @@ export class AppVersion extends IonicNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the app
|
* Returns the name of the app
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getAppName(): Promise<any> { return; }
|
getAppName(): Promise<string> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the package name of the app
|
* Returns the package name of the app
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getPackageName(): Promise<any> { return; }
|
getPackageName(): Promise<string> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the build identifier of the app
|
* Returns the build identifier of the app
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getVersionCode(): Promise<any> { return; }
|
getVersionCode(): Promise<string> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the version of the app
|
* Returns the version of the app
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getVersionNumber(): Promise<any> { return; }
|
getVersionNumber(): Promise<string> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,21 +2,19 @@ import { Injectable } from '@angular/core';
|
|||||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configurations items that can be updated.
|
* Configurations items that can be updated.
|
||||||
*/
|
*/
|
||||||
export interface BackgroundModeConfiguration {
|
export interface BackgroundModeConfiguration {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Title of the background task
|
* Title of the background task
|
||||||
*/
|
*/
|
||||||
title?: String;
|
title?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of background task
|
* Description of background task
|
||||||
*/
|
*/
|
||||||
text?: String;
|
text?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This will look for `<icon name>.png` in platforms/android/res/drawable|mipmap
|
* This will look for `<icon name>.png` in platforms/android/res/drawable|mipmap
|
||||||
@ -29,7 +27,7 @@ export interface BackgroundModeConfiguration {
|
|||||||
color?: string;
|
color?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* By default the app will come to foreground when taping on the notification. If false, plugin won't come to foreground when tapped.
|
* By default the app will come to foreground when tapping on the notification. If false, plugin won't come to foreground when tapped.
|
||||||
*/
|
*/
|
||||||
resume?: boolean;
|
resume?: boolean;
|
||||||
|
|
||||||
@ -38,18 +36,18 @@ export interface BackgroundModeConfiguration {
|
|||||||
*/
|
*/
|
||||||
hidden?: boolean;
|
hidden?: boolean;
|
||||||
|
|
||||||
|
/** Big text */
|
||||||
bigText?: boolean;
|
bigText?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The text that scrolls itself on statusbar
|
* The text that scrolls itself on statusbar
|
||||||
*/
|
*/
|
||||||
ticker?: String;
|
ticker?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* if true plugin will not display a notification. Default is false.
|
* if true plugin will not display a notification. Default is false.
|
||||||
*/
|
*/
|
||||||
silent?: boolean;
|
silent?: boolean;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -80,7 +78,6 @@ export interface BackgroundModeConfiguration {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class BackgroundMode extends IonicNativePlugin {
|
export class BackgroundMode extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable the background mode.
|
* Enable the background mode.
|
||||||
* Once called, prevents the app from being paused while in background.
|
* Once called, prevents the app from being paused while in background.
|
||||||
@ -95,7 +92,9 @@ export class BackgroundMode extends IonicNativePlugin {
|
|||||||
* 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()
|
||||||
disable(): Promise<any> { return; }
|
disable(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if background mode is enabled or not.
|
* Checks if background mode is enabled or not.
|
||||||
@ -104,7 +103,9 @@ export class BackgroundMode extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
isEnabled(): boolean { return; }
|
isEnabled(): 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.
|
||||||
@ -113,7 +114,9 @@ export class BackgroundMode extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
isActive(): boolean { return; }
|
isActive(): boolean {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the default title, ticker and text.
|
* Override the default title, ticker and text.
|
||||||
@ -123,7 +126,9 @@ export class BackgroundMode extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android']
|
platforms: ['Android']
|
||||||
})
|
})
|
||||||
setDefaults(options?: BackgroundModeConfiguration): Promise<any> { return; }
|
setDefaults(options?: BackgroundModeConfiguration): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Modify the displayed information.
|
* Modify the displayed information.
|
||||||
@ -146,7 +151,9 @@ export class BackgroundMode extends IonicNativePlugin {
|
|||||||
clearFunction: 'un',
|
clearFunction: 'un',
|
||||||
clearWithArgs: true
|
clearWithArgs: true
|
||||||
})
|
})
|
||||||
on(event: string): Observable<any> { return; }
|
on(event: string): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Android allows to programmatically move from foreground to background.
|
* Android allows to programmatically move from foreground to background.
|
||||||
@ -199,7 +206,9 @@ export class BackgroundMode extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android']
|
platforms: ['Android']
|
||||||
})
|
})
|
||||||
isScreenOff(): Promise<boolean> { return; }
|
isScreenOff(): Promise<boolean> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turn screen on
|
* Turn screen on
|
||||||
@ -218,5 +227,4 @@ export class BackgroundMode extends IonicNativePlugin {
|
|||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
unlock(): void {}
|
unlock(): void {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Badge
|
* @name Badge
|
||||||
* @description
|
* @description
|
||||||
@ -31,13 +30,14 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Badge extends IonicNativePlugin {
|
export class Badge extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear the badge of the app icon.
|
* Clear the badge of the app icon.
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
clear(): Promise<boolean> { return; }
|
clear(): Promise<boolean> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the badge of the app icon.
|
* Set the badge of the app icon.
|
||||||
@ -45,14 +45,18 @@ export class Badge extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
set(badgeNumber: number): Promise<any> { return; }
|
set(badgeNumber: number): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the badge of the app icon.
|
* Get the badge of the app icon.
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
get(): Promise<any> { return; }
|
get(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Increase the badge number.
|
* Increase the badge number.
|
||||||
@ -60,7 +64,9 @@ export class Badge extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
increase(increaseBy: number): Promise<any> { return; }
|
increase(increaseBy: number): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decrease the badge number.
|
* Decrease the badge number.
|
||||||
@ -68,20 +74,34 @@ export class Badge extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
decrease(decreaseBy: number): Promise<any> { return; }
|
decrease(decreaseBy: number): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check support to show badges.
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
isSupported(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if the app has permission to show badges.
|
* Determine if the app has permission to show badges.
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
hasPermission(): Promise<any> { return; }
|
hasPermission(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register permission to set badge notifications
|
* Register permission to set badge notifications
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
registerPermission(): Promise<any> { return; }
|
registerPermission(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
|
|
||||||
export interface BarcodeScannerOptions {
|
export interface BarcodeScannerOptions {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prefer front camera. Supported on iOS and Android.
|
* Prefer front camera. Supported on iOS and Android.
|
||||||
*/
|
*/
|
||||||
@ -52,11 +51,26 @@ export interface BarcodeScannerOptions {
|
|||||||
* Display scanned text for X ms. 0 suppresses it entirely, default 1500. Supported on Android only.
|
* Display scanned text for X ms. 0 suppresses it entirely, default 1500. Supported on Android only.
|
||||||
*/
|
*/
|
||||||
resultDisplayDuration?: number;
|
resultDisplayDuration?: number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BarcodeScanResult {
|
export interface BarcodeScanResult {
|
||||||
format: 'QR_CODE' | 'DATA_MATRIX' | 'UPC_E' | 'UPC_A' | 'EAN_8' | 'EAN_13' | 'CODE_128' | 'CODE_39' | 'CODE_93' | 'CODABAR' | 'ITF' | 'RSS14' | 'RSS_EXPANDED' | 'PDF417' | 'AZTEC' | 'MSI';
|
format:
|
||||||
|
| 'QR_CODE'
|
||||||
|
| 'DATA_MATRIX'
|
||||||
|
| 'UPC_E'
|
||||||
|
| 'UPC_A'
|
||||||
|
| 'EAN_8'
|
||||||
|
| 'EAN_13'
|
||||||
|
| 'CODE_128'
|
||||||
|
| 'CODE_39'
|
||||||
|
| 'CODE_93'
|
||||||
|
| 'CODABAR'
|
||||||
|
| 'ITF'
|
||||||
|
| 'RSS14'
|
||||||
|
| 'RSS_EXPANDED'
|
||||||
|
| 'PDF417'
|
||||||
|
| 'AZTEC'
|
||||||
|
| 'MSI';
|
||||||
cancelled: boolean;
|
cancelled: boolean;
|
||||||
text: string;
|
text: string;
|
||||||
}
|
}
|
||||||
@ -77,10 +91,10 @@ export interface BarcodeScanResult {
|
|||||||
* ...
|
* ...
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* this.barcodeScanner.scan().then((barcodeData) => {
|
* this.barcodeScanner.scan().then(barcodeData => {
|
||||||
* // Success! Barcode data is here
|
* console.log('Barcode data', barcodeData);
|
||||||
* }, (err) => {
|
* }).catch(err => {
|
||||||
* // An error occurred
|
* console.log('Error', err);
|
||||||
* });
|
* });
|
||||||
* ```
|
* ```
|
||||||
* @interfaces
|
* @interfaces
|
||||||
@ -96,7 +110,6 @@ export interface BarcodeScanResult {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class BarcodeScanner extends IonicNativePlugin {
|
export class BarcodeScanner extends IonicNativePlugin {
|
||||||
|
|
||||||
Encode: {
|
Encode: {
|
||||||
TEXT_TYPE: string;
|
TEXT_TYPE: string;
|
||||||
EMAIL_TYPE: string;
|
EMAIL_TYPE: string;
|
||||||
@ -117,7 +130,9 @@ export class BarcodeScanner extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
scan(options?: BarcodeScannerOptions): Promise<BarcodeScanResult> { return; }
|
scan(options?: BarcodeScannerOptions): Promise<BarcodeScanResult> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encodes data into a barcode.
|
* Encodes data into a barcode.
|
||||||
@ -127,6 +142,7 @@ export class BarcodeScanner extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
encode(type: string, data: any): Promise<any> { return; }
|
encode(type: string, data: any): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,15 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
|
|
||||||
|
export interface Base64ToGalleryOptions {
|
||||||
|
/** Saved file name prefix */
|
||||||
|
prefix: string;
|
||||||
|
/**
|
||||||
|
* On Android runs Media Scanner after file creation.
|
||||||
|
* On iOS if true the file will be added to camera roll, otherwise will be saved to a library folder.
|
||||||
|
*/
|
||||||
|
mediaScanner: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Base64 To Gallery
|
* @name Base64 To Gallery
|
||||||
@ -19,6 +29,8 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
* err => console.log('Error saving image to gallery ', err)
|
* err => console.log('Error saving image to gallery ', err)
|
||||||
* );
|
* );
|
||||||
* ```
|
* ```
|
||||||
|
* @interfaces
|
||||||
|
* Base64ToGalleryOptions
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'Base64ToGallery',
|
pluginName: 'Base64ToGallery',
|
||||||
@ -29,19 +41,20 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Base64ToGallery extends IonicNativePlugin {
|
export class Base64ToGallery extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 {any} [options] An object with properties: prefix: string, mediaScanner: boolean. Prefix will be prepended to the filename. If true, mediaScanner runs Media Scanner on Android and saves to Camera Roll on iOS; if false, saves to Library folder on iOS.
|
* @param {any} [options] An object with properties
|
||||||
* @returns {Promise<any>} returns a promise that resolves when the image is saved.
|
* @returns {Promise<any>} returns a promise that resolves when the image is saved.
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 2,
|
successIndex: 2,
|
||||||
errorIndex: 3
|
errorIndex: 3
|
||||||
})
|
})
|
||||||
base64ToGallery(data: string, options?: { prefix?: string; mediaScanner?: boolean }): Promise<any> {
|
base64ToGallery(
|
||||||
|
data: string,
|
||||||
|
options?: Base64ToGalleryOptions
|
||||||
|
): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
export interface BatteryStatusResponse {
|
export interface BatteryStatusResponse {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The battery charge percentage
|
* The battery charge percentage
|
||||||
*/
|
*/
|
||||||
@ -13,7 +12,6 @@ export interface BatteryStatusResponse {
|
|||||||
* A boolean that indicates whether the device is plugged in
|
* A boolean that indicates whether the device is plugged in
|
||||||
*/
|
*/
|
||||||
isPlugged: boolean;
|
isPlugged: boolean;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -31,11 +29,9 @@ export interface BatteryStatusResponse {
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* // watch change in battery status
|
* // watch change in battery status
|
||||||
* let subscription = this.batteryStatus.onChange().subscribe(
|
* const subscription = this.batteryStatus.onChange().subscribe(status => {
|
||||||
* (status: BatteryStatusResponse) => {
|
|
||||||
* console.log(status.level, status.isPlugged);
|
* console.log(status.level, status.isPlugged);
|
||||||
* }
|
* });
|
||||||
* );
|
|
||||||
*
|
*
|
||||||
* // stop watch
|
* // stop watch
|
||||||
* subscription.unsubscribe();
|
* subscription.unsubscribe();
|
||||||
@ -53,7 +49,6 @@ export interface BatteryStatusResponse {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class BatteryStatus extends IonicNativePlugin {
|
export class BatteryStatus extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Watch the change in battery level
|
* Watch the change in battery level
|
||||||
* @returns {Observable<BatteryStatusResponse>} Returns an observable that pushes a status object
|
* @returns {Observable<BatteryStatusResponse>} Returns an observable that pushes a status object
|
||||||
@ -62,7 +57,9 @@ export class BatteryStatus extends IonicNativePlugin {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'batterystatus'
|
event: 'batterystatus'
|
||||||
})
|
})
|
||||||
onChange(): Observable<BatteryStatusResponse> { return; }
|
onChange(): Observable<BatteryStatusResponse> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Watch when the battery level goes low
|
* Watch when the battery level goes low
|
||||||
@ -72,7 +69,9 @@ export class BatteryStatus extends IonicNativePlugin {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'batterylow'
|
event: 'batterylow'
|
||||||
})
|
})
|
||||||
onLow(): Observable<BatteryStatusResponse> { return; }
|
onLow(): Observable<BatteryStatusResponse> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Watch when the battery level goes to critial
|
* Watch when the battery level goes to critial
|
||||||
@ -82,6 +81,7 @@ export class BatteryStatus extends IonicNativePlugin {
|
|||||||
eventObservable: true,
|
eventObservable: true,
|
||||||
event: 'batterycritical'
|
event: 'batterycritical'
|
||||||
})
|
})
|
||||||
onCritical(): Observable<BatteryStatusResponse> { return; }
|
onCritical(): Observable<BatteryStatusResponse> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
export interface BLEScanOptions {
|
||||||
|
/** true if duplicate devices should be reported, false (default) if devices should only be reported once. */
|
||||||
|
reportDuplicates?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name BLE
|
* @name BLE
|
||||||
* @description
|
* @description
|
||||||
@ -167,6 +172,8 @@ import { Observable } from 'rxjs/Observable';
|
|||||||
*
|
*
|
||||||
* UUIDs are always strings and not numbers. Some 16-bit UUIDs, such as '2220' look like integers, but they're not. (The integer 2220 is 0x8AC in hex.) This isn't a problem with 128 bit UUIDs since they look like strings 82b9e6e1-593a-456f-be9b-9215160ebcac. All 16-bit UUIDs should also be passed to methods as strings.
|
* UUIDs are always strings and not numbers. Some 16-bit UUIDs, such as '2220' look like integers, but they're not. (The integer 2220 is 0x8AC in hex.) This isn't a problem with 128 bit UUIDs since they look like strings 82b9e6e1-593a-456f-be9b-9215160ebcac. All 16-bit UUIDs should also be passed to methods as strings.
|
||||||
*
|
*
|
||||||
|
* @interfaces
|
||||||
|
* BLEScanOptions
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'BLE',
|
pluginName: 'BLE',
|
||||||
@ -177,7 +184,6 @@ import { Observable } from 'rxjs/Observable';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class BLE extends IonicNativePlugin {
|
export class BLE extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scan and discover BLE peripherals for the specified amount of time.
|
* Scan and discover BLE peripherals for the specified amount of time.
|
||||||
*
|
*
|
||||||
@ -194,7 +200,9 @@ export class BLE extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
scan(services: string[], seconds: number): Observable<any> { return; }
|
scan(services: string[], seconds: number): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scan and discover BLE peripherals until `stopScan` is called.
|
* Scan and discover BLE peripherals until `stopScan` is called.
|
||||||
@ -217,7 +225,9 @@ export class BLE extends IonicNativePlugin {
|
|||||||
clearFunction: 'stopScan',
|
clearFunction: 'stopScan',
|
||||||
clearWithArgs: false
|
clearWithArgs: false
|
||||||
})
|
})
|
||||||
startScan(services: string[]): Observable<any> { return; }
|
startScan(services: string[]): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scans for BLE devices. This function operates similarly to the `startScan` function, but allows you to specify extra options (like allowing duplicate device reports).
|
* Scans for BLE devices. This function operates similarly to the `startScan` function, but allows you to specify extra options (like allowing duplicate device reports).
|
||||||
@ -230,7 +240,12 @@ export class BLE extends IonicNativePlugin {
|
|||||||
clearFunction: 'stopScan',
|
clearFunction: 'stopScan',
|
||||||
clearWithArgs: false
|
clearWithArgs: false
|
||||||
})
|
})
|
||||||
startScanWithOptions(services: string[], options: { reportDuplicates?: boolean } | any): Observable<any> { return; }
|
startScanWithOptions(
|
||||||
|
services: string[],
|
||||||
|
options: BLEScanOptions
|
||||||
|
): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop a scan started by `startScan`.
|
* Stop a scan started by `startScan`.
|
||||||
@ -247,7 +262,9 @@ export class BLE extends IonicNativePlugin {
|
|||||||
* @return returns a Promise.
|
* @return returns a Promise.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
stopScan(): Promise<any> { return; }
|
stopScan(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to a peripheral.
|
* Connect to a peripheral.
|
||||||
@ -268,7 +285,9 @@ export class BLE extends IonicNativePlugin {
|
|||||||
clearFunction: 'disconnect',
|
clearFunction: 'disconnect',
|
||||||
clearWithArgs: true
|
clearWithArgs: true
|
||||||
})
|
})
|
||||||
connect(deviceId: string): Observable<any> { return; }
|
connect(deviceId: string): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disconnect from a peripheral.
|
* Disconnect from a peripheral.
|
||||||
@ -282,7 +301,9 @@ export class BLE extends IonicNativePlugin {
|
|||||||
* @return Returns a Promise
|
* @return Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
disconnect(deviceId: string): Promise<any> { return; }
|
disconnect(deviceId: string): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read the value of a characteristic.
|
* Read the value of a characteristic.
|
||||||
@ -297,7 +318,9 @@ export class BLE extends IonicNativePlugin {
|
|||||||
deviceId: string,
|
deviceId: string,
|
||||||
serviceUUID: string,
|
serviceUUID: string,
|
||||||
characteristicUUID: string
|
characteristicUUID: string
|
||||||
): Promise<any> { return; };
|
): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write the value of a characteristic.
|
* Write the value of a characteristic.
|
||||||
@ -333,7 +356,9 @@ export class BLE extends IonicNativePlugin {
|
|||||||
serviceUUID: string,
|
serviceUUID: string,
|
||||||
characteristicUUID: string,
|
characteristicUUID: string,
|
||||||
value: ArrayBuffer
|
value: ArrayBuffer
|
||||||
): Promise<any> { return; }
|
): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write the value of a characteristic without waiting for confirmation from the peripheral.
|
* Write the value of a characteristic without waiting for confirmation from the peripheral.
|
||||||
@ -350,7 +375,9 @@ export class BLE extends IonicNativePlugin {
|
|||||||
serviceUUID: string,
|
serviceUUID: string,
|
||||||
characteristicUUID: string,
|
characteristicUUID: string,
|
||||||
value: ArrayBuffer
|
value: ArrayBuffer
|
||||||
): Promise<any> { return; }
|
): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register to be notified when the value of a characteristic changes.
|
* Register to be notified when the value of a characteristic changes.
|
||||||
@ -376,7 +403,9 @@ export class BLE extends IonicNativePlugin {
|
|||||||
deviceId: string,
|
deviceId: string,
|
||||||
serviceUUID: string,
|
serviceUUID: string,
|
||||||
characteristicUUID: string
|
characteristicUUID: string
|
||||||
): Observable<any> { return; }
|
): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop being notified when the value of a characteristic changes.
|
* Stop being notified when the value of a characteristic changes.
|
||||||
@ -391,7 +420,9 @@ export class BLE extends IonicNativePlugin {
|
|||||||
deviceId: string,
|
deviceId: string,
|
||||||
serviceUUID: string,
|
serviceUUID: string,
|
||||||
characteristicUUID: string
|
characteristicUUID: string
|
||||||
): Promise<any> { return; }
|
): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Report the connection status.
|
* Report the connection status.
|
||||||
@ -407,7 +438,9 @@ export class BLE extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
isConnected(deviceId: string): Promise<any> { return; }
|
isConnected(deviceId: string): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Report if bluetooth is enabled.
|
* Report if bluetooth is enabled.
|
||||||
@ -415,7 +448,9 @@ export class BLE extends IonicNativePlugin {
|
|||||||
* @returns {Promise<void>} Returns a Promise that resolves if Bluetooth is enabled, and rejects if disabled.
|
* @returns {Promise<void>} Returns a Promise that resolves if Bluetooth is enabled, and rejects if disabled.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
isEnabled(): Promise<void> { return; }
|
isEnabled(): Promise<void> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register to be notified when Bluetooth state changes on the device.
|
* Register to be notified when Bluetooth state changes on the device.
|
||||||
@ -434,7 +469,9 @@ export class BLE extends IonicNativePlugin {
|
|||||||
clearFunction: 'stopStateNotifications',
|
clearFunction: 'stopStateNotifications',
|
||||||
clearWithArgs: false
|
clearWithArgs: false
|
||||||
})
|
})
|
||||||
startStateNotifications(): Observable<any> { return; }
|
startStateNotifications(): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop state notifications.
|
* Stop state notifications.
|
||||||
@ -442,7 +479,9 @@ export class BLE extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
stopStateNotifications(): Promise<any> { return; }
|
stopStateNotifications(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open System Bluetooth settings (Android only).
|
* Open System Bluetooth settings (Android only).
|
||||||
@ -450,7 +489,9 @@ export class BLE extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
showBluetoothSettings(): Promise<any> { return; }
|
showBluetoothSettings(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable Bluetooth on the device (Android only).
|
* Enable Bluetooth on the device (Android only).
|
||||||
@ -458,7 +499,9 @@ export class BLE extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
enable(): Promise<any> { return; }
|
enable(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read the RSSI value on the device connection.
|
* Read the RSSI value on the device connection.
|
||||||
@ -468,7 +511,7 @@ export class BLE extends IonicNativePlugin {
|
|||||||
*@returns {Promise<any>}
|
*@returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
readRSSI(
|
readRSSI(deviceId: string): Promise<any> {
|
||||||
deviceId: string,
|
return;
|
||||||
): Promise<any> { return; }
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Brightness
|
* @name Brightness
|
||||||
@ -17,7 +16,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
*
|
*
|
||||||
* ...
|
* ...
|
||||||
*
|
*
|
||||||
* let brightnessValue: number = 0.8;
|
* let brightnessValue = 0.8;
|
||||||
* this.brightness.setBrightness(brightnessValue);
|
* this.brightness.setBrightness(brightnessValue);
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
@ -31,15 +30,16 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Brightness extends IonicNativePlugin {
|
export class Brightness extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the brightness of the display.
|
* Sets the brightness of the display.
|
||||||
*
|
*
|
||||||
* @param {value} Floating number between 0 and 1 in which case 1 means 100% brightness and 0 means 0% brightness.
|
* @param value {number} Floating number between 0 and 1 in which case 1 means 100% brightness and 0 means 0% brightness.
|
||||||
* @returns {Promise<any>} Returns a Promise that resolves if setting brightness was successful.
|
* @returns {Promise<any>} Returns a Promise that resolves if setting brightness was successful.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setBrightness(value: number): Promise<any> { return; }
|
setBrightness(value: number): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads the current brightness of the device display.
|
* Reads the current brightness of the device display.
|
||||||
@ -48,12 +48,13 @@ export class Brightness extends IonicNativePlugin {
|
|||||||
* brightness value of the device display (floating number between 0 and 1).
|
* brightness value of the device display (floating number between 0 and 1).
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getBrightness(): Promise<any> { return; }
|
getBrightness(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Keeps the screen on. Prevents the device from setting the screen to sleep.
|
* Keeps the screen on. Prevents the device from setting the screen to sleep.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setKeepScreenOn(value: boolean): void {}
|
setKeepScreenOn(value: boolean): void {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
|
|
||||||
export interface CalendarOptions {
|
export interface CalendarOptions {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Id
|
* Id
|
||||||
*/
|
*/
|
||||||
@ -47,7 +46,14 @@ export interface CalendarOptions {
|
|||||||
* URL
|
* URL
|
||||||
*/
|
*/
|
||||||
url?: string;
|
url?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface NameOrOptions {
|
||||||
|
/** Calendar name */
|
||||||
|
calendarName?: string;
|
||||||
|
|
||||||
|
/** Calendar color as a HEX string */
|
||||||
|
calendarColor?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -72,6 +78,7 @@ export interface CalendarOptions {
|
|||||||
* ```
|
* ```
|
||||||
* @interfaces
|
* @interfaces
|
||||||
* CalendarOptions
|
* CalendarOptions
|
||||||
|
* NameOrOptions
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'Calendar',
|
pluginName: 'Calendar',
|
||||||
@ -82,7 +89,6 @@ export interface CalendarOptions {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Calendar extends IonicNativePlugin {
|
export class Calendar extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function checks if we have permission to read/write from/to the calendar.
|
* This function checks if we have permission to read/write from/to the calendar.
|
||||||
* The promise will resolve with `true` when:
|
* The promise will resolve with `true` when:
|
||||||
@ -95,51 +101,65 @@ export class Calendar extends IonicNativePlugin {
|
|||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
hasReadWritePermission(): Promise<boolean> { return; }
|
hasReadWritePermission(): Promise<boolean> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if we have read permission
|
* Check if we have read permission
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
hasReadPermission(): Promise<boolean> { return; }
|
hasReadPermission(): Promise<boolean> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if we have write permission
|
* Check if we have write permission
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
hasWritePermission(): Promise<boolean> { return; }
|
hasWritePermission(): Promise<boolean> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request write permission
|
* Request write permission
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
requestWritePermission(): Promise<any> { return; }
|
requestWritePermission(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request read permission
|
* Request read permission
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
requestReadPermission(): Promise<any> { return; }
|
requestReadPermission(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests read/write permissions
|
* Requests read/write permissions
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
requestReadWritePermission(): Promise<any> { return; }
|
requestReadWritePermission(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a calendar. (iOS only)
|
* Create a calendar. (iOS only)
|
||||||
*
|
*
|
||||||
* @param {string | Object} nameOrOptions either a string name or a options object. If string, provide the calendar name. IF an object, provide a calendar name as a string and a calendar color in hex format as a string
|
* @param {string | CalendarOptions} nameOrOptions either a string name or a options object. If string, provide the calendar name. IF an object, provide a calendar name as a string and a calendar color in hex format as a string
|
||||||
* @returns {Promise<any>} Returns a Promise
|
* @returns {Promise<any>} Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
createCalendar(nameOrOptions: string | any): Promise<any> { return; }
|
createCalendar(nameOrOptions: string | CalendarOptions): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete a calendar. (iOS only)
|
* Delete a calendar. (iOS only)
|
||||||
@ -147,7 +167,9 @@ export class Calendar extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>} Returns a Promise
|
* @returns {Promise<any>} Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
deleteCalendar(name: string): Promise<any> { return; }
|
deleteCalendar(name: string): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the default calendar options.
|
* Returns the default calendar options.
|
||||||
@ -157,7 +179,21 @@ export class Calendar extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
getCalendarOptions(): CalendarOptions { return; }
|
getCalendarOptions(): CalendarOptions {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns options for a custom calender with sepcific colord
|
||||||
|
*
|
||||||
|
* @return {NameOrOptions} Returns an object with the default options
|
||||||
|
*/
|
||||||
|
@Cordova({
|
||||||
|
sync: true
|
||||||
|
})
|
||||||
|
getCreateCalendarOptions(): NameOrOptions {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Silently create an event.
|
* Silently create an event.
|
||||||
@ -175,7 +211,9 @@ export class Calendar extends IonicNativePlugin {
|
|||||||
notes?: string,
|
notes?: string,
|
||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date
|
endDate?: Date
|
||||||
): Promise<any> { return; }
|
): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Silently create an event with additional options.
|
* Silently create an event with additional options.
|
||||||
@ -196,7 +234,9 @@ export class Calendar extends IonicNativePlugin {
|
|||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date,
|
endDate?: Date,
|
||||||
options?: CalendarOptions
|
options?: CalendarOptions
|
||||||
): Promise<any> { return; }
|
): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interactively create an event.
|
* Interactively create an event.
|
||||||
@ -215,7 +255,9 @@ export class Calendar extends IonicNativePlugin {
|
|||||||
notes?: string,
|
notes?: string,
|
||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date
|
endDate?: Date
|
||||||
): Promise<any> { return; }
|
): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interactively create an event with additional options.
|
* Interactively create an event with additional options.
|
||||||
@ -236,7 +278,9 @@ export class Calendar extends IonicNativePlugin {
|
|||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date,
|
endDate?: Date,
|
||||||
options?: CalendarOptions
|
options?: CalendarOptions
|
||||||
): Promise<any> { return; }
|
): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find an event.
|
* Find an event.
|
||||||
@ -255,7 +299,9 @@ export class Calendar extends IonicNativePlugin {
|
|||||||
notes?: string,
|
notes?: string,
|
||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date
|
endDate?: Date
|
||||||
): Promise<any> { return; }
|
): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find an event with additional options.
|
* Find an event with additional options.
|
||||||
@ -275,7 +321,9 @@ export class Calendar extends IonicNativePlugin {
|
|||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date,
|
endDate?: Date,
|
||||||
options?: CalendarOptions
|
options?: CalendarOptions
|
||||||
): Promise<any> { return; }
|
): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find a list of events within the specified date range. (Android only)
|
* Find a list of events within the specified date range. (Android only)
|
||||||
@ -287,14 +335,18 @@ export class Calendar extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android']
|
platforms: ['Android']
|
||||||
})
|
})
|
||||||
listEventsInRange(startDate: Date, endDate: Date): Promise<any> { return; }
|
listEventsInRange(startDate: Date, endDate: Date): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a list of all calendars.
|
* Get a list of all calendars.
|
||||||
* @returns {Promise<any>} A Promise that resolves with the list of calendars, or rejects with an error.
|
* @returns {Promise<any>} A Promise that resolves with the list of calendars, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
listCalendars(): Promise<any> { return; }
|
listCalendars(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a list of all future events in the specified calendar. (iOS only)
|
* Get a list of all future events in the specified calendar. (iOS only)
|
||||||
@ -303,7 +355,9 @@ export class Calendar extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS']
|
platforms: ['iOS']
|
||||||
})
|
})
|
||||||
findAllEventsInNamedCalendar(calendarName: string): Promise<any> { return; }
|
findAllEventsInNamedCalendar(calendarName: string): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Modify an event. (iOS only)
|
* Modify an event. (iOS only)
|
||||||
@ -334,7 +388,9 @@ export class Calendar extends IonicNativePlugin {
|
|||||||
newNotes?: string,
|
newNotes?: string,
|
||||||
newStartDate?: Date,
|
newStartDate?: Date,
|
||||||
newEndDate?: Date
|
newEndDate?: Date
|
||||||
): Promise<any> { return; }
|
): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Modify an event with additional options. (iOS only)
|
* Modify an event with additional options. (iOS only)
|
||||||
@ -369,7 +425,9 @@ export class Calendar extends IonicNativePlugin {
|
|||||||
newEndDate?: Date,
|
newEndDate?: Date,
|
||||||
filterOptions?: CalendarOptions,
|
filterOptions?: CalendarOptions,
|
||||||
newOptions?: CalendarOptions
|
newOptions?: CalendarOptions
|
||||||
): Promise<any> { return; }
|
): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete an event.
|
* Delete an event.
|
||||||
@ -388,7 +446,9 @@ export class Calendar extends IonicNativePlugin {
|
|||||||
notes?: string,
|
notes?: string,
|
||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date
|
endDate?: Date
|
||||||
): Promise<any> { return; }
|
): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete an event from the specified Calendar. (iOS only)
|
* Delete an event from the specified Calendar. (iOS only)
|
||||||
@ -411,7 +471,9 @@ export class Calendar extends IonicNativePlugin {
|
|||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date,
|
endDate?: Date,
|
||||||
calendarName?: string
|
calendarName?: string
|
||||||
): Promise<any> { return; }
|
): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open the calendar at the specified date.
|
* Open the calendar at the specified date.
|
||||||
@ -419,6 +481,7 @@ export class Calendar extends IonicNativePlugin {
|
|||||||
* @return {Promise<any>} Promise returns a promise
|
* @return {Promise<any>} Promise returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
openCalendar(date: Date): Promise<any> { return; }
|
openCalendar(date: Date): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
67
src/@ionic-native/plugins/call-log/index.ts
Normal file
67
src/@ionic-native/plugins/call-log/index.ts
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
|
|
||||||
|
export interface CallLogObject {
|
||||||
|
name: string;
|
||||||
|
value: string;
|
||||||
|
operator: '==' | '!=' | '>' | '>=' | '<' | '<=';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Call Log
|
||||||
|
* @description
|
||||||
|
* This plugin access the call history on a device and that can be filtered
|
||||||
|
*
|
||||||
|
* @usage
|
||||||
|
* ```typescript
|
||||||
|
* import { CallLog } from '@ionic-native/call-log';
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* constructor(private callLog: CallLog) { }
|
||||||
|
*
|
||||||
|
* ````
|
||||||
|
* @interfaces
|
||||||
|
* CallLogObject
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Plugin({
|
||||||
|
pluginName: 'CallLog',
|
||||||
|
plugin: 'cordova-plugin-calllog',
|
||||||
|
pluginRef: 'plugins.callLog',
|
||||||
|
repo: 'https://github.com/creacore-team/cordova-plugin-calllog',
|
||||||
|
platforms: ['Android']
|
||||||
|
})
|
||||||
|
@Injectable()
|
||||||
|
export class CallLog extends IonicNativePlugin {
|
||||||
|
/**
|
||||||
|
* This function return the call logs
|
||||||
|
* @param filters {CallLogObject[]} array of object to filter the query
|
||||||
|
* @return {Promise<any>}
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
getCallLog(filters: CallLogObject[]): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check permission
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
*/
|
||||||
|
@Cordova({
|
||||||
|
platforms: ['Android']
|
||||||
|
})
|
||||||
|
hasReadPermission(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request permission
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
*/
|
||||||
|
@Cordova({
|
||||||
|
platforms: ['Android']
|
||||||
|
})
|
||||||
|
requestReadPermission(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Call Number
|
* @name Call Number
|
||||||
* @description
|
* @description
|
||||||
@ -16,8 +17,8 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* this.callNumber.callNumber("18001010101", true)
|
* this.callNumber.callNumber("18001010101", true)
|
||||||
* .then(() => console.log('Launched dialer!'))
|
* .then(res => console.log('Launched dialer!', res))
|
||||||
* .catch(() => console.log('Error launching dialer'));
|
* .catch(err => console.log('Error launching dialer', err));
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
@ -30,7 +31,6 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class CallNumber extends IonicNativePlugin {
|
export class CallNumber extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calls a phone number
|
* Calls a phone number
|
||||||
* @param numberToCall {string} The phone number to call as a string
|
* @param numberToCall {string} The phone number to call as a string
|
||||||
|
@ -400,7 +400,7 @@ export interface DownloadProgress {
|
|||||||
* @description
|
* @description
|
||||||
* CodePush plugin for Cordova by Microsoft that supports iOS and Android.
|
* CodePush plugin for Cordova by Microsoft that supports iOS and Android.
|
||||||
*
|
*
|
||||||
* For more info, please see https://github.com/ksachdeva/ionic2-code-push-example
|
* For more info, please see https://github.com/Dellos7/example-cordova-code-push-plugin
|
||||||
*
|
*
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
import { Injectable } from '@angular/core';
|
|
||||||
import { CordovaInstance, InstanceProperty, Plugin, getPromise, InstanceCheck, checkAvailability, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
|
import { CordovaInstance, InstanceProperty, Plugin, getPromise, InstanceCheck, checkAvailability, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
|
||||||
|
|
||||||
declare const window: any,
|
declare const window: any,
|
||||||
navigator: any;
|
navigator: any;
|
||||||
|
|
||||||
export type ContactFieldType = '*' | 'addresses' | 'birthday' | 'categories' | 'country' | 'department' | 'displayName' | 'emails' | 'familyName' | 'formatted' | 'givenName' | 'honorificPrefix' | 'honorificSuffix' | 'id' | 'ims' | 'locality' | 'middleName' | 'name' | 'nickname' | 'note' | 'organizations' | 'phoneNumbers' | 'photos' | 'postalCode' | 'region' | 'streetAddress' | 'title' | 'urls';
|
export type ContactFieldType = '*' | 'addresses' | 'birthday' | 'categories' | 'country' | 'department' | 'displayName' | 'emails' | 'name.familyName' | 'name.formatted' | 'name.givenName' | 'name.honorificPrefix' | 'name.honorificSuffix' | 'id' | 'ims' | 'locality' | 'name.middleName' | 'name' | 'nickname' | 'note' | 'organizations' | 'phoneNumbers' | 'photos' | 'postalCode' | 'region' | 'streetAddress' | 'title' | 'urls';
|
||||||
|
|
||||||
export interface IContactProperties {
|
export interface IContactProperties {
|
||||||
|
|
||||||
@ -261,10 +260,6 @@ export class ContactFindOptions implements IContactFindOptions {
|
|||||||
* @description
|
* @description
|
||||||
* Access and manage Contacts on the device.
|
* Access and manage Contacts on the device.
|
||||||
*
|
*
|
||||||
* @deprecated
|
|
||||||
* This plugin is being deprecated. No more work will be done on this plugin by the Cordova development community.
|
|
||||||
* You can continue to use this plugin and it should work as-is in the future but any more arising issues will not be fixed by the Cordova community.
|
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
*
|
*
|
||||||
* ```typescript
|
* ```typescript
|
||||||
@ -298,9 +293,8 @@ export class ContactFindOptions implements IContactFindOptions {
|
|||||||
plugin: 'cordova-plugin-contacts',
|
plugin: 'cordova-plugin-contacts',
|
||||||
pluginRef: 'navigator.contacts',
|
pluginRef: 'navigator.contacts',
|
||||||
repo: 'https://github.com/apache/cordova-plugin-contacts',
|
repo: 'https://github.com/apache/cordova-plugin-contacts',
|
||||||
platforms: ['Android', 'iOS', 'Windows']
|
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows 8', 'Windows Phone']
|
||||||
})
|
})
|
||||||
@Injectable()
|
|
||||||
export class Contacts extends IonicNativePlugin {
|
export class Contacts extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||||
|
|
||||||
|
export interface CropOptions {
|
||||||
|
quality?: number;
|
||||||
|
targetHeight?: number;
|
||||||
|
targetWidth?: number;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Crop
|
* @name Crop
|
||||||
* @description Crops images
|
* @description Crops images
|
||||||
@ -18,6 +24,8 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
* error => console.error('Error cropping image', error)
|
* error => console.error('Error cropping image', error)
|
||||||
* );
|
* );
|
||||||
* ```
|
* ```
|
||||||
|
* @interfaces
|
||||||
|
* CropOptions
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'Crop',
|
pluginName: 'Crop',
|
||||||
@ -28,7 +36,6 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Crop extends IonicNativePlugin {
|
export class Crop extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Crops an image
|
* Crops an image
|
||||||
* @param pathToImage
|
* @param pathToImage
|
||||||
@ -38,6 +45,7 @@ export class Crop extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
crop(pathToImage: string, options?: { quality: number, targetHeight: number, targetWidth: number }): Promise<string> { return; }
|
crop(pathToImage: string, options?: CropOptions): Promise<string> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
|
|
||||||
export interface DatePickerOptions {
|
export interface DatePickerOptions {
|
||||||
/**
|
/**
|
||||||
@ -21,13 +21,13 @@ export interface DatePickerOptions {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Maximum date
|
* Maximum date
|
||||||
* Default?: empty String
|
* Default: empty String
|
||||||
*/
|
*/
|
||||||
maxDate?: Date | string | number;
|
maxDate?: Date | string | number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Label for the dialog title. If empty, uses android default (Set date/Set time).
|
* Label for the dialog title. If empty, uses android default (Set date/Set time).
|
||||||
* Default?: empty String
|
* Default: empty String
|
||||||
*/
|
*/
|
||||||
titleText?: string;
|
titleText?: string;
|
||||||
|
|
||||||
@ -116,7 +116,6 @@ export interface DatePickerOptions {
|
|||||||
* Force locale for datePicker.
|
* Force locale for datePicker.
|
||||||
*/
|
*/
|
||||||
locale?: string;
|
locale?: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -155,7 +154,6 @@ export interface DatePickerOptions {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class DatePicker extends IonicNativePlugin {
|
export class DatePicker extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
@ -176,5 +174,4 @@ export class DatePicker extends IonicNativePlugin {
|
|||||||
show(options: DatePickerOptions): Promise<Date> {
|
show(options: DatePickerOptions): Promise<Date> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -21,7 +21,7 @@ import { Observable } from 'rxjs/Observable';
|
|||||||
*
|
*
|
||||||
* // Check if we are listening
|
* // Check if we are listening
|
||||||
* this.dbMeter.isListening().then(
|
* this.dbMeter.isListening().then(
|
||||||
* (isListening: boolean) => console.log(isListening)
|
* isListening => console.log(isListening)
|
||||||
* );
|
* );
|
||||||
*
|
*
|
||||||
* // Stop listening
|
* // Stop listening
|
||||||
@ -43,7 +43,6 @@ import { Observable } from 'rxjs/Observable';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class DBMeter extends IonicNativePlugin {
|
export class DBMeter extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts listening
|
* Starts listening
|
||||||
* @returns {Observable<any>} Returns an observable. Subscribe to start listening. Unsubscribe to stop listening.
|
* @returns {Observable<any>} Returns an observable. Subscribe to start listening. Unsubscribe to stop listening.
|
||||||
@ -52,27 +51,34 @@ export class DBMeter extends IonicNativePlugin {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'stop'
|
clearFunction: 'stop'
|
||||||
})
|
})
|
||||||
start(): Observable<any> { return; }
|
start(): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops listening
|
* Stops listening
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
stop(): Promise<any> { return; }
|
stop(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the DB Meter is listening
|
* Check if the DB Meter is listening
|
||||||
* @returns {Promise<boolean>} Returns a promise that resolves with a boolean that tells us whether the DB meter is listening
|
* @returns {Promise<boolean>} Returns a promise that resolves with a boolean that tells us whether the DB meter is listening
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
isListening(): Promise<boolean> { return; }
|
isListening(): Promise<boolean> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete the DB Meter instance
|
* Delete the DB Meter instance
|
||||||
* @returns {Promise<any>} Returns a promise that will resolve if the instance has been deleted, and rejects if errors occur.
|
* @returns {Promise<any>} Returns a promise that will resolve if the instance has been deleted, and rejects if errors occur.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
delete(): Promise<any> { return; }
|
delete(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,16 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
|
|
||||||
|
export interface AndroidAccount {
|
||||||
|
/** Account creator */
|
||||||
|
CREATOR: AndroidAccount;
|
||||||
|
|
||||||
|
/** Account name */
|
||||||
|
name: string;
|
||||||
|
|
||||||
|
/** Account type */
|
||||||
|
type: string;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Device Accounts
|
* @name Device Accounts
|
||||||
@ -19,6 +30,8 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
* .catch(error => console.error(error));
|
* .catch(error => console.error(error));
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
|
* @interfaces
|
||||||
|
* AndroidAccount
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'DeviceAccounts',
|
pluginName: 'DeviceAccounts',
|
||||||
@ -29,33 +42,39 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class DeviceAccounts extends IonicNativePlugin {
|
export class DeviceAccounts extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets all accounts registered on the Android Device
|
* Gets all accounts registered on the Android Device
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<AndroidAccount[]>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
get(): Promise<any> { return; }
|
get(): Promise<AndroidAccount[]> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all accounts registered on Android device for requested type
|
* Get all accounts registered on Android device for requested type
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<AndroidAccount[]>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getByType(type: string): Promise<any> { return; }
|
getByType(type: string): Promise<AndroidAccount[]> {
|
||||||
|
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)
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<string[]>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getEmails(): Promise<any> { return; }
|
getEmails(): Promise<string[]> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the first email registered on Android device
|
* Get the first email registered on Android device
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getEmail(): Promise<any> { return; }
|
getEmail(): Promise<string> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
|
|
||||||
|
export interface DeviceFeedbackEnabled {
|
||||||
|
/** Haptic Feedback */
|
||||||
|
haptic: boolean;
|
||||||
|
|
||||||
|
/** Acoustic Feedback */
|
||||||
|
acoustic: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Device Feedback
|
* @name Device Feedback
|
||||||
* @description
|
* @description
|
||||||
@ -19,8 +28,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
*
|
*
|
||||||
* this.deviceFeedback.haptic(0);
|
* this.deviceFeedback.haptic(0);
|
||||||
*
|
*
|
||||||
* this.deviceFeedback.isFeedbackEnabled()
|
* this.deviceFeedback.isFeedbackEnabled().then(feedback => {
|
||||||
* .then((feedback) => {
|
|
||||||
* console.log(feedback);
|
* console.log(feedback);
|
||||||
* // {
|
* // {
|
||||||
* // acoustic: true,
|
* // acoustic: true,
|
||||||
@ -29,6 +37,8 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
* });
|
* });
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
|
* @innterfaces
|
||||||
|
* DeviceFeedbackEnabled
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'DeviceFeedback',
|
pluginName: 'DeviceFeedback',
|
||||||
@ -39,7 +49,6 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class DeviceFeedback extends IonicNativePlugin {
|
export class DeviceFeedback extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provide sound feedback to user, nevertheless respect user's settings and current active device profile as native feedback do.
|
* Provide sound feedback to user, nevertheless respect user's settings and current active device profile as native feedback do.
|
||||||
*/
|
*/
|
||||||
@ -48,16 +57,17 @@ export class DeviceFeedback extends IonicNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Provide vibrate feedback to user, nevertheless respect user's tactile feedback setting as native feedback do.
|
* Provide vibrate feedback to user, nevertheless respect user's tactile feedback setting as native feedback do.
|
||||||
* @param type {Number} Specify type of vibration feedback. 0 for long press, 1 for virtual key, or 3 for keyboard tap.
|
* @param type {number} Specify type of vibration feedback. 0 for long press, 1 for virtual key, or 3 for keyboard tap.
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
haptic(type: number): void {}
|
haptic(type: number): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if haptic and acoustic feedback is enabled by user settings.
|
* Check if haptic and acoustic feedback is enabled by user settings.
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<DeviceFeedbackEnabled>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
isFeedbackEnabled(): Promise<{ haptic: boolean; acoustic: boolean; }> { return; }
|
isFeedbackEnabled(): Promise<DeviceFeedbackEnabled> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ export interface DeviceOrientationCompassHeading {
|
|||||||
/**
|
/**
|
||||||
* The time at which this heading was determined. (DOMTimeStamp)
|
* The time at which this heading was determined. (DOMTimeStamp)
|
||||||
*/
|
*/
|
||||||
timestamp: any;
|
timestamp: number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1000,7 +1000,7 @@ export class File extends IonicNativePlugin {
|
|||||||
*
|
*
|
||||||
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystems above
|
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystems above
|
||||||
* @param {string} fileName path relative to base path
|
* @param {string} fileName path relative to base path
|
||||||
* @param {string | Blob} text content or blob to write
|
* @param {string | Blob | ArrayBuffer} text content, blob or ArrayBuffer to write
|
||||||
* @param {IWriteOptions} options replace file if set to true. See WriteOptions for more information.
|
* @param {IWriteOptions} options replace file if set to true. See WriteOptions for more information.
|
||||||
* @returns {Promise<any>} Returns a Promise that resolves to updated file entry or rejects with an error.
|
* @returns {Promise<any>} Returns a Promise that resolves to updated file entry or rejects with an error.
|
||||||
*/
|
*/
|
||||||
|
@ -43,7 +43,7 @@ export class FirebaseAnalytics extends IonicNativePlugin {
|
|||||||
* @param params {any} Some param to configure something
|
* @param params {any} Some param to configure something
|
||||||
* @return {Promise<any>} Returns a promise
|
* @return {Promise<any>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova({ sync: true })
|
||||||
logEvent(name: string, params: any): Promise<any> { return; }
|
logEvent(name: string, params: any): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -52,7 +52,7 @@ export class FirebaseAnalytics extends IonicNativePlugin {
|
|||||||
* @param id {string} The user ID
|
* @param id {string} The user ID
|
||||||
* @return {Promise<any>} Returns a promise
|
* @return {Promise<any>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova({ sync: true })
|
||||||
setUserId(id: string): Promise<any> { return; }
|
setUserId(id: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -62,7 +62,7 @@ export class FirebaseAnalytics extends IonicNativePlugin {
|
|||||||
* @param value {string} The property value
|
* @param value {string} The property value
|
||||||
* @return {Promise<any>} Returns a promise
|
* @return {Promise<any>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova({ sync: true })
|
||||||
setUserProperty(name: string, value: string): Promise<any> { return; }
|
setUserProperty(name: string, value: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -70,7 +70,7 @@ export class FirebaseAnalytics extends IonicNativePlugin {
|
|||||||
* @param enabled {boolean}
|
* @param enabled {boolean}
|
||||||
* @return {Promise<any>} Returns a promise
|
* @return {Promise<any>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova({ sync: true })
|
||||||
setEnabled(enabled: boolean): Promise<any> { return; }
|
setEnabled(enabled: boolean): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -79,7 +79,7 @@ export class FirebaseAnalytics extends IonicNativePlugin {
|
|||||||
* @param name {string} The name of the screen
|
* @param name {string} The name of the screen
|
||||||
* @return {Promise<any>} Returns a promise
|
* @return {Promise<any>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova({ sync: true })
|
||||||
setCurrentScreen(name: string): Promise<any> { return; }
|
setCurrentScreen(name: string): Promise<any> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,19 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||||
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
export interface DynamicLinksOptions {
|
export interface IDynamicLink {
|
||||||
title: string;
|
matchType: 'Weak' | 'Strong';
|
||||||
message: string;
|
deepLink: string;
|
||||||
deepLink?: string;
|
|
||||||
callToActionText?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @beta
|
* @beta
|
||||||
* @name Firebase Dynamic Links
|
* @name Firebase Dynamic Links
|
||||||
* @description
|
* @description
|
||||||
* Cordova plugin for Firebase Invites and Firebase Dynamic Links
|
* Cordova plugin for Firebase Dynamic Links
|
||||||
*
|
*
|
||||||
* Variables APP_DOMAIN and APP_PATH specify web URL where your app will start an activity to handle the link. They also used to setup support for App Indexing.
|
* Variables APP_DOMAIN and APP_PATH specify web URL where your app will start an activity to handle the link. They also used to setup support for App Indexing.
|
||||||
* Variable REVERSED_CLIENT_ID can be found in your GoogleService-Info.plist under the same key name.
|
|
||||||
* Variable PHOTO_LIBRARY_USAGE_DESCRIPTION specifies required value for NSPhotoLibraryUsageDescription on iOS.
|
|
||||||
* Go to firebase console and export google-services.json and GoogleService-Info.plist. Put those files into the root of your cordova app folder.
|
* Go to firebase console and export google-services.json and GoogleService-Info.plist. Put those files into the root of your cordova app folder.
|
||||||
*
|
*
|
||||||
* Preferences:
|
* Preferences:
|
||||||
@ -41,17 +38,6 @@ export interface DynamicLinksOptions {
|
|||||||
* constructor(private firebaseDynamicLinks: FirebaseDynamicLinks) { }
|
* constructor(private firebaseDynamicLinks: FirebaseDynamicLinks) { }
|
||||||
*
|
*
|
||||||
* ...
|
* ...
|
||||||
* // The deepLink and callToActionText properties are optional
|
|
||||||
* const options: DynamicLinksOptions = {
|
|
||||||
* title: 'My Title';
|
|
||||||
* message: 'My message';
|
|
||||||
* deepLink: 'http://example.com/';
|
|
||||||
* callToActionText: 'Message on button';
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* this.firebaseDynamicLinks.sendInvitation(options)
|
|
||||||
* .then((res: any) => console.log(res))
|
|
||||||
* .catch((error: any) => console.error(error));
|
|
||||||
*
|
*
|
||||||
* this.firebaseDynamicLinks.onDynamicLink()
|
* this.firebaseDynamicLinks.onDynamicLink()
|
||||||
* .then((res: any) => console.log(res)) //Handle the logic here after opening the app with the Dynamic link
|
* .then((res: any) => console.log(res)) //Handle the logic here after opening the app with the Dynamic link
|
||||||
@ -75,17 +61,12 @@ export class FirebaseDynamicLinks extends IonicNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers callback that is triggered on each dynamic link click.
|
* Registers callback that is triggered on each dynamic link click.
|
||||||
* @return {Promise<any>} Returns a promise
|
* @return {Observable<IDynamicLink>} Returns an observable
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova({
|
||||||
onDynamicLink(): Promise<any> { return; }
|
callbackOrder: 'reverse',
|
||||||
|
observable: true,
|
||||||
/**
|
})
|
||||||
* Display invitation dialog.
|
onDynamicLink(): Observable<IDynamicLink> { return; }
|
||||||
* @param options {DynamicLinksOptions} Some param to configure something
|
|
||||||
* @return {Promise<any>} Returns a promise
|
|
||||||
*/
|
|
||||||
@Cordova()
|
|
||||||
sendInvitation(options: DynamicLinksOptions): Promise<any> { return; }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -300,4 +300,14 @@ export class Firebase extends IonicNativePlugin {
|
|||||||
verifyPhoneNumber(phoneNumber: string, timeoutDuration: number): Promise<any> {
|
verifyPhoneNumber(phoneNumber: string, timeoutDuration: number): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allows the user to enable/disable analytics collection
|
||||||
|
* @param enabled {booleab} value to set collection
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
setAnalyticsCollectionEnabled(enabled: boolean): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,6 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class GoogleAnalytics extends IonicNativePlugin {
|
export class GoogleAnalytics extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* In your 'deviceready' handler, set up your Analytics tracker.
|
* In your 'deviceready' handler, set up your Analytics tracker.
|
||||||
* https://developers.google.com/analytics/devguides/collection/analyticsjs/
|
* https://developers.google.com/analytics/devguides/collection/analyticsjs/
|
||||||
@ -50,7 +49,9 @@ export class GoogleAnalytics extends IonicNativePlugin {
|
|||||||
successIndex: 2,
|
successIndex: 2,
|
||||||
errorIndex: 3
|
errorIndex: 3
|
||||||
})
|
})
|
||||||
startTrackerWithId(id: string, interval?: number): Promise<any> { return; }
|
startTrackerWithId(id: string, interval?: number): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enabling Advertising Features in Google Analytics allows you to take advantage of Remarketing, Demographics & Interests reports, and more
|
* Enabling Advertising Features in Google Analytics allows you to take advantage of Remarketing, Demographics & Interests reports, and more
|
||||||
@ -58,7 +59,9 @@ export class GoogleAnalytics extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setAllowIDFACollection(allow: boolean): Promise<any> { return; }
|
setAllowIDFACollection(allow: boolean): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a UserId
|
* Set a UserId
|
||||||
@ -67,7 +70,9 @@ export class GoogleAnalytics extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setUserId(id: string): Promise<any> { return; }
|
setUserId(id: string): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a anonymize Ip address
|
* Set a anonymize Ip address
|
||||||
@ -75,15 +80,40 @@ export class GoogleAnalytics extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setAnonymizeIp(anonymize: boolean): Promise<any> { return; }
|
setAnonymizeIp(anonymize: boolean): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the app version
|
* Set the app version
|
||||||
* @param appVersion {string} App version
|
* @param appVersion {string} App version
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setAppVersion(appVersion: string): Promise<any> { return; }
|
setAppVersion(appVersion: string): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a variable
|
||||||
|
* @param key {string} Variable
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
getVar(key: string): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set a variable
|
||||||
|
* @param key {string} Variable
|
||||||
|
* @param value {string} Parameter
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
setVar(key: string, value: string): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set OptOut
|
* Set OptOut
|
||||||
@ -91,14 +121,18 @@ export class GoogleAnalytics extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setOptOut(optout: boolean): Promise<any> { return; }
|
setOptOut(optout: boolean): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable verbose logging
|
* Enable verbose logging
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
debugMode(): Promise<any> { return; }
|
debugMode(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Track custom metric
|
* Track custom metric
|
||||||
@ -110,7 +144,9 @@ export class GoogleAnalytics extends IonicNativePlugin {
|
|||||||
successIndex: 2,
|
successIndex: 2,
|
||||||
errorIndex: 3
|
errorIndex: 3
|
||||||
})
|
})
|
||||||
trackMetric(key: number, value?: number): Promise<any> { return; }
|
trackMetric(key: number, value?: number): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Track a screen
|
* Track a screen
|
||||||
@ -125,7 +161,13 @@ export class GoogleAnalytics extends IonicNativePlugin {
|
|||||||
successIndex: 3,
|
successIndex: 3,
|
||||||
errorIndex: 4
|
errorIndex: 4
|
||||||
})
|
})
|
||||||
trackView(title: string, campaignUrl?: string, newSession?: boolean): Promise<any> { return; }
|
trackView(
|
||||||
|
title: string,
|
||||||
|
campaignUrl?: string,
|
||||||
|
newSession?: boolean
|
||||||
|
): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a Custom Dimension
|
* Add a Custom Dimension
|
||||||
@ -135,7 +177,9 @@ export class GoogleAnalytics extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
addCustomDimension(key: number, value: string): Promise<any> { return; }
|
addCustomDimension(key: number, value: string): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Track an event
|
* Track an event
|
||||||
@ -151,7 +195,15 @@ export class GoogleAnalytics extends IonicNativePlugin {
|
|||||||
successIndex: 5,
|
successIndex: 5,
|
||||||
errorIndex: 6
|
errorIndex: 6
|
||||||
})
|
})
|
||||||
trackEvent(category: string, action: string, label?: string, value?: number, newSession?: boolean): Promise<any> { return; }
|
trackEvent(
|
||||||
|
category: string,
|
||||||
|
action: string,
|
||||||
|
label?: string,
|
||||||
|
value?: number,
|
||||||
|
newSession?: boolean
|
||||||
|
): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Track an exception
|
* Track an exception
|
||||||
@ -160,7 +212,9 @@ export class GoogleAnalytics extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
trackException(description: string, fatal: boolean): Promise<any> { return; }
|
trackException(description: string, fatal: boolean): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Track User Timing (App Speed)
|
* Track User Timing (App Speed)
|
||||||
@ -171,7 +225,14 @@ export class GoogleAnalytics extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
trackTiming(category: string, intervalInMilliseconds: number, variable: string, label: string): Promise<any> { return; }
|
trackTiming(
|
||||||
|
category: string,
|
||||||
|
intervalInMilliseconds: number,
|
||||||
|
variable: string,
|
||||||
|
label: string
|
||||||
|
): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a Transaction (Ecommerce)
|
* Add a Transaction (Ecommerce)
|
||||||
@ -185,7 +246,16 @@ export class GoogleAnalytics extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
addTransaction(id: string, affiliation: string, revenue: number, tax: number, shipping: number, currencyCode: string): Promise<any> { return; }
|
addTransaction(
|
||||||
|
id: string,
|
||||||
|
affiliation: string,
|
||||||
|
revenue: number,
|
||||||
|
tax: number,
|
||||||
|
shipping: number,
|
||||||
|
currencyCode: string
|
||||||
|
): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a Transaction Item (Ecommerce)
|
* Add a Transaction Item (Ecommerce)
|
||||||
@ -200,7 +270,17 @@ export class GoogleAnalytics extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
addTransactionItem(id: string, name: string, sku: string, category: string, price: number, quantity: number, currencyCode: string): Promise<any> { return; }
|
addTransactionItem(
|
||||||
|
id: string,
|
||||||
|
name: string,
|
||||||
|
sku: string,
|
||||||
|
category: string,
|
||||||
|
price: number,
|
||||||
|
quantity: number,
|
||||||
|
currencyCode: string
|
||||||
|
): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable/disable automatic reporting of uncaught exceptions
|
* Enable/disable automatic reporting of uncaught exceptions
|
||||||
@ -208,6 +288,19 @@ export class GoogleAnalytics extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
enableUncaughtExceptionReporting(shouldEnable: boolean): Promise<any> { return; }
|
enableUncaughtExceptionReporting(shouldEnable: boolean): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Manually dispatch any data
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
* @platform
|
||||||
|
*/
|
||||||
|
@Cordova({
|
||||||
|
platforms: ['Android', 'iOS', 'Windows']
|
||||||
|
})
|
||||||
|
dispatch(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,7 @@ export interface HealthKitOptions {
|
|||||||
* HKWorkoutActivityType constant
|
* HKWorkoutActivityType constant
|
||||||
* Read more here: https://developer.apple.com/library/ios/documentation/HealthKit/Reference/HKWorkout_Class/#//apple_ref/c/tdef/HKWorkoutActivityType
|
* Read more here: https://developer.apple.com/library/ios/documentation/HealthKit/Reference/HKWorkout_Class/#//apple_ref/c/tdef/HKWorkoutActivityType
|
||||||
*/
|
*/
|
||||||
activityType?: string; //
|
activityType?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 'hour', 'week', 'year' or 'day', default 'day'
|
* 'hour', 'week', 'year' or 'day', default 'day'
|
||||||
@ -18,6 +18,12 @@ export interface HealthKitOptions {
|
|||||||
*/
|
*/
|
||||||
amount?: number;
|
amount?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* specifies if the data returned by querySampleType() should be sorted by
|
||||||
|
* end date in ascending order, default is false
|
||||||
|
*/
|
||||||
|
ascending?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -63,6 +69,11 @@ export interface HealthKitOptions {
|
|||||||
*/
|
*/
|
||||||
extraData?: any;
|
extraData?: any;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* limits the maximum number of records returned by querySampleType()
|
||||||
|
*/
|
||||||
|
limit?: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
|
|
||||||
export interface HTTPResponse {
|
export interface HTTPResponse {
|
||||||
/**
|
/**
|
||||||
@ -66,7 +66,6 @@ export interface HTTPResponse {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class HTTP extends IonicNativePlugin {
|
export class HTTP extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This returns an object representing a basic HTTP Authorization header of the form.
|
* This returns an object representing a basic HTTP Authorization header of the form.
|
||||||
* @param username {string} Username
|
* @param username {string} Username
|
||||||
@ -74,7 +73,12 @@ export class HTTP extends IonicNativePlugin {
|
|||||||
* @returns {Object} an object representing a basic HTTP Authorization header of the form {'Authorization': 'Basic base64encodedusernameandpassword'}
|
* @returns {Object} an object representing a basic HTTP Authorization header of the form {'Authorization': 'Basic base64encodedusernameandpassword'}
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
getBasicAuthHeader(username: string, password: string): { Authorization: string; } { return; }
|
getBasicAuthHeader(
|
||||||
|
username: string,
|
||||||
|
password: string
|
||||||
|
): { Authorization: string } {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This sets up all future requests to use Basic HTTP authentication with the given username and password.
|
* This sets up all future requests to use Basic HTTP authentication with the given username and password.
|
||||||
@ -130,14 +134,16 @@ export class HTTP extends IonicNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Enable or disable SSL Pinning. This defaults to false.
|
* Enable or disable SSL Pinning. This defaults to false.
|
||||||
*
|
*
|
||||||
* To use SSL pinning you must include at least one .cer SSL certificate in your app project. You can pin to your server certificate or to one of the issuing CA certificates. For ios include your certificate in the root level of your bundle (just add the .cer file to your project/target at the root level). For android include your certificate in your project's platforms/android/assets folder. In both cases all .cer files found will be loaded automatically. If you only have a .pem certificate see this stackoverflow answer. You want to convert it to a DER encoded certificate with a .cer extension.
|
* To use SSL pinning you must include at least one .cer SSL certificate in your app project. You can pin to your server certificate or to one of the issuing CA certificates. For ios include your certificate in the root level of your bundle (just add the .cer file to your project/target at the root level). For android include your certificate in your project's platforms/android/assets folder. In both cases all .cer files found will be loaded automatically. If you only have a .pem certificate see this [stackoverflow answer](https://stackoverflow.com/questions/16583428/how-to-convert-an-ssl-certificate-in-linux/16583429#16583429). You want to convert it to a DER encoded certificate with a .cer extension.
|
||||||
*
|
*
|
||||||
* As an alternative, you can store your .cer files in the www/certificates folder.
|
* As an alternative, you can store your .cer files in the www/certificates folder.
|
||||||
* @param enable {boolean} Set to true to enable
|
* @param enable {boolean} Set to true to enable
|
||||||
* @returns {Promise<void>} returns a promise that will resolve on success, and reject on failure
|
* @returns {Promise<void>} returns a promise that will resolve on success, and reject on failure
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
enableSSLPinning(enable: boolean): Promise<void> { return; }
|
enableSSLPinning(enable: boolean): Promise<void> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Accept all SSL certificates. Or disabled accepting all certificates. Defaults to false.
|
* Accept all SSL certificates. Or disabled accepting all certificates. Defaults to false.
|
||||||
@ -145,7 +151,9 @@ export class HTTP extends IonicNativePlugin {
|
|||||||
* @returns {Promise<void>} returns a promise that will resolve on success, and reject on failure
|
* @returns {Promise<void>} returns a promise that will resolve on success, and reject on failure
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
acceptAllCerts(accept: boolean): Promise<void> { return; }
|
acceptAllCerts(accept: boolean): Promise<void> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a POST request
|
* Make a POST request
|
||||||
@ -155,7 +163,9 @@ export class HTTP extends IonicNativePlugin {
|
|||||||
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
post(url: string, body: any, headers: any): Promise<HTTPResponse> { return; }
|
post(url: string, body: any, headers: any): Promise<HTTPResponse> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a GET request
|
* Make a GET request
|
||||||
@ -165,7 +175,9 @@ export class HTTP extends IonicNativePlugin {
|
|||||||
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
get(url: string, parameters: any, headers: any): Promise<HTTPResponse> { return; }
|
get(url: string, parameters: any, headers: any): Promise<HTTPResponse> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a PUT request
|
* Make a PUT request
|
||||||
@ -175,7 +187,9 @@ export class HTTP extends IonicNativePlugin {
|
|||||||
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
put(url: string, body: any, headers: any): Promise<HTTPResponse> { return; }
|
put(url: string, body: any, headers: any): Promise<HTTPResponse> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a PATCH request
|
* Make a PATCH request
|
||||||
@ -185,7 +199,9 @@ export class HTTP extends IonicNativePlugin {
|
|||||||
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
patch(url: string, body: any, headers: any): Promise<HTTPResponse> { return; }
|
patch(url: string, body: any, headers: any): Promise<HTTPResponse> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a DELETE request
|
* Make a DELETE request
|
||||||
@ -195,7 +211,9 @@ export class HTTP extends IonicNativePlugin {
|
|||||||
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
delete(url: string, parameters: any, headers: any): Promise<HTTPResponse> { return; }
|
delete(url: string, parameters: any, headers: any): Promise<HTTPResponse> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a HEAD request
|
* Make a HEAD request
|
||||||
@ -205,7 +223,9 @@ export class HTTP extends IonicNativePlugin {
|
|||||||
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
head(url: string, parameters: any, headers: any): Promise<HTTPResponse> { return; }
|
head(url: string, parameters: any, headers: any): Promise<HTTPResponse> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -217,7 +237,15 @@ export class HTTP extends IonicNativePlugin {
|
|||||||
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
uploadFile(url: string, body: any, headers: any, filePath: string, name: string): Promise<HTTPResponse> { return; }
|
uploadFile(
|
||||||
|
url: string,
|
||||||
|
body: any,
|
||||||
|
headers: any,
|
||||||
|
filePath: string,
|
||||||
|
name: string
|
||||||
|
): Promise<HTTPResponse> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -228,5 +256,12 @@ export class HTTP extends IonicNativePlugin {
|
|||||||
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
downloadFile(url: string, body: any, headers: any, filePath: string): Promise<HTTPResponse> { return; }
|
downloadFile(
|
||||||
|
url: string,
|
||||||
|
body: any,
|
||||||
|
headers: any,
|
||||||
|
filePath: string
|
||||||
|
): Promise<HTTPResponse> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,10 @@ export interface InAppBrowserOptions {
|
|||||||
mediaPlaybackRequiresUserAction?: 'yes' | 'no';
|
mediaPlaybackRequiresUserAction?: 'yes' | 'no';
|
||||||
/** (Android Only) Set to yes to make InAppBrowser WebView to pause/resume with the app to stop background audio (this may be required to avoid Google Play issues) */
|
/** (Android Only) Set to yes to make InAppBrowser WebView to pause/resume with the app to stop background audio (this may be required to avoid Google Play issues) */
|
||||||
shouldPauseOnSuspend?: 'yes' | 'no';
|
shouldPauseOnSuspend?: 'yes' | 'no';
|
||||||
|
/** (Android Only) Set to yes to show a close button in the footer similar to the iOS Done button. The close button will appear the same as for the header hence use closebuttoncaption and closebuttoncolor to set its properties */
|
||||||
|
footer?: 'yes' | 'no';
|
||||||
|
/** (Android Only) Set to a valid hex color string, for example #00ff00 or #CC00ff00 (#aarrggbb) , and it will change the footer color from default. Only has effect if user has footer set to yes */
|
||||||
|
footercolor?: string;
|
||||||
/** (iOS Only) Set to a string to use as the Done button's caption. Note that you need to localize this value yourself. */
|
/** (iOS Only) Set to a string to use as the Done button's caption. Note that you need to localize this value yourself. */
|
||||||
closebuttoncaption?: string;
|
closebuttoncaption?: string;
|
||||||
/** (iOS Only) Set to yes or no (default is no). Turns on/off the UIWebViewBounce property. */
|
/** (iOS Only) Set to yes or no (default is no). Turns on/off the UIWebViewBounce property. */
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Plugin, Cordova, CordovaFunctionOverride, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
import { Observable } from 'rxjs/Observable';
|
|
||||||
|
|
||||||
export interface IndexItem {
|
export interface IndexItem {
|
||||||
domain: string;
|
domain: string;
|
||||||
@ -72,7 +71,6 @@ export interface IndexItem {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class IndexAppContent extends IonicNativePlugin {
|
export class IndexAppContent extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The option to index app content might not be available at all due to device limitations or user settings.
|
* The option to index app content might not be available at all due to device limitations or user settings.
|
||||||
* Therefore it's highly recommended to check upfront if indexing is possible.
|
* Therefore it's highly recommended to check upfront if indexing is possible.
|
||||||
@ -93,16 +91,6 @@ export class IndexAppContent extends IonicNativePlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* If user taps on a search result in spotlight then the app will be launched.
|
|
||||||
* You can register a Javascript handler to get informed when this happens.
|
|
||||||
* @returns {Observable<any>} returns an observable that notifies you when he user presses on the home screen icon
|
|
||||||
*/
|
|
||||||
@CordovaFunctionOverride()
|
|
||||||
onItemPressed(): Observable<any> {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear all items stored for a given array of domains
|
* Clear all items stored for a given array of domains
|
||||||
* @param {Array<string>} Array of domains to clear
|
* @param {Array<string>} Array of domains to clear
|
||||||
@ -132,5 +120,4 @@ export class IndexAppContent extends IonicNativePlugin {
|
|||||||
setIndexingInterval(intervalMinutes: number) {
|
setIndexingInterval(intervalMinutes: number) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,7 @@ export class Intercom extends IonicNativePlugin {
|
|||||||
* @param secureHash {string}
|
* @param secureHash {string}
|
||||||
* @param secureData {any}
|
* @param secureData {any}
|
||||||
* @return {Promise<any>} Returns a promise
|
* @return {Promise<any>} Returns a promise
|
||||||
|
* @deprecated Use setUserHash instead as of Intercom Cordova 4.0.0 and higher https://github.com/intercom/intercom-cordova/blob/master/CHANGELOG.md#400-2017-08-29
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setSecureMode(secureHash: string, secureData: any): Promise<any> { return; }
|
setSecureMode(secureHash: string, secureData: any): Promise<any> { return; }
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Is Debug
|
* @name Is Debug
|
||||||
@ -16,8 +16,8 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
* ...
|
* ...
|
||||||
*
|
*
|
||||||
* this.isDebug.getIsDebug()
|
* this.isDebug.getIsDebug()
|
||||||
* .then((isDebug: boolean) => console.log('Is debug:', isDebug))
|
* .then(isDebug => console.log('Is debug:', isDebug))
|
||||||
* .catch((error: any) => console.error(error));
|
* .catch(err => console.error(err));
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
@ -30,7 +30,6 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class IsDebug extends IonicNativePlugin {
|
export class IsDebug extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if an app was installed via xcode / eclipse / the ionic CLI etc
|
* Determine if an app was installed via xcode / eclipse / the ionic CLI etc
|
||||||
* @returns {Promise<boolean>} Returns a promise that resolves with true if the app was installed via xcode / eclipse / the ionic CLI etc. It will resolve to false if the app was downloaded from the app / play store by the end user.
|
* @returns {Promise<boolean>} Returns a promise that resolves with true if the app was installed via xcode / eclipse / the ionic CLI etc. It will resolve to false if the app was downloaded from the app / play store by the end user.
|
||||||
@ -39,5 +38,4 @@ export class IsDebug extends IonicNativePlugin {
|
|||||||
getIsDebug(): Promise<boolean> {
|
getIsDebug(): Promise<boolean> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
9
src/@ionic-native/plugins/local-notifications/index.ts
Normal file → Executable file
9
src/@ionic-native/plugins/local-notifications/index.ts
Normal file → Executable file
@ -94,6 +94,11 @@ export interface ILocalNotification {
|
|||||||
* Notification priority.
|
* Notification priority.
|
||||||
*/
|
*/
|
||||||
priority?: number;
|
priority?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is a silent notification
|
||||||
|
*/
|
||||||
|
silent?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -300,11 +305,11 @@ export class LocalNotifications extends IonicNativePlugin {
|
|||||||
getAllTriggered(): Promise<Array<ILocalNotification>> { return; }
|
getAllTriggered(): Promise<Array<ILocalNotification>> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register permission to show notifications if not already granted.
|
* Request permission to show notifications if not already granted.
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
registerPermission(): Promise<boolean> { return; }
|
requestPermission(): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Informs if the app has the permission to show notifications.
|
* Informs if the app has the permission to show notifications.
|
||||||
|
@ -72,6 +72,13 @@ export class Mixpanel extends IonicNativePlugin {
|
|||||||
@Cordova()
|
@Cordova()
|
||||||
init(token: string): Promise<any> { return; }
|
init(token: string): Promise<any> { return; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
getSuperProperties(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param superProperties {any}
|
* @param superProperties {any}
|
||||||
@ -80,6 +87,22 @@ export class Mixpanel extends IonicNativePlugin {
|
|||||||
@Cordova()
|
@Cordova()
|
||||||
registerSuperProperties(superProperties: any): Promise<any> { return; }
|
registerSuperProperties(superProperties: any): Promise<any> { return; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param superProperties {any}
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
registerSuperPropertiesOnce(superProperties: any): Promise<any> { return; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param superPropertyName {string}
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
unregisterSuperProperty(superPropertyName: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
|
@ -17,7 +17,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
* ...
|
* ...
|
||||||
*
|
*
|
||||||
* let autoHide: boolean = true;
|
* let autoHide: boolean = true;
|
||||||
* this.navigationBar.hide(autoHide);
|
* this.navigationBar.setUp(autoHide);
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
|
@ -397,7 +397,6 @@ export enum OSActionType {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class OneSignal extends IonicNativePlugin {
|
export class OneSignal extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* constants to use in inFocusDisplaying()
|
* constants to use in inFocusDisplaying()
|
||||||
*/
|
*/
|
||||||
@ -415,7 +414,9 @@ export class OneSignal extends IonicNativePlugin {
|
|||||||
* @returns {any}
|
* @returns {any}
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
startInit(appId: string, googleProjectNumber?: string): any { return; }
|
startInit(appId: string, googleProjectNumber?: string): any {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback to run when a notification is received, whether it was displayed or not.
|
* Callback to run when a notification is received, whether it was displayed or not.
|
||||||
@ -425,7 +426,9 @@ export class OneSignal extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
handleNotificationReceived(): Observable<OSNotification> { return; }
|
handleNotificationReceived(): Observable<OSNotification> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback to run when a notification is tapped on from the notification shade (**ANDROID**) or notification
|
* Callback to run when a notification is tapped on from the notification shade (**ANDROID**) or notification
|
||||||
@ -437,7 +440,9 @@ export class OneSignal extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
handleNotificationOpened(): Observable<OSNotificationOpenedResult> { return; }
|
handleNotificationOpened(): Observable<OSNotificationOpenedResult> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* **iOS** - Settings for iOS apps
|
* **iOS** - Settings for iOS apps
|
||||||
@ -457,7 +462,9 @@ export class OneSignal extends IonicNativePlugin {
|
|||||||
iOSSettings(settings: {
|
iOSSettings(settings: {
|
||||||
kOSSettingsKeyAutoPrompt: boolean;
|
kOSSettingsKeyAutoPrompt: boolean;
|
||||||
kOSSettingsKeyInAppLaunchURL: boolean;
|
kOSSettingsKeyInAppLaunchURL: boolean;
|
||||||
}): any { return; }
|
}): any {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Must be called after `startInit` to complete initialization of OneSignal.
|
* Must be called after `startInit` to complete initialization of OneSignal.
|
||||||
@ -465,7 +472,9 @@ export class OneSignal extends IonicNativePlugin {
|
|||||||
* @returns {any}
|
* @returns {any}
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
endInit(): any { return; }
|
endInit(): any {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prompt the user for notification permissions. Callback fires as soon as the user accepts or declines notifications.
|
* Prompt the user for notification permissions. Callback fires as soon as the user accepts or declines notifications.
|
||||||
@ -474,7 +483,9 @@ export class OneSignal extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS']
|
platforms: ['iOS']
|
||||||
})
|
})
|
||||||
promptForPushNotificationsWithUserResponse(): Promise<boolean> { return; }
|
promptForPushNotificationsWithUserResponse(): Promise<boolean> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve a list of tags that have been set on the user from the OneSignal server.
|
* Retrieve a list of tags that have been set on the user from the OneSignal server.
|
||||||
@ -484,7 +495,9 @@ export class OneSignal extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>} Returns a Promise that resolves when tags are recieved.
|
* @returns {Promise<any>} Returns a Promise that resolves when tags are recieved.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getTags(): Promise<any> { return; }
|
getTags(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lets you retrieve the OneSignal user id and device token.
|
* Lets you retrieve the OneSignal user id and device token.
|
||||||
@ -497,8 +510,9 @@ export class OneSignal extends IonicNativePlugin {
|
|||||||
* pushToken {string} A push token is a Google/Apple assigned identifier(unique per device per app).
|
* pushToken {string} A push token is a Google/Apple assigned identifier(unique per device per app).
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getIds(): Promise<{userId: string; pushToken: string}> { return; }
|
getIds(): Promise<{ userId: string; pushToken: string }> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tag a user based on an app event of your choosing so later you can create segments on [onesignal.com](https://onesignal.com/) to target these users.
|
* Tag a user based on an app event of your choosing so later you can create segments on [onesignal.com](https://onesignal.com/) to target these users.
|
||||||
@ -574,7 +588,9 @@ export class OneSignal extends IonicNativePlugin {
|
|||||||
* @returns {any}
|
* @returns {any}
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
inFocusDisplaying(displayOption: OSDisplayType): any { return; }
|
inFocusDisplaying(displayOption: OSDisplayType): any {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* You can call this method with false to opt users out of receiving all notifications through OneSignal.
|
* You can call this method with false to opt users out of receiving all notifications through OneSignal.
|
||||||
@ -591,7 +607,9 @@ export class OneSignal extends IonicNativePlugin {
|
|||||||
* @returns {Promise<OSPermissionSubscriptionState>}
|
* @returns {Promise<OSPermissionSubscriptionState>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getPermissionSubscriptionState(): Promise<OSPermissionSubscriptionState> { return; }
|
getPermissionSubscriptionState(): Promise<OSPermissionSubscriptionState> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -599,7 +617,9 @@ export class OneSignal extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>} Returns a Promise that resolves if the notification was send successfully.
|
* @returns {Promise<any>} Returns a Promise that resolves if the notification was send successfully.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
postNotification(notificationObj: OSNotification): Promise<any> { return; }
|
postNotification(notificationObj: OSNotification): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cancels a single OneSignal notification based on its Android notification integer id. Use instead of NotificationManager.cancel(id); otherwise the notification will be restored when your app is restarted.
|
* Cancels a single OneSignal notification based on its Android notification integer id. Use instead of NotificationManager.cancel(id); otherwise the notification will be restored when your app is restarted.
|
||||||
@ -630,10 +650,7 @@ export class OneSignal extends IonicNativePlugin {
|
|||||||
* @param {loglevel} contains two properties: logLevel (for console logging) and visualLevel (for dialog messages)
|
* @param {loglevel} contains two properties: logLevel (for console logging) and visualLevel (for dialog messages)
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
setLogLevel(logLevel: {
|
setLogLevel(logLevel: { logLevel: number; visualLevel: number }): void {}
|
||||||
logLevel: number,
|
|
||||||
visualLevel: number
|
|
||||||
}): void { }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The passed in function will be fired when a notification permission setting changes.
|
* The passed in function will be fired when a notification permission setting changes.
|
||||||
@ -646,7 +663,9 @@ export class OneSignal extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
addPermissionObserver(): Observable<any> { return; }
|
addPermissionObserver(): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The passed in function will be fired when a notification subscription property changes.
|
* The passed in function will be fired when a notification subscription property changes.
|
||||||
@ -660,6 +679,13 @@ export class OneSignal extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
addSubscriptionObserver(): Observable<any> { return; }
|
addSubscriptionObserver(): Observable<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears all OneSignla notifications
|
||||||
|
*/
|
||||||
|
@Cordova({ sync: true })
|
||||||
|
clearOneSignalNotifications(): void {}
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ export interface PrintOptions {
|
|||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'Printer',
|
pluginName: 'Printer',
|
||||||
plugin: 'de.appplant.cordova.plugin.printer',
|
plugin: 'cordova-plugin-printer',
|
||||||
pluginRef: 'cordova.plugins.printer',
|
pluginRef: 'cordova.plugins.printer',
|
||||||
repo: 'https://github.com/katzer/cordova-plugin-printer',
|
repo: 'https://github.com/katzer/cordova-plugin-printer',
|
||||||
platforms: ['Android', 'iOS', 'Windows']
|
platforms: ['Android', 'iOS', 'Windows']
|
||||||
|
@ -134,7 +134,7 @@ export interface AndroidPushOptions {
|
|||||||
/**
|
/**
|
||||||
* Maps to the project number in the Google Developer Console.
|
* Maps to the project number in the Google Developer Console.
|
||||||
*/
|
*/
|
||||||
senderID: string;
|
senderID?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of a drawable resource to use as the small-icon. The name should
|
* The name of a drawable resource to use as the small-icon. The name should
|
||||||
@ -219,6 +219,7 @@ export interface Channel {
|
|||||||
id: string;
|
id: string;
|
||||||
description: string;
|
description: string;
|
||||||
importance: Priority;
|
importance: Priority;
|
||||||
|
sound?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PushEvent = string;
|
export type PushEvent = string;
|
||||||
@ -334,15 +335,19 @@ export class Push extends IonicNativePlugin {
|
|||||||
* Create a new notification channel for Android O and above.
|
* Create a new notification channel for Android O and above.
|
||||||
* @param channel {Channel}
|
* @param channel {Channel}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova({
|
||||||
createChannel(channel: Channel): Promise<any> { return; }
|
callbackOrder: 'reverse'
|
||||||
|
})
|
||||||
|
createChannel(channel?: Channel): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete a notification channel for Android O and above.
|
* Delete a notification channel for Android O and above.
|
||||||
* @param id
|
* @param id {string}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova({
|
||||||
deleteChannel(id: string): Promise<any> { return; }
|
callbackOrder: 'reverse'
|
||||||
|
})
|
||||||
|
deleteChannel(id?: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of currently configured channels.
|
* Returns a list of currently configured channels.
|
||||||
|
@ -2,9 +2,24 @@ import { Injectable } from '@angular/core';
|
|||||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||||
|
|
||||||
export interface SpinnerDialogIOSOptions {
|
export interface SpinnerDialogIOSOptions {
|
||||||
|
/**
|
||||||
|
* Opacity of the overlay, between 0 (transparent) and 1 (opaque). Default: 0.35
|
||||||
|
*/
|
||||||
overlayOpacity?: number;
|
overlayOpacity?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Red component of the text color, between 0 and 1. Default: 1
|
||||||
|
*/
|
||||||
textColorRed?: number;
|
textColorRed?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Green component of the text color, between 0 and 1. Default: 1
|
||||||
|
*/
|
||||||
textColorGreen?: number;
|
textColorGreen?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Blue component of the text color, between 0 and 1. Default: 1
|
||||||
|
*/
|
||||||
textColorBlue?: number;
|
textColorBlue?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, CordovaInstance, Plugin, CordovaCheck, InstanceProperty, IonicNativePlugin } from '@ionic-native/core';
|
import {
|
||||||
|
Cordova,
|
||||||
|
CordovaCheck,
|
||||||
|
CordovaInstance,
|
||||||
|
InstanceProperty,
|
||||||
|
IonicNativePlugin,
|
||||||
|
Plugin
|
||||||
|
} from '@ionic-native/core';
|
||||||
|
|
||||||
declare const sqlitePlugin: any;
|
declare const sqlitePlugin: any;
|
||||||
|
|
||||||
@ -31,8 +38,18 @@ export interface SQLiteDatabaseConfig {
|
|||||||
*/
|
*/
|
||||||
export interface SQLiteTransaction {
|
export interface SQLiteTransaction {
|
||||||
start: () => void;
|
start: () => void;
|
||||||
executeSql: (sql: any, values: any, success: Function, error: Function) => void;
|
executeSql: (
|
||||||
addStatement: (sql: any, values: any, success: Function, error: Function) => void;
|
sql: any,
|
||||||
|
values: any,
|
||||||
|
success: Function,
|
||||||
|
error: Function
|
||||||
|
) => void;
|
||||||
|
addStatement: (
|
||||||
|
sql: any,
|
||||||
|
values: any,
|
||||||
|
success: Function,
|
||||||
|
error: Function
|
||||||
|
) => void;
|
||||||
handleStatementSuccess: (handler: Function, response: any) => void;
|
handleStatementSuccess: (handler: Function, response: any) => void;
|
||||||
handleStatementFailure: (handler: Function, response: any) => void;
|
handleStatementFailure: (handler: Function, response: any) => void;
|
||||||
run: () => void;
|
run: () => void;
|
||||||
@ -45,7 +62,6 @@ export interface SQLiteTransaction {
|
|||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
export class SQLiteObject {
|
export class SQLiteObject {
|
||||||
|
|
||||||
constructor(public _objectInstance: any) {}
|
constructor(public _objectInstance: any) {}
|
||||||
|
|
||||||
@InstanceProperty databaseFeatures: { isSQLitePluginDatabase: boolean };
|
@InstanceProperty databaseFeatures: { isSQLitePluginDatabase: boolean };
|
||||||
@ -65,14 +81,18 @@ export class SQLiteObject {
|
|||||||
successIndex: 2,
|
successIndex: 2,
|
||||||
errorIndex: 1
|
errorIndex: 1
|
||||||
})
|
})
|
||||||
transaction(fn: any): Promise<any> { return; }
|
transaction(fn: any): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param fn {Function}
|
* @param fn {Function}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
readTransaction(fn: (tx: SQLiteTransaction) => void): Promise<any> { return; }
|
readTransaction(fn: (tx: SQLiteTransaction) => void): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
@ -83,33 +103,40 @@ export class SQLiteObject {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
open(): Promise<any> { return; }
|
open(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
close(): Promise<any> { return; }
|
close(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute SQL on the opened database. Note, you must call `create` first, and
|
* Execute SQL on the opened database. Note, you must call `create` first, and
|
||||||
* ensure it resolved and successfully opened the database.
|
* ensure it resolved and successfully opened the database.
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
executeSql(statement: string, params: any): Promise<any> { return; }
|
executeSql(statement: string, params: any): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param sqlStatements {Array<string | string[] | any>}
|
* @param sqlStatements {Array<string | string[] | any>}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
sqlBatch(sqlStatements: Array<string | string[] | any>): Promise<any> { return; }
|
sqlBatch(sqlStatements: Array<string | string[] | any>): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
abortallPendingTransactions(): void {}
|
abortallPendingTransactions(): void {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -159,7 +186,6 @@ export class SQLiteObject {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class SQLite extends IonicNativePlugin {
|
export class SQLite extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open or create a SQLite database file.
|
* Open or create a SQLite database file.
|
||||||
*
|
*
|
||||||
@ -171,7 +197,11 @@ export class SQLite extends IonicNativePlugin {
|
|||||||
@CordovaCheck()
|
@CordovaCheck()
|
||||||
create(config: SQLiteDatabaseConfig): Promise<SQLiteObject> {
|
create(config: SQLiteDatabaseConfig): Promise<SQLiteObject> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
sqlitePlugin.openDatabase(config, (db: any) => resolve(new SQLiteObject(db)), reject);
|
sqlitePlugin.openDatabase(
|
||||||
|
config,
|
||||||
|
(db: any) => resolve(new SQLiteObject(db)),
|
||||||
|
reject
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,7 +210,18 @@ export class SQLite extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
echoTest(): Promise<any> { return; }
|
echoTest(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Automatically verify basic database access operations including opening a database
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
selfTest(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes a database
|
* Deletes a database
|
||||||
@ -188,6 +229,7 @@ export class SQLite extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
deleteDatabase(config: SQLiteDatabaseConfig): Promise<any> { return; }
|
deleteDatabase(config: SQLiteDatabaseConfig): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,9 @@ import { Cordova, CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-nati
|
|||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @beta
|
|
||||||
* @name Web Intent
|
* @name Web Intent
|
||||||
* @description
|
* @description
|
||||||
|
* This Plugin provides a general purpose shim layer for the Android intent mechanism, exposing various ways to handle sending and receiving intents.
|
||||||
* @usage
|
* @usage
|
||||||
* For usage information please refer to the plugin's Github repo.
|
* For usage information please refer to the plugin's Github repo.
|
||||||
*
|
*
|
||||||
@ -35,77 +35,65 @@ import { Observable } from 'rxjs/Observable';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class WebIntent extends IonicNativePlugin {
|
export class WebIntent extends IonicNativePlugin {
|
||||||
|
/**
|
||||||
|
* Convenience constant for actions
|
||||||
|
* @type {string}
|
||||||
|
*/
|
||||||
|
@CordovaProperty ACTION_SEND: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for actions
|
* Convenience constant for actions
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty
|
@CordovaProperty ACTION_VIEW: string;
|
||||||
ACTION_SEND: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convenience constant for actions
|
|
||||||
* @type {string}
|
|
||||||
*/
|
|
||||||
@CordovaProperty
|
|
||||||
ACTION_VIEW: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for extras
|
* Convenience constant for extras
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty
|
@CordovaProperty EXTRA_TEXT: string;
|
||||||
EXTRA_TEXT: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for extras
|
* Convenience constant for extras
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty
|
@CordovaProperty EXTRA_SUBJECT: string;
|
||||||
EXTRA_SUBJECT: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for extras
|
* Convenience constant for extras
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty
|
@CordovaProperty EXTRA_STREAM: string;
|
||||||
EXTRA_STREAM: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for extras
|
* Convenience constant for extras
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty
|
@CordovaProperty EXTRA_EMAIL: string;
|
||||||
EXTRA_EMAIL: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for actions
|
* Convenience constant for actions
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty
|
@CordovaProperty ACTION_CALL: string;
|
||||||
ACTION_CALL: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for actions
|
* Convenience constant for actions
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty
|
@CordovaProperty ACTION_SENDTO: string;
|
||||||
ACTION_SENDTO: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for actions
|
* Convenience constant for actions
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty
|
@CordovaProperty ACTION_GET_CONTENT: string;
|
||||||
ACTION_GET_CONTENT: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience constant for actions
|
* Convenience constant for actions
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@CordovaProperty
|
@CordovaProperty ACTION_PICK: string;
|
||||||
ACTION_PICK: string;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Launches an Android intent
|
* Launches an Android intent
|
||||||
@ -113,7 +101,13 @@ export class WebIntent extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
startActivity(options: { action: any, url: string, type?: string }): Promise<any> { return; }
|
startActivity(options: {
|
||||||
|
action: any;
|
||||||
|
url: string;
|
||||||
|
type?: string;
|
||||||
|
}): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts a new activity and return the result to the application
|
* Starts a new activity and return the result to the application
|
||||||
@ -121,7 +115,13 @@ export class WebIntent extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
startActivityForResult(options: { action: any, url: string, type?: string }): Promise<any> { return; }
|
startActivityForResult(options: {
|
||||||
|
action: any;
|
||||||
|
url: string;
|
||||||
|
type?: string;
|
||||||
|
}): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if this app was invoked with specified extra
|
* Checks if this app was invoked with specified extra
|
||||||
@ -129,7 +129,9 @@ export class WebIntent extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
hasExtra(extra: string): Promise<any> { return; }
|
hasExtra(extra: string): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the extra that this app was invoked with
|
* Gets the extra that this app was invoked with
|
||||||
@ -137,14 +139,18 @@ export class WebIntent extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getExtra(extra: string): Promise<any> { return; }
|
getExtra(extra: string): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the Uri the app was invoked with
|
* Gets the Uri the app was invoked with
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getUri(): Promise<string> { return; };
|
getUri(): Promise<string> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns {Observable<string>}
|
* @returns {Observable<string>}
|
||||||
@ -152,7 +158,9 @@ export class WebIntent extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
onNewIntent(): Observable<string> { return; };
|
onNewIntent(): Observable<string> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends a custom intent passing optional extras
|
* Sends a custom intent passing optional extras
|
||||||
@ -160,7 +168,25 @@ export class WebIntent extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
sendBroadcast(options: { action: string, extras?: { option: boolean } }): Promise<any> { return; }
|
sendBroadcast(options: {
|
||||||
|
action: string;
|
||||||
|
extras?: { option: boolean };
|
||||||
|
}): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request that a given application service be started
|
||||||
|
* @param options {Object} { action: string, extras?: { option: boolean } }
|
||||||
|
* @returns {Promise<any>}
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
startService(options: {
|
||||||
|
action: string;
|
||||||
|
extras?: { option: boolean };
|
||||||
|
}): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers a broadcast receiver for the specified filters
|
* Registers a broadcast receiver for the specified filters
|
||||||
@ -191,6 +217,7 @@ export class WebIntent extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getIntent(): Promise<any> { return; };
|
getIntent(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ export interface WheelSelectorOptions {
|
|||||||
* Android only - theme color, 'light' or 'dark'.
|
* Android only - theme color, 'light' or 'dark'.
|
||||||
* Default: light
|
* Default: light
|
||||||
*/
|
*/
|
||||||
theme?: string;
|
theme?: 'light' | 'dark';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether to have the wheels 'wrap' (Android only)
|
* Whether to have the wheels 'wrap' (Android only)
|
||||||
@ -76,7 +76,7 @@ export interface WheelSelectorData {
|
|||||||
*
|
*
|
||||||
* ...
|
* ...
|
||||||
*
|
*
|
||||||
* let jsonData = {
|
* const jsonData = {
|
||||||
* numbers: [
|
* numbers: [
|
||||||
* { description: "1" },
|
* { description: "1" },
|
||||||
* { description: "2" },
|
* { description: "2" },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user