fix(web-intent): registerBroadcastReceiver as Observable (#2491)
* Correcting format of registerBroadcastReceiver, current implementation provides no way to receive the registered broadcasts. Usage is as follows: webintent.registerBroadcastReceiver({ filterActions: [ 'com.example.ACTION' ], filterCategories: [ 'android.intent.category.DEFAULT' ] }).subscribe((intent) => {console.log('Received Intent: ' + JSON.stringify(intent.extras));}); * Resolving linting errors * Resolving additional linting error
This commit is contained in:
parent
a1c54f36b4
commit
47f739777e
@ -194,9 +194,14 @@ export class WebIntent extends IonicNativePlugin {
|
||||
/**
|
||||
* Registers a broadcast receiver for the specified filters
|
||||
* @param filters {any}
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
registerBroadcastReceiver(filters: any): void {}
|
||||
@Cordova({
|
||||
observable: true
|
||||
})
|
||||
registerBroadcastReceiver(filters: any): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters a broadcast receiver
|
||||
|
Loading…
Reference in New Issue
Block a user