By default, the Pushwoosh Android SDK might be configured to open links associated with certain domains within your app rather than externally in a browser or another app (like the YouTube app). This behavior can differ from iOS where such links might open externally by default.
This happens because the specific domain (e.g., youtube.com
) might not be included in the list of allowed external hosts in your Android application's Pushwoosh integration.
To resolve this and allow YouTube links (or links from other specific domains) to open externally on Android, you need to modify your application's code to add the domain to the allowedExternalHosts
list.
Here is an example code snippet for your Android integration:
// Make sure to call this after Pushwoosh initialization
Pushwoosh.getInstance().registerForPushNotifications()
// Define the list of allowed external hosts
val allowedHosts = ArrayList<String>()
allowedHosts.add("youtube.com") // Add any other domains you want to allow
// Set the allowed hosts list in the Pushwoosh SDK
Pushwoosh.getInstance().setAllowedExternalHosts(allowedHosts)
After implementing this change in your app's code and releasing an update, push notifications with links to the allowed domains should open externally in the browser or the relevant app on Android devices.
Comments
0 comments
Please sign in to leave a comment.