简体   繁体   中英

GCM Java Server : Send message with accented character

I try to send message with accented character, for test i use a simple string :

        String message ="éèàôaaaa";

My GCM Java Server source code :

        // use this line to send message with payload data
        Message message = new Message.Builder()
            .collapseKey("1")
            .timeToLive(3)
            .delayWhileIdle(true)
            .addData("Alerte : ",   message)
            .build();

On OSX with eclipse : Once message is pushed, on my device (xperia s and nexus 7) i have "????aaaa" in status bar

On Windows7 with eclipse : Once message is pushed, on my device (xperia s and nexus 7) i have "aaaa" in status bar

Any idea ?

This is because your unicode chars are unsafe for URLs, see my other answer . The same applies to your problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM