Onesignal-android-sdk: Open Launch URL in an my app web view

Created on 6 Dec 2017  路  4Comments  路  Source: OneSignal/OneSignal-Android-SDK

Hello i set up onesignal Notification in my android app web view

but android when open notification will launch web browsers not in android app.

i want launch web url into my app

please help me

Question

All 4 comments

@ibnabdelfatah To open a URL in your own custom WebView you will need to use additional data instead of setting launchURL on your notification. More details in our documentation below.
https://documentation.onesignal.com/docs/links#section-how-do-i-open-a-url-in-my-app-instead-of-the-web-browser-

@ibnabdelfatah Closing this issue due to inactivity. Feel free reply with more details if the above suggestion did not help.

@smakinson You can disable the OneSignal default open behavior by following the Changing the open action of a notification section in the OneSignal docs. This includes the default behavior of opening a URL in the browser when the user opens an app notification.

Some additional clarification below from the questions you asked.

  1. If the user taps on a web notification, the browser will open to the URL you set on the notification.

    • can be change with the disable defaults instructions I liked to above.

  2. If the user taps on a app notification, the browser will also the browser to the URL was set by default.

If a user subscribed to web push and also installed your app and you target both platforms with your notification they user will see both on their device. The user will need to disable / unsubscribe from either the app or your site to stop getting 2 notifications in this case.

isAndroid or any of the other is* platform settings will not work with include_player_ids as this overrides it.

@smakinson You can disable the OneSignal default open behavior by following the Changing the open action of a notification section in the OneSignal docs. This includes the default behavior of opening a URL in the browser when the user opens an app notification.

Some additional clarification below from the questions you asked.

  1. If the user taps on a web notification, the browser will open to the URL you set on the notification.

    • can be change with the disable defaults instructions I liked to above.
  2. If the user taps on a app notification, the browser will also the browser to the URL was set by default.

If a user subscribed to web push and also installed your app and you target both platforms with your notification they user will see both on their device. The user will need to disable / unsubscribe from either the app or your site to stop getting 2 notifications in this case.

isAndroid or any of the other is* platform settings will not work with include_player_ids as this overrides it.

Thanks A LOT !! I finally solve my problem !

Was this page helpful?
0 / 5 - 0 ratings