FreakDev / PhoneGap-Android-HTML5-WebSocket

a little java implementation of missing WebSocket form Android webview
80 stars 30 forks source link

Calling loadUrl to execute javascipt closes softkeyboard #2

Closed IndrekV closed 12 years ago

IndrekV commented 12 years ago

When calling mView.loadUrl() after getting a message from websocket, the loadUrl triggers softkeyboard closing. This is a workaround that calls loadUrl only when opening websocket. Then starts javascript polling every 3 seconds that gets all javascript that has been stored in Java and executes them.

FreakDev commented 12 years ago

Please note that this code has been written while PhoneGap has no official plugins system. I think it would be a good idea to format the code in order to make this a phonegap compatible plugin.

I didn't check if they have the same problem and already have (if needed) a workaround, but i really think one day i should rewrite it to match the phonegap plugin design (and delegate this part of the code "Java to WebView" to the plugin system)