forked from danielsogl/awesome-cordova-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebintent.ts
55 lines (43 loc) · 1.24 KB
/
webintent.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import { Cordova, CordovaProperty, Plugin } from './plugin';
declare var window;
/**
* @name WebIntent
* @description
* @usage
* For usage information please refer to the plugin's Github repo.
*
* ```typescript
* import {WebIntent} from 'ionic-native';
*
* WebIntent.startActivity(options).then(onSuccess, onError);
*
* ```
*/
@Plugin({
plugin: 'https://github.com/Initsogar/cordova-webintent.git',
pluginRef: 'window.plugins.webintent',
repo: 'https://github.com/Initsogar/cordova-webintent.git',
platforms: ['Android']
})
export class WebIntent {
@CordovaProperty
static get ACTION_VIEW() {
return window.plugins.webintent.ACTION_VIEW;
}
@CordovaProperty
static get EXTRA_TEXT() {
return window.plugins.webintent.EXTRA_TEXT;
}
@Cordova()
static startActivity(options: { action: any, url: string }): Promise<any> { return; }
@Cordova()
static hasExtra(extra: any): Promise<any> { return; }
@Cordova()
static getExtra(extra: any): Promise<any> { return; }
@Cordova()
static getUri(): Promise<string> { return; };
@Cordova()
static onNewIntent(): Promise<string> { return; };
@Cordova()
static sendBroadcast(options: { action: string, extras?: { option: boolean } }): Promise<any> { return; }
}