Merge pull request #105 from driftyco/webintent-plugin
feat(plugin): add web intent plugin
This commit is contained in:
commit
3c2f2273d8
@ -46,6 +46,7 @@ import {StatusBar} from './plugins/statusbar';
|
|||||||
import {Toast} from './plugins/toast';
|
import {Toast} from './plugins/toast';
|
||||||
import {TouchID} from './plugins/touchid';
|
import {TouchID} from './plugins/touchid';
|
||||||
import {Vibration} from './plugins/vibration';
|
import {Vibration} from './plugins/vibration';
|
||||||
|
import {WebIntent} from './plugins/webintent';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
ActionSheet,
|
ActionSheet,
|
||||||
@ -89,7 +90,8 @@ export {
|
|||||||
StatusBar,
|
StatusBar,
|
||||||
Toast,
|
Toast,
|
||||||
TouchID,
|
TouchID,
|
||||||
Vibration
|
Vibration,
|
||||||
|
WebIntent
|
||||||
}
|
}
|
||||||
|
|
||||||
export * from './plugins/plugin';
|
export * from './plugins/plugin';
|
||||||
@ -137,7 +139,8 @@ window['IonicNative'] = {
|
|||||||
StatusBar: StatusBar,
|
StatusBar: StatusBar,
|
||||||
Toast: Toast,
|
Toast: Toast,
|
||||||
TouchID: TouchID,
|
TouchID: TouchID,
|
||||||
Vibration: Vibration
|
Vibration: Vibration,
|
||||||
|
WebIntent: WebIntent
|
||||||
};
|
};
|
||||||
|
|
||||||
// To help developers using cordova, we listen for the device ready event and
|
// To help developers using cordova, we listen for the device ready event and
|
||||||
|
38
src/plugins/webintent.ts
Normal file
38
src/plugins/webintent.ts
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import {Cordova, CordovaProperty, Plugin} from './plugin';
|
||||||
|
declare var window;
|
||||||
|
@Plugin({
|
||||||
|
plugin: 'https://github.com/Initsogar/cordova-webintent.git',
|
||||||
|
pluginRef: 'window.plugins.webintent',
|
||||||
|
repo: 'https://github.com/Initsogar/cordova-webintent.git'
|
||||||
|
})
|
||||||
|
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}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user