<div dir="ltr">Which versions of Android, aerogear-android-push, and unified push server are you using?<div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 27, 2016 at 10:20 AM, LinkZ <span dir="ltr"><<a href="mailto:mcrj777@gmail.com" target="_blank">mcrj777@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Folks,<br>
<br>
I am trying to send push notifications using following code...<br>
<br>
*curl:*<br>
"curl -u "XXXXXXXXXXXX" -v -H "Accept: application/json" -H "Content-type:<br>
application/json;charset=UTF-8" -X POST -d '{"alias" : ["<a href="tel:12345678912" value="+12345678912">12345678912</a>"],<br>
"ttl" : 3600, "message": { "alert":"Do it faça.", "sound":"default",<br>
"badge":0, "idNotificacao":1}}' <a href="http://pushserver.pt/rest/sender" rel="noreferrer" target="_blank">pushserver.pt/rest/sender</a><br>
<br>
*My Handler:*<br>
...<br>
public class NotificationBarMessageHandler implements MessageHandler {<br>
public static final int NOTIFICATION_ID = 1;<br>
private Context context;<br>
<br>
public static final NotificationBarMessageHandler instance = new<br>
NotificationBarMessageHandler();<br>
<br>
public NotificationBarMessageHandler() {<br>
}<br>
<br>
@Override<br>
public void onMessage(Context context, Bundle bundle) {<br>
this.context = context;<br>
//Here I get the message without latin character.<br>
//message = "Do it faa".<br>
String message = bundle.getString(UnifiedPushMessage.ALERT_KEY);<br>
NFPApplication application = (NFPApplication)<br>
context.getApplicationContext();<br>
application.addMessage(message);<br>
notify(bundle);<br>
}<br>
...<br>
}<br>
<br>
*AndroidManifest*:<br>
...<br>
<receiver<br>
<br>
android:name="org.jboss.aerogear.android.unifiedpush.gcm.AeroGearGCMMessageReceiver"<br>
android:permission="com.google.android.c2dm.permission.SEND"><br>
<intent-filter><br>
<action android:name="com.google.android.c2dm.intent.RECEIVE" /><br>
<action android:name="com.google.android.c2dm.intent.REGISTRATION"<br>
/><br>
<category android:name="br.empresa.cliente.projeto" /><br>
</intent-filter><br>
<meta-data<br>
android:name="DEFAULT_MESSAGE_HANDLER_KEY"<br>
<br>
android:value="br.empresa.cliente.projeto.handler.NotificationBarMessageHandler"<br>
/><br>
</receiver><br>
...<br>
<br>
*VMOptions*:<br>
...<br>
-Dfile.encoding=UTF-8<br>
...<br>
<br>
When the message is in English, latin charset, everything works. However,<br>
when I try other languages or the character ç, they are deleted from the<br>
string.<br>
<br>
Note: When I test the iPhone everything works fine, but when I test on<br>
Android have this problem to the same message.<br>
It's encoded in utf-8, my database is MySQL deployed on a Linux server.<br>
<br>
<br>
Thanks in advance.<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://aerogear-users.1116366.n5.nabble.com/Latin-Characters-in-Push-Notification-tp767.html" rel="noreferrer" target="_blank">http://aerogear-users.1116366.n5.nabble.com/Latin-Characters-in-Push-Notification-tp767.html</a><br>
Sent from the aerogear-users mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
</blockquote></div><br></div>