56 lines
1.3 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({
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
2016-07-17 20:23:02 +02:00
static get ACTION_VIEW() {
2016-04-04 00:05:34 -04:00
return window.plugins.webintent.ACTION_VIEW;
}
@CordovaProperty
2016-07-17 20:23:02 +02:00
static get EXTRA_TEXT() {
2016-04-04 00:05:34 -04:00
return window.plugins.webintent.EXTRA_TEXT;
}
@Cordova()
static startActivity(options: { action: any, url: string, type?: string }): Promise<any> { return; }
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
@Cordova()
2016-07-17 20:23:02 +02:00
static getExtra(extra: any): Promise<any> { return; }
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
@Cordova()
2016-07-17 20:23:02 +02:00
static onNewIntent(): Promise<string> { return; };
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
}