From 91d22c52117abe171374d56781689c9e80428a33 Mon Sep 17 00:00:00 2001 From: Silviu Bogdan Stroe Date: Fri, 13 Apr 2018 23:01:23 +0300 Subject: [PATCH 1/6] feat(uptime): add deep sleep parameter (#2456) * docs(uptime): add cordova installation * feat(uptime): add deep sleep parameter * Update index.ts --- src/@ionic-native/plugins/uptime/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/@ionic-native/plugins/uptime/index.ts b/src/@ionic-native/plugins/uptime/index.ts index 4224f4b57..a2458b78e 100644 --- a/src/@ionic-native/plugins/uptime/index.ts +++ b/src/@ionic-native/plugins/uptime/index.ts @@ -4,17 +4,18 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; /** * @name Uptime * @description - * This plugin return the device uptime, without sleep time. + * This plugin provides the time spent in milliseconds since boot (uptime). * * @usage * ```typescript + * ionic cordova plugin add cordova-plugin-uptime * import { Uptime } from '@ionic-native/uptime'; * * constructor(private uptime: Uptime) { } * * ... * - * this.uptime.getUptime() + * this.uptime.getUptime(includeDeepSleep) * .then(uptime => console.log(uptime)) * .catch(error => console.log(error)); * @@ -31,10 +32,11 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; export class Uptime extends IonicNativePlugin { /** * This function return system uptime + * @param {boolean} includeDeepSleep Set to true to include system deep sleep * @return {Promise} Returns a promise that return the uptime in milliseconds */ @Cordova() - getUptime(): Promise { + getUptime(includeDeepSleep: boolean): Promise { return; } } From f49d2a964e293e78f8a6e34edf31dc154baff5da Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Sat, 14 Apr 2018 16:44:57 +0200 Subject: [PATCH 2/6] fix(call-number): fix isCallSupported function closes: #2428 --- src/@ionic-native/plugins/call-number/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/@ionic-native/plugins/call-number/index.ts b/src/@ionic-native/plugins/call-number/index.ts index 73490c38d..78c0611ed 100644 --- a/src/@ionic-native/plugins/call-number/index.ts +++ b/src/@ionic-native/plugins/call-number/index.ts @@ -48,9 +48,7 @@ export class CallNumber extends IonicNativePlugin { * Check if call feature is available * @return {Promise} */ - @Cordova({ - callbackOrder: 'reverse' - }) + @Cordova() isCallSupported(): Promise { return; } From ec69a0cbac5b055fec2a435889d5d423c69dc7ce Mon Sep 17 00:00:00 2001 From: Niklas Merz Date: Sun, 15 Apr 2018 10:01:40 +0200 Subject: [PATCH 3/6] docs(inappbrowser): add new option hidespinner (#2460) --- src/@ionic-native/plugins/in-app-browser/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/@ionic-native/plugins/in-app-browser/index.ts b/src/@ionic-native/plugins/in-app-browser/index.ts index beb4d8600..749ee10d6 100644 --- a/src/@ionic-native/plugins/in-app-browser/index.ts +++ b/src/@ionic-native/plugins/in-app-browser/index.ts @@ -49,6 +49,8 @@ export interface InAppBrowserOptions { transitionstyle?: 'fliphorizontal' | 'crossdissolve' | 'coververtical'; /** (iOS Only) Set to top or bottom (default is bottom). Causes the toolbar to be at the top or bottom of the window. */ toolbarposition?: 'top' | 'bottom'; + /** (iOS Only) Set to yes or no to change the visibility of the loading indicator (defaults to no). */ + hidespinner?: 'yes' | 'no'; /** (Windows only) Set to yes to create the browser control without a border around it. * Please note that if location=no is also specified, there will be no control presented to user to close IAB window. */ fullscreen?: 'yes'; From d4c98362d93fa7051bca9d6b62b3842bfe4c4d13 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Sun, 15 Apr 2018 10:18:40 +0200 Subject: [PATCH 4/6] docs(firebase): remove beta notice --- src/@ionic-native/plugins/firebase/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/@ionic-native/plugins/firebase/index.ts b/src/@ionic-native/plugins/firebase/index.ts index f2ebbcfde..721e81f9b 100644 --- a/src/@ionic-native/plugins/firebase/index.ts +++ b/src/@ionic-native/plugins/firebase/index.ts @@ -3,7 +3,6 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; import { Observable } from 'rxjs/Observable'; /** - * @beta * @name Firebase * @description * This plugin brings push notifications, analytics, event tracking, crash reporting and more from Google Firebase to your Cordova project! Android and iOS supported (including iOS 10). From 36450e13cf9affc68ed63a25595418985f5df418 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Sun, 15 Apr 2018 10:43:13 +0200 Subject: [PATCH 5/6] feat(firebase): add new functions --- src/@ionic-native/plugins/firebase/index.ts | 52 ++++++++++++++++----- 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/src/@ionic-native/plugins/firebase/index.ts b/src/@ionic-native/plugins/firebase/index.ts index 721e81f9b..302cb7545 100644 --- a/src/@ionic-native/plugins/firebase/index.ts +++ b/src/@ionic-native/plugins/firebase/index.ts @@ -35,10 +35,10 @@ import { Observable } from 'rxjs/Observable'; export class Firebase extends IonicNativePlugin { /** * Get the device token - * @return {Promise} + * @return {Promise} Note that token will be null if it has not been established yet */ @Cordova() - getToken(): Promise { + getToken(): Promise { return; } @@ -269,6 +269,44 @@ export class Firebase extends IonicNativePlugin { return; } + /** + * Start a trace. + * @param trace Trace name + */ + @Cordova() + startTrace(trace: string): Promise { + return; + } + + /** + * To count the performance-related events that occur in your app (such as cache hits or retries), add a line of code + * similar to the following whenever the event occurs, using a string other than retry to name that event if you are + * counting a different type of event: + * @param trace Trace name + * @param counter Counter + */ + @Cordova() + incrementCounter(trace: string, counter: string): Promise { + return; + } + + /** + * Stop the trace + * @param trace Trace name + */ + @Cordova() + stopTrace(trace: string): void {} + + /** + * Allows the user to enable/disable analytics collection + * @param {boolean} enabled value to set collection + * @returns {Promise} + */ + @Cordova() + setAnalyticsCollectionEnabled(enabled: boolean): Promise { + return; + } + /** * Sends an SMS to the user with the SMS verification code and returns the Verification ID required to sign in using phone authentication * @param {string} phoneNumber @@ -298,14 +336,4 @@ export class Firebase extends IonicNativePlugin { ): Promise { return; } - - /** - * Allows the user to enable/disable analytics collection - * @param {boolean} enabled value to set collection - * @returns {Promise} - */ - @Cordova() - setAnalyticsCollectionEnabled(enabled: boolean): Promise { - return; - } } From 8be98a0cc1009fb644092b90cce56261ee230abb Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Sun, 15 Apr 2018 10:44:48 +0200 Subject: [PATCH 6/6] docs(firebase): add jsdoc types --- src/@ionic-native/plugins/firebase/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/@ionic-native/plugins/firebase/index.ts b/src/@ionic-native/plugins/firebase/index.ts index 302cb7545..35f09a5c8 100644 --- a/src/@ionic-native/plugins/firebase/index.ts +++ b/src/@ionic-native/plugins/firebase/index.ts @@ -271,7 +271,7 @@ export class Firebase extends IonicNativePlugin { /** * Start a trace. - * @param trace Trace name + * @param {string} trace Trace name */ @Cordova() startTrace(trace: string): Promise { @@ -282,8 +282,8 @@ export class Firebase extends IonicNativePlugin { * To count the performance-related events that occur in your app (such as cache hits or retries), add a line of code * similar to the following whenever the event occurs, using a string other than retry to name that event if you are * counting a different type of event: - * @param trace Trace name - * @param counter Counter + * @param {string} trace Trace name + * @param {string} counter Counter */ @Cordova() incrementCounter(trace: string, counter: string): Promise { @@ -292,7 +292,7 @@ export class Firebase extends IonicNativePlugin { /** * Stop the trace - * @param trace Trace name + * @param {string} trace Trace name */ @Cordova() stopTrace(trace: string): void {}