Hello ,
I need to send a push message with sound and badge.
I write this Code:
$msg="Hello World";
$title = "My App Title";
$user = "xxxxx";
App42API::initialize($APP42_API, $APP42_KEY);
App42API::setLoggedInUser("xxxxx");
$pushNotificationService = App42API::buildPushNotificationService();
$msgJs = "{'alert':'$msg','title':'$title','badge':1,'sound':'default','sendingFrom':'serverSide'}";
$pushNotification = $pushNotificationService->sendPushMessageToUser($user, $msgJs);
This work fine and notifications arrive.
But if I want to send this message :
$msg="Thank's Baby";
$title = "My App Title";
$user = "xxxxx";
App42API::initialize($APP42_API, $APP42_KEY);
App42API::setLoggedInUser("xxxxx");
$pushNotificationService = App42API::buildPushNotificationService();
$msgJs = "{'alert':'$msg','title':'$title','badge':1,'sound':'default','sendingFrom':'serverSide'}";
$pushNotification = $pushNotificationService->sendPushMessageToUser($user, $msgJs);
The message don't arrive to the phone's
I also try
$msg=addslashes("Thank's Baby");
But don't send nothing.
I don't receive any error.
Can you help Me.
Best regards