import { Injectable } from '@angular/core'; import { Cordova, CordovaProperty, Plugin } from '@ionic-native/core'; declare var window; /** * @name WebIntent * @description * @usage * For usage information please refer to the plugin's Github repo. * * ```typescript * import {WebIntent} from '@ionic-native/web-intent'; * * WebIntent.startActivity(options).then(onSuccess, onError); * * ``` */ @Plugin({ pluginName: 'WebIntent', plugin: 'https://github.com/Initsogar/cordova-webintent.git', pluginRef: 'window.plugins.webintent', repo: 'https://github.com/Initsogar/cordova-webintent.git', platforms: ['Android'] }) @Injectable() export class WebIntent { @CordovaProperty static ACTION_VIEW; @CordovaProperty static EXTRA_TEXT; /** * @param options {Object} { action: any, url: string, type?: string } * @returns {Promise} */ @Cordova() startActivity(options: { action: any, url: string, type?: string }): Promise { return; } /** * @param extra {any} * @returns {Promise} */ @Cordova() hasExtra(extra: any): Promise { return; } /** * @param extra {any} * @returns {Promise} */ @Cordova() getExtra(extra: any): Promise { return; } /** * @returns {Promise} */ @Cordova() getUri(): Promise { return; }; /** * @returns {Promise} */ @Cordova() onNewIntent(): Promise { return; }; /** * @param options {Object} { action: string, extras?: { option: boolean } } * @returns {Promise} */ @Cordova() sendBroadcast(options: { action: string, extras?: { option: boolean } }): Promise { return; } }