question

austin avatar image
austin asked

URL-linking in Push Notifications

Hello,

Is it possible to create a Push Notification containing a URL link?

Push Notifications
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
1807605288 avatar image
1807605288 answered

I don't think I've ever seen a clickable url link in a push notification. Certainly I don't know how to do it, with or without PlayFab.

I think you could simulate something close to a clickable url using Android, but I don't think it would display correctly.

So, short answer:
My first guess is that no, it won't really look or operate the way you would expect a clickable link to operate.

Workaround:
That said, I think you could get close, if you're willing to invest some effort, and beg some forgiveness from your users.

Android push notifications have two parts, the first is the "notification message" and the other is "data". You can send a message with one or both of these elements (Though PlayFab doesn't support data-only messages particularly well). My suggestion would be to send a combined message that has both a message, and data. The message would be something like "Click this notification to visit the page", and the data would contain the url, in some kind of json structure. It would be the responsibility of your app to receive the data portion of the message, and display/open the url appropriately. I've seen apps trigger a call to the OS to make them open the browser to a page, but I don't really know how to do it off hand.

I know that's not all of the solution, but I hope it points you in some correct directions.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

austin avatar image austin commented ·

Hi Paul,

That's something along the lines of what we were thinking. Your workaround is definitely helpful for getting the wheels turning. Thanks!

1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.