question

Pierre Demessence avatar image
Pierre Demessence asked

Unable to send Push Notification to Android for a Task using the form

Hello,

It seems that I'm unable to send push notifications to Android devices using the "Send Push Notification" action when making a Task for example :

capture.png

But if I use a cloudscript instead, it works very well :

handlers.PushNotification = function (args, context) {
  	server.SendPushNotification({
      recipient: currentPlayerId,
      subject: args.subject,
      message: args.message
    });
}

It works, but it is still not very convenient to have to write JSON instead of plain text to send a notification (especially for non developper coworkers) and it's also not possible to use the parameters in the message (<Profile.PARAMNAME>).

Using the form on the "Overview" tab of an user works on the other hand. It will show the title ID of the application as notification title, but I think I already saw this bug being reported here.

The Title ID is 6FE7 (I also tested on other titles created for developement).

Thanks,

Pierre

Push Notifications
capture.png (9.8 KiB)
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

·
pfnathan avatar image
pfnathan answered

A screen capture only shows an action, can you let us know what the task is as well as what you want to trigger for push notification?

Also, you can build your own strings, since you have context.

Refererence documentation: https://api.playfab.com/docs/tutorials/landing-automation/using-cloud-script-actions-with-playstream

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.