From 15bb350d8e346a035bfbfb0ab4f4370b5f4a3980 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Thu, 15 Mar 2018 17:42:38 +0100 Subject: [PATCH 1/3] feat(web-intent): add startService function --- src/@ionic-native/plugins/web-intent/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/@ionic-native/plugins/web-intent/index.ts b/src/@ionic-native/plugins/web-intent/index.ts index a41f063b..2306bfa2 100644 --- a/src/@ionic-native/plugins/web-intent/index.ts +++ b/src/@ionic-native/plugins/web-intent/index.ts @@ -6,6 +6,7 @@ import { Observable } from 'rxjs/Observable'; * @beta * @name Web Intent * @description + * This Plugin provides a general purpose shim layer for the Android intent mechanism, exposing various ways to handle sending and receiving intents. * @usage * For usage information please refer to the plugin's Github repo. * @@ -161,6 +162,14 @@ export class WebIntent extends IonicNativePlugin { */ @Cordova() sendBroadcast(options: { action: string, extras?: { option: boolean } }): Promise { return; } + + /** + * Request that a given application service be started + * @param options {Object} { action: string, extras?: { option: boolean } } + * @returns {Promise} + */ + @Cordova() + startService(options: { action: string, extras?: { option: boolean } }): Promise { return; } /** * Registers a broadcast receiver for the specified filters From ec14e179c6dc92c9c31696e261db8ee75e1e39f9 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Thu, 15 Mar 2018 17:44:16 +0100 Subject: [PATCH 2/3] Update index.ts --- src/@ionic-native/plugins/web-intent/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/@ionic-native/plugins/web-intent/index.ts b/src/@ionic-native/plugins/web-intent/index.ts index 2306bfa2..96383216 100644 --- a/src/@ionic-native/plugins/web-intent/index.ts +++ b/src/@ionic-native/plugins/web-intent/index.ts @@ -3,7 +3,6 @@ import { Cordova, CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-nati import { Observable } from 'rxjs/Observable'; /** - * @beta * @name Web Intent * @description * This Plugin provides a general purpose shim layer for the Android intent mechanism, exposing various ways to handle sending and receiving intents. From 6d07cf1a844f1f5813fd52d3df26f2c9326e4942 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Thu, 15 Mar 2018 18:05:09 +0100 Subject: [PATCH 3/3] fix lint --- src/@ionic-native/plugins/web-intent/index.ts | 111 ++++++++++-------- 1 file changed, 65 insertions(+), 46 deletions(-) diff --git a/src/@ionic-native/plugins/web-intent/index.ts b/src/@ionic-native/plugins/web-intent/index.ts index 96383216..7bd06c56 100644 --- a/src/@ionic-native/plugins/web-intent/index.ts +++ b/src/@ionic-native/plugins/web-intent/index.ts @@ -35,77 +35,65 @@ import { Observable } from 'rxjs/Observable'; }) @Injectable() export class WebIntent extends IonicNativePlugin { + /** + * Convenience constant for actions + * @type {string} + */ + @CordovaProperty ACTION_SEND: string; /** * Convenience constant for actions * @type {string} */ - @CordovaProperty - ACTION_SEND: string; - - /** - * Convenience constant for actions - * @type {string} - */ - @CordovaProperty - ACTION_VIEW: string; + @CordovaProperty ACTION_VIEW: string; /** * Convenience constant for extras * @type {string} */ - @CordovaProperty - EXTRA_TEXT: string; + @CordovaProperty EXTRA_TEXT: string; /** * Convenience constant for extras * @type {string} */ - @CordovaProperty - EXTRA_SUBJECT: string; + @CordovaProperty EXTRA_SUBJECT: string; /** * Convenience constant for extras * @type {string} */ - @CordovaProperty - EXTRA_STREAM: string; + @CordovaProperty EXTRA_STREAM: string; /** * Convenience constant for extras * @type {string} */ - @CordovaProperty - EXTRA_EMAIL: string; + @CordovaProperty EXTRA_EMAIL: string; /** * Convenience constant for actions * @type {string} */ - @CordovaProperty - ACTION_CALL: string; + @CordovaProperty ACTION_CALL: string; /** * Convenience constant for actions * @type {string} */ - @CordovaProperty - ACTION_SENDTO: string; + @CordovaProperty ACTION_SENDTO: string; /** * Convenience constant for actions * @type {string} */ - @CordovaProperty - ACTION_GET_CONTENT: string; + @CordovaProperty ACTION_GET_CONTENT: string; /** * Convenience constant for actions * @type {string} */ - @CordovaProperty - ACTION_PICK: string; - + @CordovaProperty ACTION_PICK: string; /** * Launches an Android intent @@ -113,7 +101,13 @@ export class WebIntent extends IonicNativePlugin { * @returns {Promise} */ @Cordova() - startActivity(options: { action: any, url: string, type?: string }): Promise { return; } + startActivity(options: { + action: any; + url: string; + type?: string; + }): Promise { + return; + } /** * Starts a new activity and return the result to the application @@ -121,7 +115,13 @@ export class WebIntent extends IonicNativePlugin { * @returns {Promise} */ @Cordova() - startActivityForResult(options: { action: any, url: string, type?: string }): Promise { return; } + startActivityForResult(options: { + action: any; + url: string; + type?: string; + }): Promise { + return; + } /** * Checks if this app was invoked with specified extra @@ -129,7 +129,9 @@ export class WebIntent extends IonicNativePlugin { * @returns {Promise} */ @Cordova() - hasExtra(extra: string): Promise { return; } + hasExtra(extra: string): Promise { + return; + } /** * Gets the extra that this app was invoked with @@ -137,14 +139,18 @@ export class WebIntent extends IonicNativePlugin { * @returns {Promise} */ @Cordova() - getExtra(extra: string): Promise { return; } + getExtra(extra: string): Promise { + return; + } /** * Gets the Uri the app was invoked with * @returns {Promise} */ @Cordova() - getUri(): Promise { return; }; + getUri(): Promise { + return; + } /** * @returns {Observable} @@ -152,7 +158,9 @@ export class WebIntent extends IonicNativePlugin { @Cordova({ observable: true }) - onNewIntent(): Observable { return; }; + onNewIntent(): Observable { + return; + } /** * Sends a custom intent passing optional extras @@ -160,45 +168,56 @@ export class WebIntent extends IonicNativePlugin { * @returns {Promise} */ @Cordova() - sendBroadcast(options: { action: string, extras?: { option: boolean } }): Promise { return; } - - /** + sendBroadcast(options: { + action: string; + extras?: { option: boolean }; + }): Promise { + return; + } + + /** * Request that a given application service be started * @param options {Object} { action: string, extras?: { option: boolean } } * @returns {Promise} */ @Cordova() - startService(options: { action: string, extras?: { option: boolean } }): Promise { return; } + startService(options: { + action: string; + extras?: { option: boolean }; + }): Promise { + return; + } /** * Registers a broadcast receiver for the specified filters * @param filters {any} */ @Cordova({ sync: true }) - registerBroadcastReceiver(filters: any): void { } + registerBroadcastReceiver(filters: any): void {} /** * Unregisters a broadcast receiver */ @Cordova({ sync: true }) - unregisterBroadcastReceiver(): void { } + unregisterBroadcastReceiver(): void {} /** - * Returns the content of the intent used whenever the application activity is launched - */ + * Returns the content of the intent used whenever the application activity is launched + */ @Cordova({ sync: true }) - onIntent(): void { } + onIntent(): void {} /** - * - */ + * + */ @Cordova({ sync: true }) - onActivityResult(): void { } + onActivityResult(): void {} /** * @returns {Promise} */ @Cordova() - getIntent(): Promise { return; }; - + getIntent(): Promise { + return; + } }