Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(web-intent): updated source #1519

Merged
merged 2 commits into from
May 9, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 56 additions & 3 deletions src/@ionic-native/plugins/web-intent/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ declare var window;
*/
@Plugin({
pluginName: 'WebIntent',
plugin: 'https://github.com/Initsogar/cordova-webintent.git',
pluginRef: 'window.plugins.webintent',
repo: 'https://github.com/Initsogar/cordova-webintent.git',
plugin: 'https://github.com/darryncampbell/darryncampbell-cordova-plugin-intent.git',
pluginRef: 'intentShim',
repo: 'https://github.com/darryncampbell/darryncampbell-cordova-plugin-intent',
platforms: ['Android']
})
@Injectable()
Expand Down Expand Up @@ -93,6 +93,20 @@ export class WebIntent extends IonicNativePlugin {
@CordovaProperty
ACTION_SENDTO: string;

/**
* Convenience constant for actions
* @type {string}
*/
@CordovaProperty
ACTION_GET_CONTENT: string;

/**
* Convenience constant for actions
* @type {string}
*/
@CordovaProperty
ACTION_PICK: string;


/**
* Launches an Android intent
Expand All @@ -102,6 +116,14 @@ export class WebIntent extends IonicNativePlugin {
@Cordova()
startActivity(options: { action: any, url: string, type?: string }): Promise<any> { return; }

/**
* Starts a new activity and return the result to the application
* @param options {Object} { action: any, url: string, type?: string }
* @returns {Promise<any>}
*/
@Cordova()
startActivityForResult(options: { action: any, url: string, type?: string }): Promise<any> { return; }

/**
* Checks if this app was invoked with specified extra
* @param extra {string}
Expand Down Expand Up @@ -141,4 +163,35 @@ export class WebIntent extends IonicNativePlugin {
@Cordova()
sendBroadcast(options: { action: string, extras?: { option: boolean } }): Promise<any> { return; }

/**
* Registers a broadcast receiver for the specified filters
* @param filters {any}
*/
@Cordova({ sync: true })
registerBroadcastReceiver(filters: any): void { }

/**
* Unregisters a broadcast receiver
*/
@Cordova({ sync: true })
unregisterBroadcastReceiver(): void { }

/**
* Returns the content of the intent used whenever the application activity is launched
*/
@Cordova({ sync: true })
onIntent(): void { }

/**
*
*/
@Cordova({ sync: true })
onActivityResult(): void { }

/**
* @returns {Promise<any>}
*/
@Cordova()
getIntent(): Promise<any> { return; };

}