diff --git a/src/@ionic-native/plugins/email-composer/index.ts b/src/@ionic-native/plugins/email-composer/index.ts index 302e0ce01..73a13e50b 100644 --- a/src/@ionic-native/plugins/email-composer/index.ts +++ b/src/@ionic-native/plugins/email-composer/index.ts @@ -1,8 +1,12 @@ import { Injectable } from '@angular/core'; -import { Cordova, CordovaCheck, IonicNativePlugin, Plugin, getPromise } from '@ionic-native/core'; +import { + Cordova, + CordovaCheck, + IonicNativePlugin, + Plugin +} from '@ionic-native/core'; export interface EmailComposerOptions { - /** * App to send the email with */ @@ -43,9 +47,12 @@ export interface EmailComposerOptions { */ isHtml?: boolean; + /** + * Content type of the email (Android only) + */ + type?: string; } - /** * @name Email Composer * @description @@ -106,11 +113,10 @@ export interface EmailComposerOptions { plugin: 'cordova-plugin-email-composer', pluginRef: 'cordova.plugins.email', repo: 'https://github.com/katzer/cordova-plugin-email-composer', - platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows'] + platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows', 'macOS'] }) @Injectable() export class EmailComposer extends IonicNativePlugin { - /** * Verifies if sending emails is supported on the device. * @@ -171,8 +177,7 @@ export class EmailComposer extends IonicNativePlugin { * @param packageName {string} The package name */ @Cordova() - addAlias(alias: string, packageName: string): void { - } + addAlias(alias: string, packageName: string): void {} /** * Displays the email composer pre-filled with data. @@ -188,5 +193,4 @@ export class EmailComposer extends IonicNativePlugin { open(options: EmailComposerOptions, scope?: any): Promise { return; } - } diff --git a/src/@ionic-native/plugins/image-resizer/index.ts b/src/@ionic-native/plugins/image-resizer/index.ts index 1f9079c8b..8d9c7ad78 100644 --- a/src/@ionic-native/plugins/image-resizer/index.ts +++ b/src/@ionic-native/plugins/image-resizer/index.ts @@ -7,6 +7,24 @@ export interface ImageResizerOptions { */ uri: string; + /** + * The name of the folder the image should be put + * (Android only) + */ + folderName?: string; + + /** + * A custom name for the file. Default name is a timestamp. You have to set this value on iOS + */ + fileName?: string; + + /** + * + * Quality given as Number for the quality of the new image + * (Android and iOS only) + */ + quality?: number; + /** * The width of the new image */ @@ -18,22 +36,10 @@ export interface ImageResizerOptions { height: number; /** - * The name of the folder the image should be put - * (Android only) + * Whether or not to return a base64 encoded image string instead of the path to the resized image. + * iOS only */ - folderName?: string; - - /** - * - * Quality given as Number for the quality of the new image - * (Android and iOS only) - */ - quality?: number; - - /** - * A custom name for the file. Default name is a timestamp. You have to set this value on iOS - */ - fileName?: string; + base64?: boolean; } /** diff --git a/src/@ionic-native/plugins/qr-scanner/index.ts b/src/@ionic-native/plugins/qr-scanner/index.ts index 84bd9bc99..e56873697 100644 --- a/src/@ionic-native/plugins/qr-scanner/index.ts +++ b/src/@ionic-native/plugins/qr-scanner/index.ts @@ -1,5 +1,6 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; import { Injectable } from '@angular/core'; +import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; import { Observable } from 'rxjs'; export interface QRScannerStatus { @@ -86,11 +87,6 @@ export interface QRScannerStatus { * scanSub.unsubscribe(); // stop scanning * }); * - * // show camera preview - * this.qrScanner.show(); - * - * // wait for user to scan something, then the observable callback will be called - * * } else if (status.denied) { * // camera permission was permanently denied * // you must use QRScanner.openSettings() method to guide the user to the settings page diff --git a/src/@ionic-native/plugins/sms/index.ts b/src/@ionic-native/plugins/sms/index.ts index 5a2f10bea..0e7ef9a36 100644 --- a/src/@ionic-native/plugins/sms/index.ts +++ b/src/@ionic-native/plugins/sms/index.ts @@ -1,28 +1,23 @@ import { Injectable } from '@angular/core'; import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; - /** * Options for sending an SMS */ export interface SmsOptions { - /** * Set to true to replace \n by a new line. Default: false */ replaceLineBreaks?: boolean; android?: SmsOptionsAndroid; - } export interface SmsOptionsAndroid { - /** * Set to "INTENT" to send SMS with the native android SMS messaging. Leaving it empty will send the SMS without opening any app. */ intent?: string; - } /** @@ -57,7 +52,6 @@ export interface SmsOptionsAndroid { }) @Injectable() export class SMS extends IonicNativePlugin { - /** * Sends sms to a number * @param phoneNumber {string|Array} Phone number @@ -69,9 +63,11 @@ export class SMS extends IonicNativePlugin { successIndex: 3, errorIndex: 4 }) - send(phoneNumber: string | string[], - message: string, - options?: SmsOptions): Promise { + send( + phoneNumber: string | string[], + message: string, + options?: SmsOptions + ): Promise { return; } @@ -85,5 +81,4 @@ export class SMS extends IonicNativePlugin { hasPermission(): Promise { return; } - } diff --git a/src/@ionic-native/plugins/social-sharing/index.ts b/src/@ionic-native/plugins/social-sharing/index.ts index 082aa363c..720732acf 100644 --- a/src/@ionic-native/plugins/social-sharing/index.ts +++ b/src/@ionic-native/plugins/social-sharing/index.ts @@ -1,7 +1,6 @@ import { Injectable } from '@angular/core'; import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; - /** * @name Social Sharing * @description @@ -53,7 +52,12 @@ export class SocialSharing extends IonicNativePlugin { successIndex: 4, errorIndex: 5 }) - share(message?: string, subject?: string, file?: string | string[], url?: string): Promise { + share( + message?: string, + subject?: string, + file?: string | string[], + url?: string + ): Promise { return; } @@ -65,7 +69,13 @@ export class SocialSharing extends IonicNativePlugin { @Cordova({ platforms: ['iOS', 'Android'] }) - shareWithOptions(options: { message?: string, subject?: string, files?: string | string[], url?: string, chooserTitle?: string }): Promise { + shareWithOptions(options: { + message?: string; + subject?: string; + files?: string | string[]; + url?: string; + chooserTitle?: string; + }): Promise { return; } @@ -83,7 +93,13 @@ export class SocialSharing extends IonicNativePlugin { errorIndex: 6, platforms: ['iOS', 'Android'] }) - canShareVia(appName: string, message?: string, subject?: string, image?: string, url?: string): Promise { + canShareVia( + appName: string, + message?: string, + subject?: string, + image?: string, + url?: string + ): Promise { return; } @@ -115,11 +131,14 @@ export class SocialSharing extends IonicNativePlugin { errorIndex: 4, platforms: ['iOS', 'Android'] }) - shareViaFacebook(message: string, image?: string, url?: string): Promise { + shareViaFacebook( + message: string, + image?: string, + url?: string + ): Promise { return; } - /** * Shares directly to Facebook with a paste message hint * @param message {string} @@ -133,7 +152,12 @@ export class SocialSharing extends IonicNativePlugin { errorIndex: 5, platforms: ['iOS', 'Android'] }) - shareViaFacebookWithPasteMessageHint(message: string, image?: string, url?: string, pasteMessageHint?: string): Promise { + shareViaFacebookWithPasteMessageHint( + message: string, + image?: string, + url?: string, + pasteMessageHint?: string + ): Promise { return; } @@ -162,7 +186,11 @@ export class SocialSharing extends IonicNativePlugin { errorIndex: 4, platforms: ['iOS', 'Android'] }) - shareViaWhatsApp(message: string, image?: string, url?: string): Promise { + shareViaWhatsApp( + message: string, + image?: string, + url?: string + ): Promise { return; } @@ -179,7 +207,12 @@ export class SocialSharing extends IonicNativePlugin { errorIndex: 5, platforms: ['iOS', 'Android'] }) - shareViaWhatsAppToReceiver(receiver: string, message: string, image?: string, url?: string): Promise { + shareViaWhatsAppToReceiver( + receiver: string, + message: string, + image?: string, + url?: string + ): Promise { return; } @@ -222,7 +255,14 @@ export class SocialSharing extends IonicNativePlugin { successIndex: 6, errorIndex: 7 }) - shareViaEmail(message: string, subject: string, to: string[], cc?: string[], bcc?: string[], files?: string | string[]): Promise { + shareViaEmail( + message: string, + subject: string, + to: string[], + cc?: string[], + bcc?: string[], + files?: string | string[] + ): Promise { return; } @@ -240,7 +280,13 @@ export class SocialSharing extends IonicNativePlugin { errorIndex: 6, platforms: ['iOS', 'Android'] }) - shareVia(appName: string, message: string, subject?: string, image?: string, url?: string): Promise { + shareVia( + appName: string, + message: string, + subject?: string, + image?: string, + url?: string + ): Promise { return; } @@ -252,6 +298,17 @@ export class SocialSharing extends IonicNativePlugin { sync: true, platforms: ['iOS'] }) - setIPadPopupCoordinates(targetBounds: string): void { + setIPadPopupCoordinates(targetBounds: string): void {} + + /** + * Save an array of images to the camera roll + * @param {string|string[]} fileOrFileArray Single or multiple files + * @returns {Promise } + */ + @Cordova({ + platforms: ['iOS'] + }) + saveToPhotoAlbum(fileOrFileArray: string | string[]): Promise { + return; } } diff --git a/src/@ionic-native/plugins/speech-recognition/index.ts b/src/@ionic-native/plugins/speech-recognition/index.ts index b786302b4..2f0e7666c 100644 --- a/src/@ionic-native/plugins/speech-recognition/index.ts +++ b/src/@ionic-native/plugins/speech-recognition/index.ts @@ -43,6 +43,11 @@ export interface SpeechRecognitionListeningOptionsAndroid { * display listener popup window with prompt (default `true`) */ showPopup?: boolean; + + /** + * Allow partial results to be returned (default `false`) + */ + showPartial?: boolean; } /** @@ -129,9 +134,7 @@ export class SpeechRecognition extends IonicNativePlugin { /** * Stop the recognition process */ - @Cordova({ - platforms: ['iOS'] - }) + @Cordova() stopListening(): Promise { return; } diff --git a/src/@ionic-native/plugins/uid/index.ts b/src/@ionic-native/plugins/uid/index.ts index 83081b4d2..29431d3ac 100644 --- a/src/@ionic-native/plugins/uid/index.ts +++ b/src/@ionic-native/plugins/uid/index.ts @@ -40,12 +40,11 @@ import { CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core'; pluginName: 'Uid', plugin: 'cordova-plugin-uid', pluginRef: 'cordova.plugins.uid', - repo: 'https://github.com/hygieiasoft/cordova-plugin-uid', + repo: 'https://github.com/lionelhe/cordova-plugin-uid', platforms: ['Android'] }) @Injectable() export class Uid extends IonicNativePlugin { - /** Get the device Universally Unique Identifier (UUID). */ @CordovaProperty() UUID: string; diff --git a/src/@ionic-native/plugins/uptime/index.ts b/src/@ionic-native/plugins/uptime/index.ts new file mode 100644 index 000000000..9984d85ee --- /dev/null +++ b/src/@ionic-native/plugins/uptime/index.ts @@ -0,0 +1,42 @@ +import { Injectable } from '@angular/core'; +import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; + +/** + * @name Uptime + * @description + * This plugin return the device uptime, without sleep time. + * + * @usage + * ```typescript + * import { Uptime } from '@ionic-native/uptime'; + * + * constructor(private uptime: Uptime) { } + * + * ... + * + * this.uptime.getUptime() + * .then((uptime: any) => console.log(uptime)) + * .catch((error: any) => console.log(error)); + * + * ``` + */ +@Plugin({ + pluginName: 'Uptime', + plugin: 'cordova-plugin-uptime', + pluginRef: 'Uptime', + repo: 'https://github.com/s1lviu/cordova-plugin-uptime', + install: '', + installVariables: [], + platforms: ['Android'] +}) +@Injectable() +export class Uptime extends IonicNativePlugin { + /** + * This function return system uptime + * @return {Promise} Returns a promise that return the uptime in milliseconds + */ + @Cordova() + getUptime(): Promise { + return; + } +}