Closed stereo720712 closed 10 years ago
Of course It'll work if you'll write a bridge (Java-JavaScript Interface). What do you want me to do?
Can you write a simple example briege about websocket webview client ? Thank you & Appreciate.
Why do you hope to use this plugin without PhoneGap? Are you making a native Android app? If we make a bridge for this plugin, we might as well make PhoneGap. It's too much trouble, and we don't have many benefits. Do you allow to import PhoneGap(as a jar file) as part of your app?
Yes, I am make a native Android app for my school lab test. I allow import PhoneGap,but it seems can't use myself webview?(instead by PhoneGap loadurl()). Sencond , I hope for the web page, it still can be like the html5 way.
Thank you and Appreciate .
You are trying to make a "browser" that is capable of using WebSockets?
I tried to make an example app: https://github.com/knowledgecode/example
This is an Eclipse project. Deploy files below www folder to your web server, and rewrite the 30th line of HelloCordova.java.
Tell me whether what you expected.
Thank you , I will try to write my expected example for you . Afeter finished , I will post here . Thank you very much.
https://www.dropbox.com/s/tlelvirb3gu9w1k/websocket%20server2-async.zip This is my android example ,I am try to write a websocket server and client in a native app,so I need a webview support websocket. (I use the koush/AndroidAsync for websocket Server,but fail in the websocket client now.) Does the phonegap have any different with the native webview or it's jsut a wrap? I am afraid use phonegap will have others affect in app.
I tried to incorporate Cordova(PhoneGap) into your example. It seems to work. Since you seem concerned about to use PhoneGap, I give advice you before providing the source.
First, I'm not exactly sure what is the difference between PhoneGap WebView and native WebView, but if you use my plugin, you are better to use PhoneGap. Because I've made it as "PhoneGap plugin". Second, I'll support that you use my plugin, but If you plan to use other WebSocket plugin in your app, please ask those authors. ok?
Now, I can commit to recent example repository or send you it directly with email. Which one is more convenient for you?
Thank you , I am try to using you code to set a webview , it's seems a good choice. I have try make a browser in the app, but it's too big. It can closed,Thank you very much.
Sorry , I am now restart writing this test . I test your example for the www.websocket.org, but the page is fail to connect by websocket. May you help me to take a look ? Thank you .
You have to connect to echo.websocket.org
.
Excuse me, I hope can use it without phonegap , does it can do webview java injection? It's like this : https://github.com/anismiles/websocket-android-phonegap but it is not support RFC6455,I try to fix but not success, Can you help me ? Thank you & Appreciate .