Send Push Fail depends on text

0 votes

Hello,

I develop a program to send push notification in Java, but I have a problem if I send this text "Questa è una prova" notification start correctly.

If I send the text "Questa è una prova" I get an exception : {"app42Fault":{"httpErrorCode":401,"appErrorCode":1401,"message":"UnAuthorized Access","details":"Client is not authorized"}}

I make a lot of test and if i write chararacts like "è,ì,à" in the message text I get the excption Client is not authorized, but this only with java, with PHP all work fine.

This is the code:

//userList is a ArrayList of String
//msgJS is the text of message like {"idmsg":"11253","badge":1,"alert":"Questa è una prova","sound":"default","sendingFrom":"serverSide","title":"OpenDartFics"}

PushNotificationService pushService = App42API.buildPushNotificationService();
HashMap<String, String> otherMetaHeaders = new HashMap<>();  
otherMetaHeaders.put("dataEncoding", "true");  
pushService.setOtherMetaHeaders(otherMetaHeaders);  
pushService.sendPushMessageToGroup(msgJS, userList);

 

asked Aug 25, 2017 in Java by odf (37 points)

1 Answer

0 votes
Hi,

Apologies for late reply.

Team is looking into it and will update you asap.

Thanks.
answered Aug 28, 2017 by rajeev.etc (1,660 points)
Hello,

Your example send message correctly, my application on my development pc (Windows PC )
continue to give me the errror. Tomorrow I will test with linux development PC
Best regards
Hello,

Greetings!!!

In case if you are facing any issues after the test this sample at your end please do feel free to reach out to us.

We will be happy to help you!

Regards,
Priyanka Singh
App42 Team
Hello,
your example do not work on my development pc in windows, but work on linux development pc, same tomcat version, same java version. I don't understant where is the problem.same software, same libraries, only the operating system is different. Is very strange.
There is something I can do to understand the problem.
Hello,

Greetings!!!

We have forwarded your query to our team, we will be getting back to you as soon as possible.

Meanwhile, if you have any other queries please do feel free to reach out to us.

We will be happy to help you!

Regards,
Priyanka Singh
App42 Team
Hello,

Could you please make sure that UTF-8 setting is enabled in case of Windows PC? Please check and let us know If you are still facing these issues.

We will be happy to help you!

Regards,
Priyanka Singh
App42 Team
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
...