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

fix(onesignal): delete method deprecated #691

Merged
merged 1 commit into from
Oct 13, 2016
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
15 changes: 5 additions & 10 deletions src/plugins/onesignal.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Cordova, Plugin } from './plugin';
import { Observable } from 'rxjs/Observable';


/**
* @name OneSignal
* @description
Expand All @@ -16,7 +15,7 @@ import { Observable } from 'rxjs/Observable';
*
* OneSignal.startInit('b2f7f966-d8cc-11e4-bed1-df8f05be55ba', '703322744261');
*
* OneSignal.enableInAppAlertNotification(true);
* OneSignal.inFocusDisplaying(OneSignal.OSInFocusDisplayOption.InAppAlert);
*
* OneSignal.handleNotificationReceived().subscribe(() => {
* // do something when notification is received
Expand All @@ -38,7 +37,7 @@ import { Observable } from 'rxjs/Observable';
export class OneSignal {

/**
* @private
* constants to use in inFocusDisplaying()
*/
static OSInFocusDisplayOption = {
None: 0,
Expand Down Expand Up @@ -172,17 +171,13 @@ export class OneSignal {
static enableSound(enable: boolean): void { }

/**
* Warning:
* Only applies to Android and Amazon devices.
*
* By default this is false and notifications will not be shown when the user is in your app, instead the notificationOpenedCallback is fired.
* If set to true notifications will always show in the notification area and notificationOpenedCallback will not fire until the user taps on the notification.
* Setting to control how OneSignal notifications will be shown when one is received while your app is in focus. By default this is set to inAppAlert, which can be helpful during development.
*
* @param {boolean} enable
* @param {number} displayOption Options are 0 = None, 1 = InAppAlert, and 2 = Notification.
*/
@Cordova({ sync: true })
static enableNotificationsWhenActive(enable: boolean): void { }

static inFocusDisplaying(displayOption: number): void { }

/**
* You can call this method with false to opt users out of receiving all notifications through OneSignal.
Expand Down