question

matheus.andrade@skyvu.net avatar image
matheus.andrade@skyvu.net asked

Android Notification's Icon and Title

Hi,

I am implementing PlayFab's push notifications on both iOS and Android and I ran into a problem when trying to customize Android notifications. The notifications have no icon and title set, even when I try to send them on a "SendPushNotification" call:
http://imgur.com/3HXhH88

Checking the documentation, I noticed that Title, Icon and Sound aren't valid fields on that call, hence sending them may be useless.

Is PlayFab unable to work with those customizable components or am I missing something?

10 |1200

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

brendan avatar image
brendan answered

Yes, we have advanced Push Notifications available. If you're a Unity user, we have an example of this in our Unity SDK: https://github.com/PlayFab/UnitySDK/blob/master/ClientExamples/PushNotificationExample.unitypackage.

We'll also publish a tutorial soon which gives the details on how the custom JSON of the advanced Push is put together, so that you can build it out yourself, if needed. If you're blocked on this and need the info before we've had a chance to review and edit the tutorial, let us know and we can send it to you by email.

10 |1200

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

matheus.andrade@skyvu.net avatar image
matheus.andrade@skyvu.net answered

I still can't figure how to use it. I'd really appreciate if you emailed it to me.

Thank you.

10 |1200

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

brendan avatar image
brendan answered

I've emailed you the link to the draft version of the doc (and I edited your email address out of your post - don't worry, we can get that from your account, and I'd hate for you to get spam because some bot crawled our forums).

10 |1200

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

matheus.andrade@skyvu.net avatar image
matheus.andrade@skyvu.net answered

Thank you so much for sending it to me and taking my email out.

10 |1200

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

matheus.andrade@skyvu.net avatar image
matheus.andrade@skyvu.net answered

One final question, should I register my Android device every time the app launches like iOS? This is how the example does, but there is some controversy about it online and I wonder how the PlayFab plugin implements it.

10 |1200

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

brendan avatar image
brendan answered

You should only need to register once, when the player agrees to accept Push Notifications. I would recommend re-requesting this of the user whenever you push an update to the game, as well as on installs, so that you can get them signed back up. You should never register a user for Push without asking them though - that's something that can get your title banned from the iTunes/Google Play stores.

10 |1200

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

brendan avatar image
brendan answered

You should only register the client for Push Notifications as a result of a player confirmation that they do want to receive those notifications - signing them up without asking could result in being removed from the Apple/Google marketplace. That said, it's a best practice to re-ask (and if they say yes, re-register) the client when you update your title, to make sure you're getting people to accept your communications.

10 |1200

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

ibrar avatar image
ibrar answered

@Brendan can you please give me an example snippet of how to use custom payload title,message and icon for android push notification?
Git repo link is broken

10 |1200

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

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.