I have a codenameone app with push notifications implemented (PushCallback + registerPush + implemented methods).
Since I am only working with Android at this point, I have a simple GCM call on the server side, like this:
.addHeader("Authorization", "key=" + googleAuthKey)
.addHeader("Content-Type", "application/json")
.bodyString(msg, ContentType.APPLICATION_JSON)
.execute().returnContent().asString();
My messages are sent successfully. The problem happens when I receive them on the mobile side. For some reason, the message arrives empty/blank (I am talking about the "value" argument of the push() method implemented in the Application class). I assume the mobile code expects a specific format that I am missing on the server side.
I know I could use the codenameone server to send push notifications, but I want the simplest code on my server for now. If the codenameone server uses GCM to deliver messages, then there is no reason for my code to not work using the same format, right? So what could be wrong with my code?
By the way, I would like to get the android sources from the build server (the answers to my questions are probably there), but I don't know how to enable that from IntelliJ. Ideally this option should also be available on the "account details" section of the build server. What do you suggest?
Thanks in advance,
Hugo