android - GCM send message faulty fonts -


i'm creating javaserver faces project send messages android application directed in https://github.com/google/gcm.

it works fine when perform modal messaging in:

public static void main (string [] args) { sendmessage() } 

but when call method send messages web interface, message appears in android faulty vietnamese font.

i think problem lies in requests send server notification. seems are encoded correct parameters. please make sure requests utf-8 encoded spaces replaced + symbol.

the url encoding has % symbol or character , two-character hex value corresponding utf-8 character. may differ language language.

change content type specify charset=utf-8 , encode request likewise. follow instruction on gcm docs.

the http header must contain following headers:

authorization: key=your_api_key content-type: application/json json; application/x-www-form-urlencoded;charset=utf-8 plain text. 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -