Closed seshuvinay closed 10 years ago
By Android, do you mean using java? If yes, you have to implement the client by yourself. Do a GET on subscriber location and handle the proper headers. Take a look on curl commands at docs as reference.
Yes I meant Java. Do you have any working example?
Take a look on this code as example https://github.com/wandenberg/nginx-push-stream-module/issues/97#issuecomment-31619692
Thank you! That works like a GEM :) I just had to change my URL and it worked.
Following code in Javascript is used for browser to connect to a push stream channel and receive messages. So How to implement the same in Android? What should PushStream Client consist of?
var pushstream = new PushStream({ host: "www.mydomain.in", port: window.location.port, modes: "longpolling", secondsAgo:3600
});
try {
pushstream.addChannel('channel'); pushstream.connect(); } catch(e) {};
pushstream.onmessage = function(eventMessage) { if (eventMessage != '') { var values = jQuery.parseJSON(eventMessage); } }