0

I have developed an android webapp with Phonegap (Cordova 2.7.0). The app needs to receive some prices pushed by a server through the use of a third party JS API (Diffusion).

The app works well on standard desktop browsers, where websockets are available, however on the Android emulator does not seem to work due to this latter's lack of support for websockets.

I thus thought to use a different mobile browser, such as Opera or Chrome, however I now have the problem of ensuring Android uses this new browser, when executing my webapp, rather then the standard one.

Does anyone know how to do this?

Thanks.

Diferdin
  • 1,252
  • 1
  • 14
  • 30
  • Also see: http://stackoverflow.com/questions/16675450/support-for-websockets-on-android/16695346#16695346 – leggetter May 30 '13 at 14:05

1 Answers1

0

PhoneGap for Android uses WebView, not a browser.

The simplest solution is to use a Web sockets plugin for PhoneGap, or to write your own such plugin if you cannot find an existing one that you like.

It is theoretically possible to rewrite PhoneGap to use the Android version of Chromium, but this will be a massive undertaking.

Community
  • 1
  • 1
CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491