Hello, I'm using Unity in my game and I would like to get the custom data of the push notifications. There is any way to get the custom-data?

I want to use the custom data, when the user open the game after opening a notification.

Thanks!

UPDATE/EDIT: My question is if I have the game closed, and I get a push notification in the top bar, when I open the game using the notification where I can manage the push.

asked 12 May '15, 12:30
emora's gravatar image

emora
4115

edited 18 May '15, 12:11

Hello,

In order to send custom data with your notification, you should use the "Additional data" tab in your Control Panel or the "data" section of the createMessage request. There, you can simply specify a { "key": "value" } pair. This way, the JSON pair would be delivered with your notification in the "u" parameter of the payload, and when your user clicks on the notification, your app can retrieve the data and process it any way you'd like to.

permanent link
answered 18 May '15, 12:03
Andrew_H's gravatar image

Andrew_H
3766

Hi, Thanks for the reply. This is really helpful for the management if the app in opened as I will receive the message in the function "onPushNotificationsReceived".

But my question is if I have the game closed, and I get a push notification in the top bar, when I open the game using the notification where I can manage the push.

Because I don't know if the unity plugin has something for this.

(18 May '15, 12:10) emora emora's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×434
×85
×25
×8

question asked: 12 May '15, 12:30

question was seen: 845 times

last updated: 18 May '15, 12:11