roblav96 / nativescript-onesignal

A Nativescript plugin that wraps the iOS and Android OneSignal Push Notifications SDK.
https://documentation.onesignal.com/docs/getting-started
Other
24 stars 42 forks source link

How to set setInFocusDisplaying to false #20

Closed OPADA-Eng closed 6 years ago

OPADA-Eng commented 6 years ago

Hi, I'm trying to disable alert notifications inside the app when active. I searched for a solution and found this options in OneSignal native SDK but when I tried to use it it says:

TnsOneSignal.startInit(...).setNotificationOpenedHandler(...).setInFocusDisplaying is not a function

How can I do this ? Thanks

OPADA-Eng commented 6 years ago

Finally I did it like this in android TnsOneSignal.setInFocusDisplaying(TnsOneSignal.OSInFocusDisplayOption.Notification); and it works