75 lines
1.6 KiB
TypeScript
Raw Normal View History

2016-07-17 20:23:02 +02:00
import { Cordova, CordovaProperty, Plugin } from './plugin';
2016-04-04 00:05:34 -04:00
declare var window;
2016-07-17 20:23:02 +02:00
2016-06-11 10:37:00 -04:00
/**
* @name WebIntent
* @description
* @usage
* For usage information please refer to the plugin's Github repo.
2016-08-11 07:42:10 -04:00
*
* ```typescript
* import {WebIntent} from 'ionic-native';
*
* WebIntent.startActivity(options).then(onSuccess, onError);
*
* ```
2016-06-11 10:37:00 -04:00
*/
2016-04-04 00:05:34 -04:00
@Plugin({
pluginName: 'WebIntent',
2016-04-04 00:05:34 -04:00
plugin: 'https://github.com/Initsogar/cordova-webintent.git',
pluginRef: 'window.plugins.webintent',
2016-06-11 10:37:00 -04:00
repo: 'https://github.com/Initsogar/cordova-webintent.git',
platforms: ['Android']
2016-04-04 00:05:34 -04:00
})
export class WebIntent {
@CordovaProperty
static ACTION_VIEW;
2016-04-04 00:05:34 -04:00
@CordovaProperty
static EXTRA_TEXT;
2016-04-04 00:05:34 -04:00
/**
* @param options {Object} { action: any, url: string, type?: string }
* @returns {Promise<any>}
*/
2016-04-04 00:05:34 -04:00
@Cordova()
static startActivity(options: { action: any, url: string, type?: string }): Promise<any> { return; }
2016-04-04 00:05:34 -04:00
/**
* @param extra {any}
* @returns {Promise<any>}
*/
2016-04-04 00:05:34 -04:00
@Cordova()
2016-07-17 20:23:02 +02:00
static hasExtra(extra: any): Promise<any> { return; }
2016-04-04 00:05:34 -04:00
/**
* @param extra {any}
* @returns {Promise<any>}
*/
2016-04-04 00:05:34 -04:00
@Cordova()
2016-07-17 20:23:02 +02:00
static getExtra(extra: any): Promise<any> { return; }
2016-04-04 00:05:34 -04:00
/**
* @returns {Promise<any>}
*/
2016-04-04 00:05:34 -04:00
@Cordova()
2016-07-17 20:23:02 +02:00
static getUri(): Promise<string> { return; };
2016-04-04 00:05:34 -04:00
/**
* @returns {Promise<string>}
*/
2016-04-04 00:05:34 -04:00
@Cordova()
2016-07-17 20:23:02 +02:00
static onNewIntent(): Promise<string> { return; };
2016-04-04 00:05:34 -04:00
/**
* @param options {Object} { action: string, extras?: { option: boolean } }
* @returns {Promise<any>}
*/
2016-04-04 00:05:34 -04:00
@Cordova()
2016-07-17 20:23:02 +02:00
static sendBroadcast(options: { action: string, extras?: { option: boolean } }): Promise<any> { return; }
2016-04-04 00:05:34 -04:00
2016-05-20 16:58:57 -04:00
}