diff --git a/src/plugins/onesignal.ts b/src/plugins/onesignal.ts index 4ab9afe1d0..379d4bd515 100644 --- a/src/plugins/onesignal.ts +++ b/src/plugins/onesignal.ts @@ -1,4 +1,5 @@ import { Cordova, Plugin } from './plugin'; +import { Observable } from 'rxjs/Observable'; /** @@ -28,8 +29,7 @@ import { Cordova, Plugin } from './plugin'; @Plugin({ plugin: 'onesignal-cordova-plugin', pluginRef: 'plugins.OneSignal', - repo: 'https://github.com/OneSignal/OneSignal-Cordova-SDK', - platforms: ['Android', 'iOS', 'Windows Phone 8'] + repo: 'https://github.com/OneSignal/OneSignal-Cordova-SDK' }) export class OneSignal { @@ -38,14 +38,14 @@ export class OneSignal { * * @param {appId} Your AppId from your OneSignal app * @param {options} The Google Project Number (which you can get from the Google Developer Potal) and the autoRegister option. - * @returns {Promise} Returns a Promise that resolves when remote notification was recieved. + * @returns {Observable} when a notification is received. Handle your notification action here. */ - @Cordova() + @Cordova({ observable: true }) static init(appId: string, options: { googleProjectNumber: string, autoRegister: boolean - }): Promise { return; } + }): Observable { return; } /** @@ -253,4 +253,4 @@ export class OneSignal { visualLevel: number }): void { } -} +} \ No newline at end of file