Open URL in App
When sending a push notification you may optionally specify a specific URL to open within your app when the notification banner is tapped. When composing a new push notification within the OneSignal portal (or via REST API) include a field in Additional Data named targetUrl
and specify the URL to be opened.
Launch URL ≠ targetUrl
OneSignal offers a built-in field Launch URL which opens a specified URL in a popup browser window within your app when the notification banner is tapped. This popup browser is provided by the OneSignal SDK and does not include all the functionality available within your app such as the Median JavaScript Bridge and Internal/External Link Handling. Typically, you will want notifications to open URLs in your app directly to provide a full experience for users and you should thus use the
targetUrl
parameter rather than Launch URL.
Learn more about opening URLs via push notifications in the OneSignal Documentation
Updated about 2 months ago