Hello,
Please find a below code snippet to send multilingual push notification and use the same for sending message:
String userName = "Nick";
String message = "Message which you have to send";
App42Log.SetDebug(true); //Print output in your editor console
PushNotificationService pushNotificationService = App42API.BuildPushNotificationService();
Dictionary<String, String> otherMetaHeaders = new Dictionary<String, String>();
otherMetaHeaders.Add("dataEncoding", "true");
pushNotificationService.SetOtherMetaHeaders(otherMetaHeaders);
pushNotificationService.SendPushMessageToUser(userName,message, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
public void OnSuccess(object response)
{
PushNotification pushNotification = (PushNotification) response;
App42Log.Console("Message is " + pushNotification.GetMessage());
App42Log.Console("userName is : " + pushNotification.GetUserName());
}
public void OnException(Exception e)
{
App42Log.Console("Exception : " + e);
}
}
About your second query, multiple notification comes only when you have registered same device token for multiple user and using send message to all method to send the push notification. Please check and if that is not the case than please share the method logs & App Name with us. To print the logs, kindly use below line of code and put before calling the send message api.
App42Log.SetDebug(true);
Thanks