Hi, I installed the One Signal plugin and I’m creating a page for notification settings. I can not access the getPermissionSubscriptionState method.
I pass correctly in costructor
private _SIGNAL : OneSignal
and then
this._PLATFORM.ready()
.then(() =>
{
this.triggerNotification();
});
In the method i configure options like this
this._SIGNAL.startInit(......)
this._SIGNAL.inFocusDisplaying(this._SIGNAL.OSInFocusDisplayOption.InAppAlert);
// Retrieve the OneSignal user id and the device token
this._SIGNAL.getIds()
.then((ids) =>
{
this.storage.set('player_id', ids.userId);
console.log('getIds: ' + JSON.stringify(ids));
this.locationTracker.startTracking(ids.userId);
});
// When a push notification is received handle
// how the application will respond
this._SIGNAL.handleNotificationReceived()
.subscribe((msg) =>
{
// Log data received from the push notification service
console.log('Notification received');
console.dir(msg);
});
// When a push notification is opened by the user
// handle how the application will respond
this._SIGNAL.handleNotificationOpened()
.subscribe((msg) =>
{
// Log data received from the push notification service
console.log('Notification opened');
console.dir(msg);
});
this._SIGNAL.getPermissionSubscriptionState()
.then((msg) {
console.log(JSON.stringify(msg));
});
// End plugin initialisation
this._SIGNAL.endInit();
but this is not working :getPermissionSubscriptionState
I do not understand why
Property ‘getPermissionSubscriptionState’ does not exists on type ‘OneSignal’
global packages:
@ionic/cli-utils : 1.4.0
Cordova CLI : 6.5.0
Ionic CLI : 3.4.0
local packages:
@ionic/app-scripts : 1.3.7
@ionic/cli-plugin-cordova : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms : android 6.1.2
Ionic Framework : ionic-angular 3.4.2
System:
Node : v6.7.0
OS : Windows 7
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
npm : 3.10.3
I’ve installed the latest plugin
Any ideas?