0

I 'm developing an android app. Integrating PubNub with our app for Push Notifications.

I'm getting error while Publishing an message to PubNub using PubNub Api method called Publish.

I'm getting error especially while publishing the below two special characters.

"

\

Mohamad Shiralizadeh
  • 8,329
  • 6
  • 58
  • 93
M Vignesh
  • 1,586
  • 2
  • 18
  • 55
  • 1
    Could you share any more information about the error? Also share your code for publishing if you could. This could be incorrect message syntax. A safe way of sending data is putting it all in a JSONObject and sending that. – GleasonK Jun 24 '15 at 22:23
  • 1
    Yes I have fixed it by encoding and decoding. – M Vignesh Jun 29 '15 at 11:53

1 Answers1

0

Encoding/Decoding is correct, but also, be sure you do not send JSON content as a string. Always send a JSON object if the content is JSON data.

Craig Conover
  • 4,710
  • 34
  • 59