I am planning to make a chat app through which user can send and receive text and media - audio, image and video. For simplicity I decided to use app engine with GCM. Doing downstream with GCM seems to be working well (for text messages) using the example guide provided and Android Studio template. When I tried upstream I did not receive the message back. May be this is very trivial but can someone please point me to a good tutorial or book on this. Any suggestions?
Used this for downstream: https://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/master/GcmEndpoints And this for upstream: https://developers.google.com/cloud-messaging/upstream
I had to add @ApiMethod(name = "sendMessage") to sendMessage method in MessagingEndpoint class generated through Studio template. After that I was able to use the sendMessage api to send the message back to app engine server which is linked to GCM and that message echoed back to my device as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With