From 38eaeffe7e1dc590ada8b78237b6f15e3bbab83a Mon Sep 17 00:00:00 2001 From: Paulo Vitor Magacho da Silva Date: Sun, 8 Oct 2017 10:44:50 -0300 Subject: [PATCH 01/20] Added Electric Imp Blinkup Plugin support --- src/@ionic-native/plugins/blinkup/index.ts | 114 +++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 src/@ionic-native/plugins/blinkup/index.ts diff --git a/src/@ionic-native/plugins/blinkup/index.ts b/src/@ionic-native/plugins/blinkup/index.ts new file mode 100644 index 00000000..b02d7154 --- /dev/null +++ b/src/@ionic-native/plugins/blinkup/index.ts @@ -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 = { + * 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} Returns an Observable + */ + @Cordova({ + callbackOrder: 'reverse', + observable: true + }) + startBlinkUp(options: BlinkUpOptions): Observable { return; } + + /** + * flashWifiBlinkUp - invokes the flash wifi process + * @param {module:blinkup.BlinkUpWifiOptions} options BlinkUp Wifi Options + * @return {Observable} Returns an Observable + */ + @Cordova({ + callbackOrder: 'reverse', + observable: true + }) + flashWifiBlinkUp(options: BlinkUpWifiOptions): Observable { return; } + + /** + * flashWPSBlinkUp - invokes the flash wps process + * @param {module:blinkup.BlinkUpWPSOptions} options BlinkUp WPS Options + * @return {Observable} Returns an Observable + */ + @Cordova({ + callbackOrder: 'reverse', + observable: true + }) + flashWPSBlinkUp(options: BlinkUpWPSOptions): Observable { return; } + + /** + * abortBlinkUp - abort blinkup process + * @return {Observable} Returns an Observable + */ + @Cordova({ + observable: true + }) + abortBlinkUp(): Observable { return; } + + /** + * clearBlinkUpData - clear wifi data + * @return {Observable} Returns an Observable + */ + @Cordova({ + observable: true + }) + clearBlinkUpData(): Observable { return; } +} From bfbbc2ee124f89a819f240f3d079e3f85d07db69 Mon Sep 17 00:00:00 2001 From: Jonathan Tavares Date: Thu, 2 Nov 2017 16:21:51 +0000 Subject: [PATCH 02/20] feat(DocumentPicker) adds DocumentPicker ios plugin --- .../plugins/document-picker/index.ts | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 src/@ionic-native/plugins/document-picker/index.ts diff --git a/src/@ionic-native/plugins/document-picker/index.ts b/src/@ionic-native/plugins/document-picker/index.ts new file mode 100644 index 00000000..560c4afb --- /dev/null +++ b/src/@ionic-native/plugins/document-picker/index.ts @@ -0,0 +1,57 @@ + +import { Injectable } from '@angular/core'; +import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; + +/** + * Filter options + */ +export enum DocumentPickerOptions { + /** Show only PDF files */ + PDF = 'pdf', + /** show only image files */ + IMAGE = 'image', + /** show all files */ + ALL = 'all' +} + + +/** + * @name 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 { DocumentPicker, DocumentPickerOptions } from '@ionic-native/document-picker'; + * + * constructor(private docPicker: DocumentPicker) { } + * + * ... + * + * this.docPicker.getFile(DocumentPickerOptions.ALL) + * .then(uri => console.log(uri)) + * .catch(e => console.log(e)); + * + * ``` + */ +@Plugin({ + pluginName: 'DocumentPicker', + 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 {DocumentPickerOptions} filters files between 'image', 'pdf' or 'all' + * @returns {Promise} + */ + @Cordova() + getFile(options?: DocumentPickerOptions | string): Promise { return; } + +} From e9580b46ef3c022f134f86e213ee8b6352c48766 Mon Sep 17 00:00:00 2001 From: Jonathan Tavares Date: Thu, 2 Nov 2017 16:38:18 +0000 Subject: [PATCH 03/20] fix(DocumentPicker) uses String instead of DocumentPickerOptions --- .../plugins/document-picker/index.ts | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/@ionic-native/plugins/document-picker/index.ts b/src/@ionic-native/plugins/document-picker/index.ts index 560c4afb..d2c028a7 100644 --- a/src/@ionic-native/plugins/document-picker/index.ts +++ b/src/@ionic-native/plugins/document-picker/index.ts @@ -2,18 +2,6 @@ import { Injectable } from '@angular/core'; import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; -/** - * Filter options - */ -export enum DocumentPickerOptions { - /** Show only PDF files */ - PDF = 'pdf', - /** show only image files */ - IMAGE = 'image', - /** show all files */ - ALL = 'all' -} - /** * @name DocumentPicker @@ -24,13 +12,13 @@ export enum DocumentPickerOptions { * * @usage * ```typescript - * import { DocumentPicker, DocumentPickerOptions } from '@ionic-native/document-picker'; + * import { DocumentPicker } from '@ionic-native/document-picker'; * * constructor(private docPicker: DocumentPicker) { } * * ... * - * this.docPicker.getFile(DocumentPickerOptions.ALL) + * this.docPicker.getFile('all') * .then(uri => console.log(uri)) * .catch(e => console.log(e)); * @@ -48,10 +36,10 @@ export class DocumentPicker extends IonicNativePlugin { /** * Open a file - * @param {DocumentPickerOptions} filters files between 'image', 'pdf' or 'all' + * @param {string} filters files between 'image', 'pdf' or 'all' * @returns {Promise} */ @Cordova() - getFile(options?: DocumentPickerOptions | string): Promise { return; } + getFile(options?: string): Promise { return; } } From e7968da7f4a9a1b067b08010c7eac21b47190967 Mon Sep 17 00:00:00 2001 From: Guillaume Royer Date: Wed, 17 Jan 2018 09:40:58 +0000 Subject: [PATCH 04/20] feat(hot code push): add cordova-hot-code-push --- .../plugins/hot-code-push/index.ts | 131 ++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 src/@ionic-native/plugins/hot-code-push/index.ts diff --git a/src/@ionic-native/plugins/hot-code-push/index.ts b/src/@ionic-native/plugins/hot-code-push/index.ts new file mode 100644 index 00000000..92f08ca6 --- /dev/null +++ b/src/@ionic-native/plugins/hot-code-push/index.ts @@ -0,0 +1,131 @@ +import { Injectable } from '@angular/core'; +import { Cordova, Plugin, IonicNativePlugin, CordovaCheck } from '@ionic-native/core'; + +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 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}; +} + +/** + * @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} Resolves when the user is redirected to the store, rejects if the user declines. + */ + @Cordova() + requestApplicationUpdate(message: string): Promise { 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} Resolves if there is an update available, rejects otherwise. + */ + @CordovaCheck() + fetchUpdate(options?: HotCodePushRequestOptions): Promise { + return new Promise((resolve, reject) => { + HotCodePush.getPlugin().fetchUpdate((error: any, data: any) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }, options); + }); + } + + /** + * Install update if there is anything to install. + * @returns {Promise} Resolves when the update is installed. + */ + @Cordova({ + callbackStyle: 'node' + }) + installUpdate(): Promise { return; } + + /** + * Check if update was loaded and ready to be installed. + * @returns {Promise} Resolves if an update is ready, rejects if there is no update. + */ + @Cordova({ + callbackStyle: 'node' + }) + isUpdateAvailableForInstallation(): Promise { return; } + + /** + * Gets information about the app's versions. + * @returns {Promise} Resolves with the information about the versions. + */ + @Cordova({ + callbackStyle: 'node' + }) + getVersionInfo(): Promise { return; } +} From 04bdadedd880172e9199974339a6655ed913c884 Mon Sep 17 00:00:00 2001 From: Guillaume Royer Date: Thu, 1 Feb 2018 09:19:04 +0000 Subject: [PATCH 05/20] feat(hot code push): add update events --- .../plugins/hot-code-push/index.ts | 141 +++++++++++++++++- 1 file changed, 140 insertions(+), 1 deletion(-) diff --git a/src/@ionic-native/plugins/hot-code-push/index.ts b/src/@ionic-native/plugins/hot-code-push/index.ts index 92f08ca6..07cfb7b1 100644 --- a/src/@ionic-native/plugins/hot-code-push/index.ts +++ b/src/@ionic-native/plugins/hot-code-push/index.ts @@ -1,5 +1,6 @@ import { Injectable } from '@angular/core'; import { Cordova, Plugin, IonicNativePlugin, CordovaCheck } from '@ionic-native/core'; +import { Observable } from 'rxjs/Observable'; declare var chcp: any; @@ -48,6 +49,44 @@ export interface HotCodePushRequestOptions { '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 @@ -92,7 +131,7 @@ export class HotCodePush extends IonicNativePlugin { @CordovaCheck() fetchUpdate(options?: HotCodePushRequestOptions): Promise { return new Promise((resolve, reject) => { - HotCodePush.getPlugin().fetchUpdate((error: any, data: any) => { + HotCodePush.getPlugin().fetchUpdate((error: HotCodePushError, data: any) => { if (error) { reject(error); } else { @@ -128,4 +167,104 @@ export class HotCodePush extends IonicNativePlugin { callbackStyle: 'node' }) getVersionInfo(): Promise { return; } + + /** + * Event sent when new release was successfully loaded and ready to be installed. + * @returns {Observable} + */ + @Cordova({ + eventObservable: true, + event: 'chcp_updateIsReadyToInstall' + }) + onUpdateIsReadyToInstall(): Observable { return; } + + /** + * Event sent when plugin couldn't load update from the server. Error details are attached to the event. + * @returns {Observable} + */ + @Cordova({ + eventObservable: true, + event: 'chcp_updateLoadFailed' + }) + onUpdateLoadFailed(): Observable { return; } + + /** + * Event sent when we successfully loaded application config from the server, but there is nothing new is available. + * @returns {Observable} + */ + @Cordova({ + eventObservable: true, + event: 'chcp_nothingToUpdate' + }) + onNothingToUpdate(): Observable { return; } + + /** + * Event sent when an update is about to be installed. + * @returns {Observable} + */ + @Cordova({ + eventObservable: true, + event: 'chcp_beforeInstall' + }) + onBeforeInstall(): Observable { return; } + + /** + * Event sent when update was successfully installed. + * @returns {Observable} + */ + @Cordova({ + eventObservable: true, + event: 'chcp_updateInstalled' + }) + onUpdateInstalled(): Observable { return; } + + /** + * Event sent when update installation failed. Error details are attached to the event. + * @returns {Observable} + */ + @Cordova({ + eventObservable: true, + event: 'chcp_updateInstallFailed' + }) + onUpdateInstallFailed(): Observable { return; } + + /** + * Event sent when there is nothing to install. Probably, nothing was loaded before that. + * @returns {Observable} + */ + @Cordova({ + eventObservable: true, + event: 'chcp_nothingToInstall' + }) + onNothingToInstall(): Observable { return; } + + /** + * Event sent when plugin is about to start installing bundle content on the external storage. + * @returns {Observable} + */ + @Cordova({ + eventObservable: true, + event: 'chcp_beforeAssetsInstalledOnExternalStorage' + }) + onBeforeAssetsInstalledOnExternalStorage(): Observable { 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} + */ + @Cordova({ + eventObservable: true, + event: 'chcp_assetsInstalledOnExternalStorage' + }) + onAssetsInstalledOnExternalStorage(): Observable { 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} + */ + @Cordova({ + eventObservable: true, + event: 'chcp_assetsInstallationError' + }) + onAssetsInstallationError(): Observable { return; } } From 41e5a0f7fe3d873c24269ee1bae55e3ff331e491 Mon Sep 17 00:00:00 2001 From: Markus Karileet Date: Thu, 22 Feb 2018 22:02:44 +0200 Subject: [PATCH 06/20] feat(speechkit): plugin implementation --- src/@ionic-native/plugins/speechkit/index.ts | 53 ++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/@ionic-native/plugins/speechkit/index.ts diff --git a/src/@ionic-native/plugins/speechkit/index.ts b/src/@ionic-native/plugins/speechkit/index.ts new file mode 100644 index 00000000..ed49044c --- /dev/null +++ b/src/@ionic-native/plugins/speechkit/index.ts @@ -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} + */ + @Cordova() + tts( + text: string, + language: string + ): Promise { return; } + + /** + * Try to recognize what the user said + * @returns {Promise} + */ + @Cordova({ + platforms: ['Android'] + }) + asr( + language: string + ): Promise { return; } + +} From 7c6b117643bf7a01cf62f29a1aa6075b00d3b2f4 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Sat, 17 Mar 2018 10:03:06 +0100 Subject: [PATCH 07/20] docs(image-resize): add note about fileName for iOS platform --- src/@ionic-native/plugins/image-resizer/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/@ionic-native/plugins/image-resizer/index.ts b/src/@ionic-native/plugins/image-resizer/index.ts index 2928e119..165ffbcd 100644 --- a/src/@ionic-native/plugins/image-resizer/index.ts +++ b/src/@ionic-native/plugins/image-resizer/index.ts @@ -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; } From 586c7e505f3ce7d1016059a5303d87ea4ed82010 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Sat, 17 Mar 2018 10:38:05 +0100 Subject: [PATCH 08/20] fix(badge): add correct requestPermission function fixes: #105 #1856 --- src/@ionic-native/plugins/badge/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/@ionic-native/plugins/badge/index.ts b/src/@ionic-native/plugins/badge/index.ts index eb4828fe..815711c7 100644 --- a/src/@ionic-native/plugins/badge/index.ts +++ b/src/@ionic-native/plugins/badge/index.ts @@ -101,7 +101,7 @@ export class Badge extends IonicNativePlugin { * @returns {Promise} */ @Cordova() - registerPermission(): Promise { + requestPermission(): Promise { return; } } From f7184325a7567968eede72d59566c34d999ded24 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Sat, 17 Mar 2018 10:56:14 +0100 Subject: [PATCH 09/20] fix(facebook): remove browserInit function fix: #1901 --- src/@ionic-native/plugins/facebook/index.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/@ionic-native/plugins/facebook/index.ts b/src/@ionic-native/plugins/facebook/index.ts index 21bd6f59..2ba25276 100644 --- a/src/@ionic-native/plugins/facebook/index.ts +++ b/src/@ionic-native/plugins/facebook/index.ts @@ -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} - */ - @Cordova() - browserInit(appId: number, version?: string): Promise { - return; - } - /** * Login to Facebook to authenticate this app. * From 8dc5ad2ee6b42b6038a9f7dba41e8067dc93c6f0 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Sat, 17 Mar 2018 11:08:21 +0100 Subject: [PATCH 10/20] fix(web-intent): allow extras fix: #1959 --- src/@ionic-native/plugins/web-intent/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/@ionic-native/plugins/web-intent/index.ts b/src/@ionic-native/plugins/web-intent/index.ts index 7bd06c56..b74f3750 100644 --- a/src/@ionic-native/plugins/web-intent/index.ts +++ b/src/@ionic-native/plugins/web-intent/index.ts @@ -103,6 +103,7 @@ export class WebIntent extends IonicNativePlugin { @Cordova() startActivity(options: { action: any; + extras?: any; url: string; type?: string; }): Promise { From a345e2c6f1569c1b86cdd4a0c78752c950113e8e Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Sat, 17 Mar 2018 11:15:42 +0100 Subject: [PATCH 11/20] feat(camera-preview): add onBackButton function fixes: #1967 --- src/@ionic-native/plugins/camera-preview/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/@ionic-native/plugins/camera-preview/index.ts b/src/@ionic-native/plugins/camera-preview/index.ts index 4545d963..b4f1e2fb 100644 --- a/src/@ionic-native/plugins/camera-preview/index.ts +++ b/src/@ionic-native/plugins/camera-preview/index.ts @@ -394,5 +394,12 @@ export class CameraPreview extends IonicNativePlugin { */ @Cordova() tapToFocus(xPoint: number, yPoint: number): Promise { return; } + + /** + * Add a listener for the back event for the preview + * @return {Promise} if backbutton pressed + */ + @Cordova() + onBackButton(): Promise { return; } } From 1c27474776b194b5f2bc4358f1bba5a615b9322c Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Sat, 17 Mar 2018 11:27:16 +0100 Subject: [PATCH 12/20] ref(globalization): change utf_offset to utc_offset fixes: #2015 --- src/@ionic-native/plugins/globalization/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/@ionic-native/plugins/globalization/index.ts b/src/@ionic-native/plugins/globalization/index.ts index 898084b1..9a56e9e9 100644 --- a/src/@ionic-native/plugins/globalization/index.ts +++ b/src/@ionic-native/plugins/globalization/index.ts @@ -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; From 500888e8393e75f55a116aa9f99f439fb0c5a2f1 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Sat, 17 Mar 2018 11:36:52 +0100 Subject: [PATCH 13/20] fix circle --- .../plugins/camera-preview/index.ts | 127 ++++++++++++------ 1 file changed, 89 insertions(+), 38 deletions(-) diff --git a/src/@ionic-native/plugins/camera-preview/index.ts b/src/@ionic-native/plugins/camera-preview/index.ts index b4f1e2fb..de541501 100644 --- a/src/@ionic-native/plugins/camera-preview/index.ts +++ b/src/@ionic-native/plugins/camera-preview/index.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; +import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; export interface CameraPreviewDimensions { /** The width of the camera preview, default to window.screen.width */ @@ -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', @@ -189,35 +189,45 @@ export class CameraPreview extends IonicNativePlugin { successIndex: 1, errorIndex: 2 }) - startCamera(options: CameraPreviewOptions): Promise { return; } + startCamera(options: CameraPreviewOptions): Promise { + return; + } /** * Stops the camera preview instance. (iOS & Android) * @return {Promise} */ @Cordova() - stopCamera(): Promise { return; } + stopCamera(): Promise { + return; + } /** * Switch from the rear camera and front camera, if available. * @return {Promise} */ @Cordova() - switchCamera(): Promise { return; } + switchCamera(): Promise { + return; + } /** * Hide the camera preview box. * @return {Promise} */ @Cordova() - hide(): Promise { return; } + hide(): Promise { + return; + } /** * Show the camera preview box. * @return {Promise} */ @Cordova() - show(): Promise { return; } + show(): Promise { + return; + } /** * Take the picture (base64) @@ -228,7 +238,9 @@ export class CameraPreview extends IonicNativePlugin { successIndex: 1, errorIndex: 2 }) - takePicture(options?: CameraPreviewPictureOptions): Promise { return; } + takePicture(options?: CameraPreviewPictureOptions): Promise { + return; + } /** * @@ -241,7 +253,9 @@ export class CameraPreview extends IonicNativePlugin { successIndex: 1, errorIndex: 2 }) - setColorEffect(effect: string): Promise { return; } + setColorEffect(effect: string): Promise { + return; + } /** * Set the zoom (Android) @@ -252,21 +266,27 @@ export class CameraPreview extends IonicNativePlugin { successIndex: 1, errorIndex: 2 }) - setZoom(zoom?: number): Promise { return; } + setZoom(zoom?: number): Promise { + return; + } /** - * Get the maximum zoom (Android) - * @return {Promise} - */ + * Get the maximum zoom (Android) + * @return {Promise} + */ @Cordova() - getMaxZoom(): Promise { return; } + getMaxZoom(): Promise { + return; + } /** * Get current zoom (Android) * @return {Promise} */ @Cordova() - getZoom(): Promise { return; } + getZoom(): Promise { + return; + } /** * Set the preview Size @@ -277,14 +297,18 @@ export class CameraPreview extends IonicNativePlugin { successIndex: 1, errorIndex: 2 }) - setPreviewSize(dimensions?: CameraPreviewDimensions): Promise { return; } + setPreviewSize(dimensions?: CameraPreviewDimensions): Promise { + return; + } /** * Get focus mode * @return {Promise} */ @Cordova() - getFocusMode(): Promise { return; } + getFocusMode(): Promise { + return; + } /** * Set the focus mode @@ -295,21 +319,27 @@ export class CameraPreview extends IonicNativePlugin { successIndex: 1, errorIndex: 2 }) - setFocusMode(focusMode?: string): Promise { return; } + setFocusMode(focusMode?: string): Promise { + return; + } /** * Get supported focus modes * @return {Promise} */ @Cordova() - getSupportedFocusModes(): Promise { return; } + getSupportedFocusModes(): Promise { + return; + } /** * Get the current flash mode * @return {Promise} */ @Cordova() - getFlashMode(): Promise { return; } + getFlashMode(): Promise { + return; + } /** * Set the flashmode @@ -320,35 +350,45 @@ export class CameraPreview extends IonicNativePlugin { successIndex: 1, errorIndex: 2 }) - setFlashMode(flashMode?: string): Promise { return; } + setFlashMode(flashMode?: string): Promise { + return; + } /** * Get supported flash modes * @return {Promise} */ @Cordova() - getSupportedFlashModes(): Promise { return; } + getSupportedFlashModes(): Promise { + return; + } /** * Get supported picture sizes * @return {Promise} */ @Cordova() - getSupportedPictureSizes(): Promise { return; } + getSupportedPictureSizes(): Promise { + return; + } /** * Get exposure mode * @return {Promise} */ @Cordova() - getExposureMode(): Promise { return; } + getExposureMode(): Promise { + return; + } /** * Get exposure modes * @return {Promise} */ @Cordova() - getExposureModes(): Promise { return; } + getExposureModes(): Promise { + return; + } /** * Set exposure mode @@ -359,14 +399,18 @@ export class CameraPreview extends IonicNativePlugin { successIndex: 1, errorIndex: 2 }) - setExposureMode(lock?: string): Promise { return; } + setExposureMode(lock?: string): Promise { + return; + } /** * Get exposure compensation (Android) * @return {Promise} */ @Cordova() - getExposureCompensation(): Promise { return; } + getExposureCompensation(): Promise { + return; + } /** * Set exposure compensation (Android) @@ -377,14 +421,18 @@ export class CameraPreview extends IonicNativePlugin { successIndex: 1, errorIndex: 2 }) - setExposureCompensation(exposureCompensation?: number): Promise { return; } + setExposureCompensation(exposureCompensation?: number): Promise { + return; + } /** * Get exposure compensation range (Android) * @return {Promise} */ @Cordova() - getExposureCompensationRange(): Promise { return; } + getExposureCompensationRange(): Promise { + return; + } /** * Set specific focus point. Note, this assumes the camera is full-screen. @@ -393,13 +441,16 @@ export class CameraPreview extends IonicNativePlugin { * @return {Promise} */ @Cordova() - tapToFocus(xPoint: number, yPoint: number): Promise { return; } - - /** - * Add a listener for the back event for the preview - * @return {Promise} if backbutton pressed - */ - @Cordova() - onBackButton(): Promise { return; } + tapToFocus(xPoint: number, yPoint: number): Promise { + return; + } + /** + * Add a listener for the back event for the preview + * @return {Promise} if backbutton pressed + */ + @Cordova() + onBackButton(): Promise { + return; + } } From 67ea61a3cbc46cd833cb1a40b1173cd31628e489 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Sat, 17 Mar 2018 11:45:12 +0100 Subject: [PATCH 14/20] rename plugin --- src/@ionic-native/plugins/document-picker/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/@ionic-native/plugins/document-picker/index.ts b/src/@ionic-native/plugins/document-picker/index.ts index d2c028a7..f9f636f6 100644 --- a/src/@ionic-native/plugins/document-picker/index.ts +++ b/src/@ionic-native/plugins/document-picker/index.ts @@ -4,7 +4,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; /** - * @name DocumentPicker + * @name iOS DocumentPicker * @description * * Opens the file picker on iOS for the user to select a file, returns a file URI. @@ -12,9 +12,9 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; * * @usage * ```typescript - * import { DocumentPicker } from '@ionic-native/document-picker'; + * import { IOSDocumentPicker } from '@ionic-native/document-picker'; * - * constructor(private docPicker: DocumentPicker) { } + * constructor(private docPicker: IOSDocumentPicker) { } * * ... * @@ -25,7 +25,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; * ``` */ @Plugin({ - pluginName: 'DocumentPicker', + pluginName: 'IOSDocumentPicker', plugin: 'cordova-plugin-documentpicker.DocumentPicker', pluginRef: 'DocumentPicker', repo: 'https://github.com/iampossible/Cordova-DocPicker', From 571df3a2513f49abfdc879bbe6aecce15d73265c Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 17 Mar 2018 14:33:21 +0100 Subject: [PATCH 15/20] feat(plugin): add iOS File Picker --- .../plugins/file-picker/index.ts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/@ionic-native/plugins/file-picker/index.ts diff --git a/src/@ionic-native/plugins/file-picker/index.ts b/src/@ionic-native/plugins/file-picker/index.ts new file mode 100644 index 00000000..9ce195b7 --- /dev/null +++ b/src/@ionic-native/plugins/file-picker/index.ts @@ -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} + */ + @Cordova() + pickFile(): Promise { + return; + } +} From 247a1a1d748dc835347a6feee08985888ab95500 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 17 Mar 2018 15:36:42 +0100 Subject: [PATCH 16/20] feat(appodeal): add new functions fixes: #2065 --- src/@ionic-native/plugins/appodeal/index.ts | 228 ++++++++++++++------ 1 file changed, 159 insertions(+), 69 deletions(-) diff --git a/src/@ionic-native/plugins/appodeal/index.ts b/src/@ionic-native/plugins/appodeal/index.ts index 5d72981f..b96596da 100644 --- a/src/@ionic-native/plugins/appodeal/index.ts +++ b/src/@ionic-native/plugins/appodeal/index.ts @@ -46,14 +46,16 @@ 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 * @returns {Promise} */ @Cordova() - isInitialized(): Promise { return; }; + isInitialized(): Promise { + return; + } /** * show ad of specified type @@ -61,7 +63,9 @@ export class Appodeal extends IonicNativePlugin { * @returns {Promise} */ @Cordova() - show(adType: number): Promise { return; }; + show(adType: number): Promise { + return; + } /** * show ad of specified type with placement options @@ -70,24 +74,26 @@ export class Appodeal extends IonicNativePlugin { * @returns {Promise} */ @Cordova() - showWithPlacement( - adType: number, - placement: any - ): Promise { return; }; + showWithPlacement(adType: number, placement: any): Promise { + return; + } /** * hide ad of specified type * @param {number} adType */ @Cordova() - hide(adType: number): void { }; + hide(adType: number): void {} /** * confirm use of ads of specified type * @param {number} adType + * @returns {Promise} */ @Cordova() - confirm(adType: number): void { }; + canShow(adType: number): Promise { + return; + } /** * check if ad of specified type has been loaded @@ -95,7 +101,9 @@ export class Appodeal extends IonicNativePlugin { * @returns {Promise} */ @Cordova() - isLoaded(adType: number): Promise { return; }; + isLoaded(adType: number): Promise { + return; + } /** * check if ad of specified @@ -103,7 +111,9 @@ export class Appodeal extends IonicNativePlugin { * @returns {Promise} */ @Cordova() - isPrecache(adType: number): Promise { return; }; + isPrecache(adType: number): Promise { + return; + } /** * @@ -111,75 +121,77 @@ 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 */ @Cordova() - getVersion(): Promise { return; }; + getVersion(): Promise { + return; + } /** * @@ -187,7 +199,7 @@ export class Appodeal extends IonicNativePlugin { * @param {number} adType */ @Cordova() - disableNetwork(network?: string, adType?: number): void { }; + disableNetwork(network?: string, adType?: number): void {} /** * @@ -195,54 +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 {} /** * @@ -250,7 +262,7 @@ export class Appodeal extends IonicNativePlugin { * @param {boolean} value */ @Cordova() - setCustomBooleanRule(name: string, value: boolean): void { }; + setCustomBooleanRule(name: string, value: boolean): void {} /** * @@ -258,7 +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 @@ -266,7 +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 @@ -274,243 +286,321 @@ 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, event: 'onInterstitialLoaded', element: document }) - onInterstitialLoaded(): Observable { return; } + onInterstitialLoaded(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onInterstitialFailedToLoad', element: document }) - onInterstitialFailedToLoad(): Observable { return; } + onInterstitialFailedToLoad(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onInterstitialShown', element: document }) - onInterstitialShown(): Observable { return; } + onInterstitialShown(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onInterstitialClicked', element: document }) - onInterstitialClicked(): Observable { return; } + onInterstitialClicked(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onInterstitialClosed', element: document }) - onInterstitialClosed(): Observable { return; } + onInterstitialClosed(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onSkippableVideoLoaded', element: document }) - onSkippableVideoLoaded(): Observable { return; } + onSkippableVideoLoaded(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onSkippableVideoFailedToLoad', element: document }) - onSkippableVideoFailedToLoad(): Observable { return; } + onSkippableVideoFailedToLoad(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onSkippableVideoShown', element: document }) - onSkippableVideoShown(): Observable { return; } + onSkippableVideoShown(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onSkippableVideoFinished', element: document }) - onSkippableVideoFinished(): Observable { return; } + onSkippableVideoFinished(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onSkippableVideoClosed', element: document }) - onSkippableVideoClosed(): Observable { return; } + onSkippableVideoClosed(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onRewardedVideoLoaded', element: document }) - onRewardedVideoLoaded(): Observable { return; } + onRewardedVideoLoaded(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onRewardedVideoFailedToLoad', element: document }) - onRewardedVideoFailedToLoad(): Observable { return; } + onRewardedVideoFailedToLoad(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onRewardedVideoShown', element: document }) - onRewardedVideoShown(): Observable { return; } + onRewardedVideoShown(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onRewardedVideoFinished', element: document }) - onRewardedVideoFinished(): Observable { return; } + onRewardedVideoFinished(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onRewardedVideoClosed', element: document }) - onRewardedVideoClosed(): Observable { return; } + onRewardedVideoClosed(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onNonSkippableVideoLoaded', element: document }) - onNonSkippableVideoLoaded(): Observable { return; } + onNonSkippableVideoLoaded(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onNonSkippableVideoFailedToLoad', element: document }) - onNonSkippableVideoFailedToLoad(): Observable { return; } + onNonSkippableVideoFailedToLoad(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onNonSkippableVideoShown', element: document }) - onNonSkippableVideoShown(): Observable { return; } + onNonSkippableVideoShown(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onNonSkippableVideoFinished', element: document }) - onNonSkippableVideoFinished(): Observable { return; } + onNonSkippableVideoFinished(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onNonSkippableVideoClosed', element: document }) - onNonSkippableVideoClosed(): Observable { return; } + onNonSkippableVideoClosed(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onBannerClicked', element: document }) - onBannerClicked(): Observable { return; } + onBannerClicked(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onBannerFailedToLoad', element: document }) - onBannerFailedToLoad(): Observable { return; } + onBannerFailedToLoad(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onBannerLoaded', element: document }) - onBannerLoaded(): Observable { return; } + onBannerLoaded(): Observable { + return; + } @Cordova({ eventObservable: true, event: 'onBannerShown', element: document }) - onBannerShown(): Observable { return; } + onBannerShown(): Observable { + return; + } + + @Cordova() + getRewardParametersForPlacement(placement: string): Promise { + return; + } + + @Cordova() + getRewardParameters(): Promise { + return; + } + + @Cordova() + canShowWithPlacement(adType: string, placement: string): Promise { + return; + } + + @Cordova({ + platforms: ['Android'] + }) + showTestScreen(value: any): void {} + + @Cordova() + muteVideosIfCallsMuted(value: any): Promise { + return; + } + + @Cordova() + setChildDirectedTreatment(value: boolean): Promise { + return; + } } From 6862389651901ef9052dc7851d755f0cbbebac2a Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Sat, 17 Mar 2018 15:47:37 +0100 Subject: [PATCH 17/20] docs(geolocation): add notes for iOS platform --- src/@ionic-native/plugins/geolocation/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/@ionic-native/plugins/geolocation/index.ts b/src/@ionic-native/plugins/geolocation/index.ts index 7eded999..0ea3937a 100644 --- a/src/@ionic-native/plugins/geolocation/index.ts +++ b/src/@ionic-native/plugins/geolocation/index.ts @@ -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 + * + * We want your location! Best regards NSA + * + * ``` + * + * * @usage * * ```typescript From 4948640db20fb8463a3bcbc39d5c8189fd559c1c Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Sat, 17 Mar 2018 15:55:09 +0100 Subject: [PATCH 18/20] fix(Radmob-pro): add offsetTopBar option fixes: #2100 --- src/@ionic-native/plugins/admob-pro/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/@ionic-native/plugins/admob-pro/index.ts b/src/@ionic-native/plugins/admob-pro/index.ts index ad9c66b1..5e8529dd 100644 --- a/src/@ionic-native/plugins/admob-pro/index.ts +++ b/src/@ionic-native/plugins/admob-pro/index.ts @@ -70,6 +70,11 @@ export interface AdMobOptions { * License key for the plugin */ license?: any; + + /** + * Set offset + */ + offsetTopBar?: boolean; } From 1bedb491523a97810f067928b641676a0f4f3585 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Sat, 17 Mar 2018 15:57:14 +0100 Subject: [PATCH 19/20] docs(uid): add correct npm repository fixes: #2105 --- src/@ionic-native/plugins/uid/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/@ionic-native/plugins/uid/index.ts b/src/@ionic-native/plugins/uid/index.ts index aa417a83..a52e4dc2 100644 --- a/src/@ionic-native/plugins/uid/index.ts +++ b/src/@ionic-native/plugins/uid/index.ts @@ -38,7 +38,7 @@ import { Plugin, CordovaProperty, IonicNativePlugin } 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'] From f1bf2fa151a94e500a724e08caa44105f2a03c0c Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Sat, 17 Mar 2018 16:00:52 +0100 Subject: [PATCH 20/20] fix circle --- src/@ionic-native/plugins/admob-pro/index.ts | 77 +++++++++++++------- 1 file changed, 49 insertions(+), 28 deletions(-) diff --git a/src/@ionic-native/plugins/admob-pro/index.ts b/src/@ionic-native/plugins/admob-pro/index.ts index 5e8529dd..bb1c400a 100644 --- a/src/@ionic-native/plugins/admob-pro/index.ts +++ b/src/@ionic-native/plugins/admob-pro/index.ts @@ -1,11 +1,17 @@ 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'; -export type AdSize = 'SMART_BANNER' | 'BANNER' | 'MEDIUM_RECTANGLE' | 'FULL_BANNER' | 'LEADERBOARD' | 'SKYSCRAPER' | 'CUSTOM'; +export type AdSize = + | 'SMART_BANNER' + | 'BANNER' + | 'MEDIUM_RECTANGLE' + | 'FULL_BANNER' + | 'LEADERBOARD' + | 'SKYSCRAPER' + | 'CUSTOM'; export interface AdMobOptions { - /** * Banner ad ID */ @@ -70,16 +76,14 @@ export interface AdMobOptions { * License key for the plugin */ license?: any; - - /** - * Set offset - */ - offsetTopBar?: boolean; + /** + * Set offset + */ + offsetTopBar?: boolean; } export interface AdExtras { - color_bg: string; color_bg_top: string; @@ -91,7 +95,6 @@ export interface AdExtras { color_text: string; color_url: string; - } /** @@ -139,7 +142,6 @@ export interface AdExtras { }) @Injectable() export class AdMobPro extends IonicNativePlugin { - AD_POSITION: { NO_CHANGE: number; TOP_LEFT: number; @@ -172,7 +174,9 @@ export class AdMobPro extends IonicNativePlugin { * @returns {Promise} Returns a Promise that resolves when the banner is created */ @Cordova() - createBanner(adIdOrOptions: string | AdMobOptions): Promise { return; } + createBanner(adIdOrOptions: string | AdMobOptions): Promise { + return; + } /** * Destroy the banner, remove it from screen. @@ -180,7 +184,7 @@ export class AdMobPro extends IonicNativePlugin { @Cordova({ sync: true }) - removeBanner(): void { } + removeBanner(): void {} /** * Show banner at position @@ -189,7 +193,7 @@ export class AdMobPro extends IonicNativePlugin { @Cordova({ sync: true }) - showBanner(position: number): void { } + showBanner(position: number): void {} /** * Show banner at custom position @@ -199,7 +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 @@ -207,7 +211,7 @@ export class AdMobPro extends IonicNativePlugin { @Cordova({ sync: true }) - hideBanner(): void { } + hideBanner(): void {} /** * Prepare interstitial banner @@ -215,7 +219,9 @@ export class AdMobPro extends IonicNativePlugin { * @returns {Promise} Returns a Promise that resolves when interstitial is prepared */ @Cordova() - prepareInterstitial(adIdOrOptions: string | AdMobOptions): Promise { return; } + prepareInterstitial(adIdOrOptions: string | AdMobOptions): Promise { + return; + } /** * Show interstitial ad when it's ready @@ -223,7 +229,7 @@ export class AdMobPro extends IonicNativePlugin { @Cordova({ sync: true }) - showInterstitial(): void { } + showInterstitial(): void {} /** * Prepare a reward video ad @@ -231,7 +237,9 @@ export class AdMobPro extends IonicNativePlugin { * @returns {Promise} Returns a Promise that resolves when the ad is prepared */ @Cordova() - prepareRewardVideoAd(adIdOrOptions: string | AdMobOptions): Promise { return; } + prepareRewardVideoAd(adIdOrOptions: string | AdMobOptions): Promise { + return; + } /** * Show a reward video ad @@ -239,7 +247,7 @@ export class AdMobPro extends IonicNativePlugin { @Cordova({ sync: true }) - showRewardVideoAd(): void { } + showRewardVideoAd(): void {} /** * Sets the values for configuration and targeting @@ -247,14 +255,18 @@ export class AdMobPro extends IonicNativePlugin { * @returns {Promise} Returns a Promise that resolves when the options have been set */ @Cordova() - setOptions(options: AdMobOptions): Promise { return; } + setOptions(options: AdMobOptions): Promise { + return; + } /** * Get user ad settings * @returns {Promise} Returns a promise that resolves with the ad settings */ @Cordova() - getAdSettings(): Promise { return; } + getAdSettings(): Promise { + return; + } /** * Triggered when failed to receive Ad @@ -265,7 +277,9 @@ export class AdMobPro extends IonicNativePlugin { event: 'onAdFailLoad', element: document }) - onAdFailLoad(): Observable { return; } + onAdFailLoad(): Observable { + return; + } /** * Triggered when Ad received @@ -276,7 +290,9 @@ export class AdMobPro extends IonicNativePlugin { event: 'onAdLoaded', element: document }) - onAdLoaded(): Observable { return; } + onAdLoaded(): Observable { + return; + } /** * Triggered when Ad will be showed on screen @@ -287,7 +303,9 @@ export class AdMobPro extends IonicNativePlugin { event: 'onAdPresent', element: document }) - onAdPresent(): Observable { return; } + onAdPresent(): Observable { + return; + } /** * Triggered when user click the Ad, and will jump out of your App @@ -298,7 +316,9 @@ export class AdMobPro extends IonicNativePlugin { event: 'onAdLeaveApp', element: document }) - onAdLeaveApp(): Observable { return; } + onAdLeaveApp(): Observable { + return; + } /** * Triggered when dismiss the Ad and back to your App @@ -309,6 +329,7 @@ export class AdMobPro extends IonicNativePlugin { event: 'onAdDismiss', element: document }) - onAdDismiss(): Observable { return; } - + onAdDismiss(): Observable { + return; + } }