java - GCM device to device messaging - how is it done? -
i'm interested in how apps whatsapp implement feature. i've read it's bad practice send message directly device device, because can api key , send messages application.
what's solution then? having server , making devices communicate server, when want send message device, goes server , server target device?
also question:
public void onmessagereceived(string from, bundle data)
this method of gcmlistenerservice. when "from" different default senderid? because tried sending message directly 1 device , "from" still default senderid got when registered app on website.
basically, need server listen upstream messages , broadcast again intended recipients.
you can find article describing here: http://javapapers.com/android/android-chat-with-google-gcm-xmpp/
the approach pretty limited , not flexible having own messaging server, should enough proof of concept.
Comments
Post a Comment