google cloud messaging - Device to Device push notification using android gcm without third party server -


we planning wirte messaging/chat kind applicaiton on android.we planning use gcm exchange messages.the traditional way have application server store gcmid of users , if user1 wants send message user2,

1.the user1 send message application server payload contains message , receipent id i.e user2 2.the application server retrieves gcmid of user2 , call sender.send(regid2 , message) 3.user2 receives message.

i see rest api call https://android.googleapis.com/gcm/send.

so if somhow user1 has gcmid of user2 why can't directly call gcm api user1 device reduce load on server , cost of operations on server.pls advise me on this.

note:we not planning use upstreaming

i did same using device_to_device_messaging_using_google_cloud_messaging_gcm_-_android_example tutorial. tut having complate sever client code using gcm. go through it,will achieve want.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -