question

pingu2k4 avatar image
pingu2k4 asked

What options are available for AdvancedPushPlatformMsg for push notifications on Android?

Having used OneSignal in the past, there is a whole metric ton of options when sending push notifications I have noticed. For example, the ability to change the accent color. I am assuming that we could specify for Android to do this, in the AdvancedPlatformDelivery list, but I am unsure how this would work.

for the AdvancedPlatformDelivery parameter, would I pass something like:

{"Platform":"GoogleCloudMessaging","Json":{"AccentColor":"#FF9900FF"}}

How would I find documentation on what options here would be available, and how to format them?

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

There's a backlog task to make a guide for this, but it's not in the short-list for now. We'll get to it when we can.

For today, try just this:

{"AccentColor":"#FF9900FF"}

We do some manipulation to get it through SNS, but the json you give us is the json received by the device (plus a bit more).

Don't try to control any platform stuff (we do that), just give us the json you want the device to receive.

4 comments
10 |1200

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

1807605288 avatar image 1807605288 ♦ commented ·

Additionally, whatever fields you get successfully working, please share, so others don't have to repeat your research (including me, as I can add thing you discover as default features too)

0 Likes 0 ·
pingu2k4 avatar image pingu2k4 commented ·

Thanks. I tried this, but it didnt change the accent color. The reason I was previously listing the platform stuff was after viewing this page: https://api.playfab.com/documentation/Server/datatype/PlayFab.Server.Models/PlayFab.Server.Models.AdvancedPushPlatformMsg

0 Likes 0 ·
1807605288 avatar image 1807605288 ♦ pingu2k4 commented ·

I guess that's my point. The documentation for the Json field is:

The Json the platform should receive.

The available fields are all the fields that I knew about, and could get working, back when the current interface was developed. I am by no means saying it's complete (which is why I did the advanced option), but it also doesn't go directly to FCM. It goes through SNS first, which may limit the options that are available.

It can also be complicated by seemingly bizarre and mundane problems like capital-case, absence or presence of other parameters, etc.

These are the guides that are-probably/seem-to-be the latest version of the guides I used back then:
https://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-custommessage.html
https://firebase.google.com/docs/cloud-messaging/http-server-ref

0 Likes 0 ·
1807605288 avatar image 1807605288 ♦ pingu2k4 commented ·

If I remember correctly, I copy everything you provide me in the advanced json field into both the data and notification sub-fields. That way, anything you give me can affect both.

0 Likes 0 ·

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.