React-native-onesignal: How to remove modal view which appears in the Android app, when app is opened and user is receiving PN in that moment?

Created on 5 Dec 2018  ·  4Comments  ·  Source: OneSignal/react-native-onesignal

Description:

How to remove modal view which appear in the Android app, when app is opened and user is receiving PN in that moment?

(your description here)

Environment

1."react-native-onesignal": "^3.2.7"

  • yarn
  • Steps to Reproduce Issue:

  • Install the OneSignal SDK using yarn into your project

  • Initialize the SDK in react native
  • Receive push notification when app is opened
  • Anything else:

    pn

    Most helpful comment

    Why is this closed, and why is this even a feature?, when you install a library for push notifications why would you want a modal opening in screen showing the content of the push???

    All 4 comments

    Please add some more details, I am not sure I understand your issue at all...?

    @Nightsd01 If you don't understand the issue, it doesn't mean that issue is not exist, and it's not a reason to close it.

    The problem is that not everyone want to see Push Notification in form of ugly Alert when app is in foreground which is build-in inside oneSignal library.

    Due to the fact that there is no normal documentation for react-native-onesignal it was not clear how to get rid of that alert.

    I found out that it's possible to use OneSignal.inFocusDisplaying(2) in order to remove that Alert.

    Same here iOS 11 device versions. i am using inFocusDisplaying(0) and it works fine. However, if application is closed(even not in background) and user clicks notification and that time if get another notification it shows as alert.

    Why is this closed, and why is this even a feature?, when you install a library for push notifications why would you want a modal opening in screen showing the content of the push???

    Was this page helpful?
    0 / 5 - 0 ratings