Send Custom Push Message

0 votes

Hi, I would like to ask can i send a string like "Hi, I am admin. (event 10)", and i want the user to just see "Hi, I am admin" at his push notification, and when he go into the game, i still want to receive the "(event10)" thing. If in this case, i need to use

Send Multilingual Push Notification

or 

Send Custom Push Message To User In Key Value Or JSON Format

I using for unity project, thanks

In Addition send custom push message to user in key value or json format is not available in unity??

asked Aug 22, 2014 in App42PaaS & BPaaS by admin (10 points)
edited Aug 22, 2014 by admin

1 Answer

0 votes

You can send message in JSON format to your user which will be having additional details in it. For example, alert key will contain 'Hi I am admin' and event key will contain value 10. On recieving of this message you can show alert message to user and event key you can use inside your app.

If you are sending message in non english character, you have to just set encoding flag as  true while sending this message. See here for details.

Let me know if it helps.

answered Aug 23, 2014 by ajay123 (899 points)
but i doing unity project, but there said Send Custom Push Message To User In Key Value Or JSON Format not available for unity porject , any idea??
Hi ajay123

when is the function available for unity??(send message json format)

Thanks
You can create your own custom json string and send as a message using send push message to user api in which your json string should look like this:

{
    "badge": "1",
    "sound": "default",
    "alert": "Hello, Ur Friend has poked you!",
    "event": "10"
}
 
For iOS the message is shown in the push notification is "Hello, Ur Friend has poked you!" and for android you can set through native plugin. In which you can parse this json string and setMessage to Notification tab from alert key. Also parse the event key in your file after retrieving from the json.
 
Let us know if it helps.
Hi hs0015,
Thanks for reply, sorry i still cant get how to get the result, for android version, i need to go through eclipse and modify the jar file to only read the alert message? native plugin is those jar file?
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...