Merge remote-tracking branch 'origin/master' into v5

This commit is contained in:
Daniel 2018-03-19 08:44:12 +01:00
commit a6d5d51489
15 changed files with 632 additions and 111 deletions

View File

@ -3,7 +3,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export type AdSize =
'SMART_BANNER'
| 'SMART_BANNER'
| 'BANNER'
| 'MEDIUM_RECTANGLE'
| 'FULL_BANNER'
@ -12,7 +12,6 @@ export type AdSize =
| 'CUSTOM';
export interface AdMobOptions {
/**
* Banner ad ID
*/
@ -78,10 +77,13 @@ export interface AdMobOptions {
*/
license?: any;
/**
* Set offset
*/
offsetTopBar?: boolean;
}
export interface AdExtras {
color_bg: string;
color_bg_top: string;
@ -93,7 +95,6 @@ export interface AdExtras {
color_text: string;
color_url: string;
}
/**
@ -141,7 +142,6 @@ export interface AdExtras {
})
@Injectable()
export class AdMobPro extends IonicNativePlugin {
AD_POSITION: {
NO_CHANGE: number;
TOP_LEFT: number;
@ -184,8 +184,7 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
sync: true
})
removeBanner(): void {
}
removeBanner(): void {}
/**
* Show banner at position
@ -194,8 +193,7 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
sync: true
})
showBanner(position: number): void {
}
showBanner(position: number): void {}
/**
* Show banner at custom position
@ -205,8 +203,7 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
sync: true
})
showBannerAtXY(x: number, y: number): void {
}
showBannerAtXY(x: number, y: number): void {}
/**
* Hide the banner, remove it from screen, but can show it later
@ -214,8 +211,7 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
sync: true
})
hideBanner(): void {
}
hideBanner(): void {}
/**
* Prepare interstitial banner
@ -233,8 +229,7 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
sync: true
})
showInterstitial(): void {
}
showInterstitial(): void {}
/**
* Prepare a reward video ad
@ -252,8 +247,7 @@ export class AdMobPro extends IonicNativePlugin {
@Cordova({
sync: true
})
showRewardVideoAd(): void {
}
showRewardVideoAd(): void {}
/**
* Sets the values for configuration and targeting
@ -338,5 +332,4 @@ export class AdMobPro extends IonicNativePlugin {
onAdDismiss(): Observable<any> {
return;
}
}

View File

@ -46,8 +46,7 @@ export class Appodeal extends IonicNativePlugin {
* @param {number} adType
*/
@Cordova()
initialize(appKey: string, adType: number): void {
}
initialize(appKey: string, adType: number): void {}
/**
* check if SDK has been initialized
@ -75,8 +74,7 @@ export class Appodeal extends IonicNativePlugin {
* @returns {Promise<boolean>}
*/
@Cordova()
showWithPlacement(adType: number,
placement: any): Promise<any> {
showWithPlacement(adType: number, placement: any): Promise<any> {
return;
}
@ -85,15 +83,16 @@ export class Appodeal extends IonicNativePlugin {
* @param {number} adType
*/
@Cordova()
hide(adType: number): void {
}
hide(adType: number): void {}
/**
* confirm use of ads of specified type
* @param {number} adType
* @returns {Promise<any>}
*/
@Cordova()
confirm(adType: number): void {
canShow(adType: number): Promise<any> {
return;
}
/**
@ -122,79 +121,69 @@ export class Appodeal extends IonicNativePlugin {
* @param autoCache
*/
@Cordova()
setAutoCache(adType: number, autoCache: any): void {
}
setAutoCache(adType: number, autoCache: any): void {}
/**
* forcefully cache an ad by type
* @param {number} adType
*/
@Cordova()
cache(adType: number): void {
}
cache(adType: number): void {}
/**
*
* @param {boolean} set
*/
@Cordova()
setOnLoadedTriggerBoth(set: boolean): void {
}
setTriggerOnLoadedOnPrecache(set: boolean): void {}
/**
* enable or disable Smart Banners
* @param {boolean} enabled
*/
@Cordova()
setSmartBanners(enabled: boolean): void {
}
setSmartBanners(enabled: boolean): void {}
/**
* enable or disable banner backgrounds
* @param {boolean} enabled
*/
@Cordova()
setBannerBackground(enabled: boolean): void {
}
setBannerBackground(enabled: boolean): void {}
/**
* enable or disable banner animations
* @param {boolean} enabled
*/
@Cordova()
setBannerAnimation(enabled: boolean): void {
}
setBannerAnimation(enabled: boolean): void {}
/**
*
* @param value
*/
@Cordova()
set728x90Banners(value: any): void {
}
set728x90Banners(value: any): void {}
/**
* enable or disable logging
* @param {boolean} logging
*/
@Cordova()
setLogging(logging: boolean): void {
}
setLogLevel(logging: boolean): void {}
/**
* enable or disable testing mode
* @param {boolean} testing
*/
@Cordova()
setTesting(testing: boolean): void {
}
setTesting(testing: boolean): void {}
/**
* reset device ID
*/
@Cordova()
resetUUID(): void {
}
resetUUID(): void {}
/**
* get version of Appdeal SDK
@ -210,8 +199,7 @@ export class Appodeal extends IonicNativePlugin {
* @param {number} adType
*/
@Cordova()
disableNetwork(network?: string, adType?: number): void {
}
disableNetwork(network?: string, adType?: number): void {}
/**
*
@ -219,62 +207,54 @@ export class Appodeal extends IonicNativePlugin {
* @param {number} adType
*/
@Cordova()
disableNetworkType(network?: string, adType?: number): void {
}
disableNetworkType(network?: string, adType?: number): void {}
/**
* disable Location permissions for Appodeal SDK
*/
@Cordova()
disableLocationPermissionCheck(): void {
}
disableLocationPermissionCheck(): void {}
/**
* disable Storage permissions for Appodeal SDK
*/
@Cordova()
disableWriteExternalStoragePermissionCheck(): void {
}
disableWriteExternalStoragePermissionCheck(): void {}
/**
* enable event listeners
* @param {boolean} enabled
*/
@Cordova()
enableInterstitialCallbacks(enabled: boolean): void {
}
enableInterstitialCallbacks(enabled: boolean): void {}
/**
* enable event listeners
* @param {boolean} enabled
*/
@Cordova()
enableSkippableVideoCallbacks(enabled: boolean): void {
}
enableSkippableVideoCallbacks(enabled: boolean): void {}
/**
* enable event listeners
* @param {boolean} enabled
*/
@Cordova()
enableNonSkippableVideoCallbacks(enabled: boolean): void {
}
enableNonSkippableVideoCallbacks(enabled: boolean): void {}
/**
* enable event listeners
* @param {boolean} enabled
*/
@Cordova()
enableBannerCallbacks(enabled: boolean): void {
}
enableBannerCallbacks(enabled: boolean): void {}
/**
* enable event listeners
* @param {boolean} enabled
*/
@Cordova()
enableRewardedVideoCallbacks(enabled: boolean): void {
}
enableRewardedVideoCallbacks(enabled: boolean): void {}
/**
*
@ -282,8 +262,7 @@ export class Appodeal extends IonicNativePlugin {
* @param {boolean} value
*/
@Cordova()
setCustomBooleanRule(name: string, value: boolean): void {
}
setCustomBooleanRule(name: string, value: boolean): void {}
/**
*
@ -291,8 +270,7 @@ export class Appodeal extends IonicNativePlugin {
* @param {number} value
*/
@Cordova()
setCustomIntegerRule(name: string, value: number): void {
}
setCustomIntegerRule(name: string, value: number): void {}
/**
* set rule with float value
@ -300,8 +278,7 @@ export class Appodeal extends IonicNativePlugin {
* @param {number} value
*/
@Cordova()
setCustomDoubleRule(name: string, value: number): void {
}
setCustomDoubleRule(name: string, value: number): void {}
/**
* set rule with string value
@ -309,88 +286,77 @@ export class Appodeal extends IonicNativePlugin {
* @param {string} value
*/
@Cordova()
setCustomStringRule(name: string, value: string): void {
}
setCustomStringRule(name: string, value: string): void {}
/**
* set ID preference in Appodeal for current user
* @param id
*/
@Cordova()
setUserId(id: any): void {
}
setUserId(id: any): void {}
/**
* set Email preference in Appodeal for current user
* @param email
*/
@Cordova()
setEmail(email: any): void {
}
setEmail(email: any): void {}
/**
* set Birthday preference in Appodeal for current user
* @param birthday
*/
@Cordova()
setBirthday(birthday: any): void {
}
setBirthday(birthday: any): void {}
/**
* et Age preference in Appodeal for current user
* @param age
*/
@Cordova()
setAge(age: any): void {
}
setAge(age: any): void {}
/**
* set Gender preference in Appodeal for current user
* @param gender
*/
@Cordova()
setGender(gender: any): void {
}
setGender(gender: any): void {}
/**
* set Occupation preference in Appodeal for current user
* @param occupation
*/
@Cordova()
setOccupation(occupation: any): void {
}
setOccupation(occupation: any): void {}
/**
* set Relation preference in Appodeal for current user
* @param relation
*/
@Cordova()
setRelation(relation: any): void {
}
setRelation(relation: any): void {}
/**
* set Smoking preference in Appodeal for current user
* @param smoking
*/
@Cordova()
setSmoking(smoking: any): void {
}
setSmoking(smoking: any): void {}
/**
* set Alcohol preference in Appodeal for current user
* @param alcohol
*/
@Cordova()
setAlcohol(alcohol: any): void {
}
setAlcohol(alcohol: any): void {}
/**
* set Interests preference in Appodeal for current user
* @param interests
*/
@Cordova()
setInterests(interests: any): void {
}
setInterests(interests: any): void {}
@Cordova({
eventObservable: true,
@ -607,4 +573,34 @@ export class Appodeal extends IonicNativePlugin {
onBannerShown(): Observable<any> {
return;
}
@Cordova()
getRewardParametersForPlacement(placement: string): Promise<any> {
return;
}
@Cordova()
getRewardParameters(): Promise<any> {
return;
}
@Cordova()
canShowWithPlacement(adType: string, placement: string): Promise<any> {
return;
}
@Cordova({
platforms: ['Android']
})
showTestScreen(value: any): void {}
@Cordova()
muteVideosIfCallsMuted(value: any): Promise<any> {
return;
}
@Cordova()
setChildDirectedTreatment(value: boolean): Promise<any> {
return;
}
}

View File

@ -101,7 +101,7 @@ export class Badge extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
registerPermission(): Promise<any> {
requestPermission(): Promise<any> {
return;
}
}

View File

@ -0,0 +1,114 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Injectable } from '@angular/core';
/**
* Interface of a blink up options.
*/
export interface BlinkUpOptions {
apiKey: string;
developmentPlanId?: string;
isInDevelopment?: boolean;
timeoutMs?: number;
}
/**
* Interface of a blink up wifi options.
*/
export interface BlinkUpWifiOptions {
apiKey: string;
timeoutMs?: number;
ssid: string;
password: string;
}
/**
* Interface of a blink up wps options.
*/
export interface BlinkUpWPSOptions {
apiKey: string;
timeoutMs?: number;
wpsPin: string;
}
/**
* @name BlinkUp
* @description
* Electric Imp BlinkUp ionic plugin.
*
* @usage
* ```typescript
* import { BlinkUp } from '@ionic-native/blinkup';
*
* const options = <BlinkUpWifiOptions>{
* apiKey: 'API_KEY',
* timeoutMs: 60000,
* ssid: 'MY_SSID',
* password: 'MY_PASSWORD'
* }
* BlinkUp.flashWifiBlinkUp(options).subscribe(
* (result) => console.log('Done'),
* (error) => console.log(error)
* )
* ```
*/
@Plugin({
pluginName: 'BlinkUp',
plugin: 'cordova-plugin-blinkup',
pluginRef: 'blinkup',
repo: 'https://github.com/SensorShare/cordova-plugin-blinkup',
platforms: ['Android', 'iOS']
})
@Injectable()
export class BlinkUp extends IonicNativePlugin {
/**
* startBlinkUp - starts the blinkup process
* @param {module:blinkup.BlinkUpOptions} options BlinkUp Options
* @return {Observable<any>} Returns an Observable
*/
@Cordova({
callbackOrder: 'reverse',
observable: true
})
startBlinkUp(options: BlinkUpOptions): Observable<any> { return; }
/**
* flashWifiBlinkUp - invokes the flash wifi process
* @param {module:blinkup.BlinkUpWifiOptions} options BlinkUp Wifi Options
* @return {Observable<any>} Returns an Observable
*/
@Cordova({
callbackOrder: 'reverse',
observable: true
})
flashWifiBlinkUp(options: BlinkUpWifiOptions): Observable<any> { return; }
/**
* flashWPSBlinkUp - invokes the flash wps process
* @param {module:blinkup.BlinkUpWPSOptions} options BlinkUp WPS Options
* @return {Observable<any>} Returns an Observable
*/
@Cordova({
callbackOrder: 'reverse',
observable: true
})
flashWPSBlinkUp(options: BlinkUpWPSOptions): Observable<any> { return; }
/**
* abortBlinkUp - abort blinkup process
* @return {Observable<any>} Returns an Observable
*/
@Cordova({
observable: true
})
abortBlinkUp(): Observable<any> { return; }
/**
* clearBlinkUpData - clear wifi data
* @return {Observable<any>} Returns an Observable
*/
@Cordova({
observable: true
})
clearBlinkUpData(): Observable<any> { return; }
}

View File

@ -131,12 +131,12 @@ export interface CameraPreviewPictureOptions {
pluginName: 'CameraPreview',
plugin: 'cordova-plugin-camera-preview',
pluginRef: 'CameraPreview',
repo: 'https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview',
repo:
'https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview',
platforms: ['Android', 'iOS']
})
@Injectable()
export class CameraPreview extends IonicNativePlugin {
FOCUS_MODE = {
FIXED: 'fixed',
AUTO: 'auto',
@ -445,4 +445,12 @@ export class CameraPreview extends IonicNativePlugin {
return;
}
/**
* Add a listener for the back event for the preview
* @return {Promise<any>} if backbutton pressed
*/
@Cordova()
onBackButton(): Promise<any> {
return;
}
}

View File

@ -0,0 +1,45 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
/**
* @name iOS DocumentPicker
* @description
*
* Opens the file picker on iOS for the user to select a file, returns a file URI.
* Allows the user to upload files from icloud
*
* @usage
* ```typescript
* import { IOSDocumentPicker } from '@ionic-native/document-picker';
*
* constructor(private docPicker: IOSDocumentPicker) { }
*
* ...
*
* this.docPicker.getFile('all')
* .then(uri => console.log(uri))
* .catch(e => console.log(e));
*
* ```
*/
@Plugin({
pluginName: 'IOSDocumentPicker',
plugin: 'cordova-plugin-documentpicker.DocumentPicker',
pluginRef: 'DocumentPicker',
repo: 'https://github.com/iampossible/Cordova-DocPicker',
platforms: ['iOS']
})
@Injectable()
export class DocumentPicker extends IonicNativePlugin {
/**
* Open a file
* @param {string} filters files between 'image', 'pdf' or 'all'
* @returns {Promise<string>}
*/
@Cordova()
getFile(options?: string): Promise<string> { return; }
}

View File

@ -156,17 +156,6 @@ export class Facebook extends IonicNativePlugin {
EVENT_PARAM_VALUE_NO: '0'
};
/**
* Browser wrapper
* @param {number} appId Your Facebook AppID from their dashboard
* @param {string} version The version of API you may want to use. Optional
* @returns {Promise<any>}
*/
@Cordova()
browserInit(appId: number, version?: string): Promise<any> {
return;
}
/**
* Login to Facebook to authenticate this app.
*

View File

@ -0,0 +1,41 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name File Chooser
* @description
*
* Opens the file picker on iOS for the user to select a file, returns a file URI.
*
* @usage
* ```typescript
* import { IOSFilePicker } from '@ionic-native/file-picker';
*
* constructor(private filePicker: IOSFilePicker) { }
*
* ...
*
* this.filePicker.pickFile()
* .then(uri => console.log(uri))
* .catch(err => console.log('Error', err));
*
* ```
*/
@Plugin({
pluginName: 'iOS File Picker',
plugin: 'cordova-plugin-filepicker',
pluginRef: 'filePicker',
repo: 'https://github.com/jcesarmobile/FilePicker-Phonegap-iOS-Plugin',
platforms: ['iOS']
})
@Injectable()
export class IOSFilePicker extends IonicNativePlugin {
/**
* Open a file
* @returns {Promise<string>}
*/
@Cordova()
pickFile(): Promise<string> {
return;
}
}

View File

@ -117,6 +117,14 @@ export interface GeolocationOptions {
*
* This API is based on the W3C Geolocation API Specification, and only executes on devices that don't already provide an implementation.
*
* For iOS you have to add this configuration to your configuration.xml file
* ```xml
* <edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
* <string>We want your location! Best regards NSA</string>
* </edit-config>
* ```
*
*
* @usage
*
* ```typescript

View File

@ -106,7 +106,7 @@ export class Globalization extends IonicNativePlugin {
/**
* Returns a pattern string to format and parse dates according to the client's user preferences.
* @param options Object with the format length and selector
* @returns {Promise<{ pattern: string, timezone: string, utf_offset: number, dst_offset: number }>} Returns a promise.
* @returns {Promise<{ pattern: string, timezone: string, utc_offset: number, dst_offset: number }>} Returns a promise.
*/
@Cordova({
callbackOrder: 'reverse'
@ -117,7 +117,7 @@ export class Globalization extends IonicNativePlugin {
pattern: string;
timezone: string;
iana_timezone: string;
utf_offset: number;
utc_offset: number;
dst_offset: number;
}> {
return;

View File

@ -0,0 +1,270 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin, CordovaCheck } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
declare var chcp: any;
export interface HotCodePushVersion {
/**
* Application's version name. This version is visible to the user on the stores.
*/
appVersion: string;
/**
* Application's build version number.
*/
buildVersion: string;
/**
* Version of the web content, that is displayed to the user. Basically, value of the release property from chcp.json file in your local www folder.
*/
currentWebVersion: string;
/**
* Previous web content version. This is a version of our backup. Can be empty, if there were no updates installed.
*/
previousWebVersion: string;
/**
* Version number of the web content, that was loaded by the plugin and ready to be installed. Basically, value of the release property from chcp.json file on your server. Can be empty, if no update is waiting for installation.
*/
readyToInstallWebVersion: string;
}
export interface HotCodePushUpdate {
/**
* Current version installed.
*/
currentVersion: string;
/**
* Available version to replace the current one.
*/
readyToInstallVersion: string;
}
export interface HotCodePushRequestOptions {
/**
* Url of the chcp.json config on the server. Plugin will use this one instead of <config-file url=""> from the config.xml.
*/
'config-file'?: string;
/**
* Additional HTTP headers, that will be added to all requests in update download process, including loading configs and new/changed files.
*/
'request-headers'?: {[key: string]: any};
}
/**
* For description on error codes, please visit https://github.com/nordnet/cordova-hot-code-push/wiki/Error-codes
*/
export enum ErrorCode {
NOTHING_TO_INSTALL = 1,
NOTHING_TO_UPDATE = 2,
FAILED_TO_DOWNLOAD_APPLICATION_CONFIG = -1,
APPLICATION_BUILD_VERSION_TOO_LOW = -2,
FAILED_TO_DOWNLOAD_CONTENT_MANIFEST = -3,
FAILED_TO_DOWNLOAD_UPDATE_FILES = -4,
FAILED_TO_MOVE_LOADED_FILES_TO_INSTALLATION_FOLDER = -5,
UPDATE_IS_INVALID = -6,
FAILED_TO_COPY_FILES_FROM_PREVIOUS_RELEASE = -7,
FAILED_TO_COPY_NEW_CONTENT_FILES = -8,
LOCAL_VERSION_OF_APPLICATION_CONFIG_NOT_FOUND = -9,
LOCAL_VERSION_OF_MANIFEST_NOT_FOUND = -10,
LOADED_VERSION_OF_APPLICATION_CONFIG_NOT_FOUND = -11,
LOADED_VERSION_OF_MANIFEST_NOT_FOUND = -12,
FAILED_TO_INSTALL_ASSETS_ON_EXTERNAL_STORAGE = -13,
CANT_INSTALL_WHILE_DOWNLOAD_IN_PROGRESS = -14,
CANT_DOWNLOAD_UPDATE_WHILE_INSTALLATION_IN_PROGRESS = -15,
INSTALLATION_ALREADY_IN_PROGRESS = -16,
DOWNLOAD_ALREADY_IN_PROGRESS = -17,
ASSETS_FOLDER_IS_NOT_YET_INSTALLED = -18,
NEW_APPLICATION_CONFIG_IS_INVALID = -19
}
export interface HotCodePushError {
code: ErrorCode;
description: string;
}
export interface HotCodePushEventData {
details?: {
error?: HotCodePushError;
};
};
/**
* @name Hot Code Push
* @description
* HotCodePush plugin for Cordova that supports iOS and Android. This plugin allows you to keep your html, css and js files synced with your server.
*
* For more info, please see the detailed wiki https://github.com/nordnet/cordova-hot-code-push/wiki
*
* @usage
* ```typescript
* import { HotCodePush } from '@ionic-native/hot-code-push';
*
* constructor(private hotCodePush: HotCodePush) { }
*
* ...
*
* hotCodePush.fetchUpdate(options).then(data => { console.log('Update available'); });
*
* ```
*/
@Plugin({
pluginName: 'HotCodePush',
plugin: 'cordova-hot-code-push',
pluginRef: 'chcp',
repo: 'https://github.com/nordnet/cordova-hot-code-push',
platforms: ['Android', 'iOS']
})
@Injectable()
export class HotCodePush extends IonicNativePlugin {
/**
* Show dialog with the request to update application through the Store (App Store or Google Play).
* @param message {string} Message to show in the dialog
* @returns {Promise<any>} Resolves when the user is redirected to the store, rejects if the user declines.
*/
@Cordova()
requestApplicationUpdate(message: string): Promise<any> { return; }
/**
* Download updates from the server-side.
* @param options {HotCodePushRequestOptions} Additional options to the request. If not set - preferences from config.xml are used.
* @returns {Promise<any>} Resolves if there is an update available, rejects otherwise.
*/
@CordovaCheck()
fetchUpdate(options?: HotCodePushRequestOptions): Promise<any> {
return new Promise<any>((resolve, reject) => {
HotCodePush.getPlugin().fetchUpdate((error: HotCodePushError, data: any) => {
if (error) {
reject(error);
} else {
resolve(data);
}
}, options);
});
}
/**
* Install update if there is anything to install.
* @returns {Promise<any>} Resolves when the update is installed.
*/
@Cordova({
callbackStyle: 'node'
})
installUpdate(): Promise<any> { return; }
/**
* Check if update was loaded and ready to be installed.
* @returns {Promise<HotCodePushUpdate>} Resolves if an update is ready, rejects if there is no update.
*/
@Cordova({
callbackStyle: 'node'
})
isUpdateAvailableForInstallation(): Promise<HotCodePushUpdate> { return; }
/**
* Gets information about the app's versions.
* @returns {Promise<HotCodePushVersion>} Resolves with the information about the versions.
*/
@Cordova({
callbackStyle: 'node'
})
getVersionInfo(): Promise<HotCodePushVersion> { return; }
/**
* Event sent when new release was successfully loaded and ready to be installed.
* @returns {Observable<HotCodePushEventData>}
*/
@Cordova({
eventObservable: true,
event: 'chcp_updateIsReadyToInstall'
})
onUpdateIsReadyToInstall(): Observable<HotCodePushEventData> { return; }
/**
* Event sent when plugin couldn't load update from the server. Error details are attached to the event.
* @returns {Observable<HotCodePushEventData>}
*/
@Cordova({
eventObservable: true,
event: 'chcp_updateLoadFailed'
})
onUpdateLoadFailed(): Observable<HotCodePushEventData> { return; }
/**
* Event sent when we successfully loaded application config from the server, but there is nothing new is available.
* @returns {Observable<HotCodePushEventData>}
*/
@Cordova({
eventObservable: true,
event: 'chcp_nothingToUpdate'
})
onNothingToUpdate(): Observable<HotCodePushEventData> { return; }
/**
* Event sent when an update is about to be installed.
* @returns {Observable<HotCodePushEventData>}
*/
@Cordova({
eventObservable: true,
event: 'chcp_beforeInstall'
})
onBeforeInstall(): Observable<HotCodePushEventData> { return; }
/**
* Event sent when update was successfully installed.
* @returns {Observable<HotCodePushEventData>}
*/
@Cordova({
eventObservable: true,
event: 'chcp_updateInstalled'
})
onUpdateInstalled(): Observable<HotCodePushEventData> { return; }
/**
* Event sent when update installation failed. Error details are attached to the event.
* @returns {Observable<HotCodePushEventData>}
*/
@Cordova({
eventObservable: true,
event: 'chcp_updateInstallFailed'
})
onUpdateInstallFailed(): Observable<HotCodePushEventData> { return; }
/**
* Event sent when there is nothing to install. Probably, nothing was loaded before that.
* @returns {Observable<HotCodePushEventData>}
*/
@Cordova({
eventObservable: true,
event: 'chcp_nothingToInstall'
})
onNothingToInstall(): Observable<HotCodePushEventData> { return; }
/**
* Event sent when plugin is about to start installing bundle content on the external storage.
* @returns {Observable<HotCodePushEventData>}
*/
@Cordova({
eventObservable: true,
event: 'chcp_beforeAssetsInstalledOnExternalStorage'
})
onBeforeAssetsInstalledOnExternalStorage(): Observable<HotCodePushEventData> { return; }
/**
* Event sent when plugin successfully copied web project files from bundle on the external storage. Most likely you will use it for debug purpose only. Or even never.
* @returns {Observable<HotCodePushEventData>}
*/
@Cordova({
eventObservable: true,
event: 'chcp_assetsInstalledOnExternalStorage'
})
onAssetsInstalledOnExternalStorage(): Observable<HotCodePushEventData> { return; }
/**
* Event sent when plugin couldn't copy files from bundle on the external storage. If this happens - plugin won't work. Can occur when there is not enough free space on the device.
* @returns {Observable<HotCodePushEventData>}
*/
@Cordova({
eventObservable: true,
event: 'chcp_assetsInstallationError'
})
onAssetsInstallationError(): Observable<HotCodePushEventData> { return; }
}

View File

@ -31,8 +31,7 @@ export interface ImageResizerOptions {
quality?: number;
/**
* A custom name for the file. Default name is a timestamp
* (Android and Windows only)
* A custom name for the file. Default name is a timestamp. You have to set this value on iOS
*/
fileName?: string;
}

View File

@ -0,0 +1,53 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
/**
* @name SpeechKit
* @description
* Implementation of Nuance SpeechKit SDK on Ionic
*
* @usage
* ```typescript
* import { SpeechKit } from '@ionic-native/speechkit';
*
* constructor(private speechkit: SpeechKit) { }
*
*
* this.speechkit.tts('Text to be read out loud', 'ENG-GBR').then(
* (msg) => { console.log(msg); },
* (err) => { console.log(err); }
* );
* ```
*/
@Plugin({
pluginName: 'SpeechKit',
plugin: 'cordova-plugin-nuance-speechkit',
pluginRef: 'plugins.speechkit',
repo: 'https://github.com/Shmarkus/cordova-plugin-nuance-speechkit',
platforms: ['Android', 'iOS']
})
@Injectable()
export class SpeechKit extends IonicNativePlugin {
/**
* Speak text out loud in given language
* @returns {Promise<string>}
*/
@Cordova()
tts(
text: string,
language: string
): Promise<string> { return; }
/**
* Try to recognize what the user said
* @returns {Promise<string>}
*/
@Cordova({
platforms: ['Android']
})
asr(
language: string
): Promise<string> { return; }
}

View File

@ -38,7 +38,7 @@ import { CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
*/
@Plugin({
pluginName: 'Uid',
plugin: 'https://github.com/hygieiasoft/cordova-plugin-uid',
plugin: 'cordova-plugin-uid',
pluginRef: 'cordova.plugins.uid',
repo: 'https://github.com/hygieiasoft/cordova-plugin-uid',
platforms: ['Android']

View File

@ -111,7 +111,12 @@ export class WebIntent extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
startActivity(options: { action: any, url: string, type?: string }): Promise<any> {
startActivity(options: {
action: any;
extras?: any;
url: string;
type?: string;
}): Promise<any> {
return;
}