-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from driftyco/webintent-plugin
feat(plugin): add web intent plugin
- Loading branch information
Showing
2 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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} | ||
|
||
} |