How to use Comet or HTTP push with PhoneGap

180 views
Skip to first unread message

Jason Christopher Hartley

unread,
Apr 6, 2012, 6:50:58 PM4/6/12
to phon...@googlegroups.com
What is the best way to implement Comet or another HTTP push technique in PhoneGap?

I have tried the long-polling technique and the hidden iframe technique, but they just don't behave the way they should in the phone.  (Oddly, the hidden iframe technique worked properly when viewed in the Android browser, but did not work properly when the same code was in the PhoneGap app.)  I'm trying to avoid websockets, etc., unless there is a way to ensure I'll never have to worry about firewalls or blocked ports.  I'm also trying to avoid using a third-party push service.  I want to write the server and client code myself; I just want to know what technique or technology I should be using.  Cross-platform compatibility is a huge plus.
Reply all
Reply to author
Forward
0 new messages