Closed hayksaakian closed 9 years ago
Exactly the same problem - any suggestions?
My solution was to avoid this library for now.
Find whatever features you need from chromium web view as standalone libraries and hook into the normal web view with JavaScript interface.
That does'nt really sound like a solution :) Chromium works fine for what i need to do (load a html 5 page with sockets) - any other alternatives? i cannot really change the html 5 page.
Essentially what you would do is implement the API you need in Java and then write a wrapper for it in JavaScript.
Android has a way to hook into java from JavaScript. Look into @JavascriptInterface annotation.
I personally did this for implementing websockets in an app of mine. On Mar 3, 2014 8:25 PM, "VeeruPV" notifications@github.com wrote:
That does'nt really sound like a solution :) Chromium works fine for what i need to do (load a html 5 page with sockets) - any other alternatives? i cannot really change the html 5 page.
Reply to this email directly or view it on GitHubhttps://github.com/mogoweb/chromium_webview/issues/9#issuecomment-36591112 .
Thanks for the headup, but that sounds greek to. Any direction that you can recommend? The websockets are already a part of the html5 page, and all i need is to get it working inside a webview
the easiest way (assuming your whole android app is a webview) is to use cordova/phonegap
they have a custom webview that includes things like websockets
On Mon, Mar 3, 2014 at 9:52 PM, VeeruPV notifications@github.com wrote:
Thanks for the headup, but that sounds greek to. Any direction that you can recommend? The websockets are already a part of the html5 page, and all i need is to get it working inside a webview
Reply to this email directly or view it on GitHubhttps://github.com/mogoweb/chromium_webview/issues/9#issuecomment-36594345 .
No, that is not the case, it is a native app, with one screen showing a webview, with the mentioned sockets in it.
i had to solve the same exact problem in one of my apps
look at this class, and follow the bread crumbs
it comes down to what i said
1) java webview client that implements websocket functionality in java 2) javascript file that implements the websocket API client (with hooks into java) 3) inject the JS file into the webview on page load with a custom webviewclient
it's a pretty hot mess
if i had to do it again, i would simply include cordova into my project, and use a cordova webview instead
On Mon, Mar 3, 2014 at 10:00 PM, VeeruPV notifications@github.com wrote:
No, that is not the case, it is a native app, with one screen showing a webview, with the mentioned sockets in it.
Reply to this email directly or view it on GitHubhttps://github.com/mogoweb/chromium_webview/issues/9#issuecomment-36594655 .
solved
i've got it working, albeit sluggishly, and it seems to crash now whenever the screen rotation changes.
see logcat:
01-14 19:35:57.296: A/chromium(16363): [FATAL:content_view_core_impl.cc(730)] Check failed: viewandroid. 01-14 19:35:57.296: A/chromium(16363): #00 0x6ae407fd /data/app-lib/gg.destiny.app-2/libstandalonelibwebviewchromium.so+0x0021b7fd 01-14 19:35:57.296: A/chromium(16363): #01 0x6be549ff /data/app-lib/gg.destiny.app-2/libstandalonelibwebviewchromium.so+0x0122f9ff 01-14 19:35:57.296: A/chromium(16363): #02 0x6bf45857 /data/app-lib/gg.destiny.app-2/libstandalonelibwebviewchromium.so+0x01320857 01-14 19:35:57.296: A/chromium(16363): #03 0x6be51503 /data/app-lib/gg.destiny.app-2/libstandalonelibwebviewchromium.so+0x0122c503 01-14 19:35:57.296: A/chromium(16363): #04 0x6be53f6f /data/app-lib/gg.destiny.app-2/libstandalonelibwebviewchromium.so+0x0122ef6f 01-14 19:35:57.296: A/chromium(16363): #05 0x418b3bcf /system/lib/libdvm.so+0x0001dbcf 01-14 19:35:57.296: A/chromium(16363): #06 0x418e4125 /system/lib/libdvm.so+0x0004e125 01-14 19:35:57.296: A/chromium(16363): #07 0x418bcfe3 /system/lib/libdvm.so+0x00026fe3 01-14 19:35:57.296: A/chromium(16363): #08 0x418c3fa3 /system/lib/libdvm.so+0x0002dfa3 01-14 19:35:57.296: A/chromium(16363): #09 0x418c163b /system/lib/libdvm.so+0x0002b63b 01-14 19:35:57.296: A/chromium(16363): #10 0x418f6867 /system/lib/libdvm.so+0x00060867 01-14 19:35:57.296: A/chromium(16363): #11 0x418fe7c9 /system/lib/libdvm.so+0x000687c9 01-14 19:35:57.296: A/chromium(16363): #12 0x418bcfe3 /system/lib/libdvm.so+0x00026fe3 01-14 19:35:57.296: A/chromium(16363): #13 0x418c3fa3 /system/lib/libdvm.so+0x0002dfa3 01-14 19:35:57.296: A/chromium(16363): #14 0x418c163b /system/lib/libdvm.so+0x0002b63b 01-14 19:35:57.296: A/chromium(16363): #15 0x418f6583 /system/lib/libdvm.so+0x00060583 01-14 19:35:57.296: A/chromium(16363): #16 0x418dfd0d /system/lib/libdvm.so+0x00049d0d 01-14 19:35:57.296: A/chromium(16363): #17 0x40211de7 /system/lib/libandroid_runtime.so+0x0004cde7 01-14 19:35:57.296: A/chromium(16363): #18 0x40212b0d /system/lib/libandroid_runtime.so+0x0004db0d 01-14 19:35:57.296: A/chromium(16363): #19 0x4002705d /system/bin/app_process+0x0000105d 01-14 19:35:57.296: A/chromium(16363): #20 0x40124403 /system/lib/libc.so+0x0000e403 01-14 19:35:57.296: A/libc(16363): Fatal signal 6 (SIGABRT) at 0x00003feb (code=-6), thread 16363 (gg.destiny.app)