OneSignal / react-native-onesignal

React Native Library for OneSignal Push Notifications Service
Other
1.56k stars 371 forks source link

[Android] Handle links when `meta-data android:name="com.onesignal.NotificationOpened.DEFAULT` is DISABLE and the app is closed #1214

Closed BokiGaja closed 3 years ago

BokiGaja commented 3 years ago

Hi guys, I had some problem when I wanted to handle deep links in the launchUrl so I don't get Open with prompt screen.

Description: Once I added <meta-data android:name="com.onesignal.NotificationOpened.DEFAULT" android:value="DISABLE" /> in the AndroidManifext.xml and setNotificationOpenedHandler in the App.js in order to prevent Open with prompt for launchUrl and to handle deep link open the notifications link wouldn't open if the app is closed. Do you have some advice on how I can handle launchUrl differently and prevent Open with prompt once I want to use deep links inside the app, without losing the ability to open the link when the app is closed?

Environment

  1. OneSignal React-Native SDK version: 4.0.4
  2. Added with npm
BokiGaja commented 3 years ago

Also, the same issue appeared for the Android as mentioned in this issue: https://github.com/OneSignal/OneSignal-Android-SDK/issues/1312

rgomezp commented 3 years ago

Duplicate of #OneSignal/OneSignal-Android-SDK#1312