Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crashes when you rotate the device #9

Closed
hayksaakian opened this issue Jan 15, 2014 · 9 comments
Closed

crashes when you rotate the device #9

hayksaakian opened this issue Jan 15, 2014 · 9 comments

Comments

@hayksaakian
Copy link

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: view_android_.
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): #1 0x6be549ff /data/app-lib/gg.destiny.app-2/libstandalonelibwebviewchromium.so+0x0122f9ff
01-14 19:35:57.296: A/chromium(16363): #2 0x6bf45857 /data/app-lib/gg.destiny.app-2/libstandalonelibwebviewchromium.so+0x01320857
01-14 19:35:57.296: A/chromium(16363): #3 0x6be51503 /data/app-lib/gg.destiny.app-2/libstandalonelibwebviewchromium.so+0x0122c503
01-14 19:35:57.296: A/chromium(16363): #4 0x6be53f6f /data/app-lib/gg.destiny.app-2/libstandalonelibwebviewchromium.so+0x0122ef6f
01-14 19:35:57.296: A/chromium(16363): #5 0x418b3bcf /system/lib/libdvm.so+0x0001dbcf
01-14 19:35:57.296: A/chromium(16363): #6 0x418e4125 /system/lib/libdvm.so+0x0004e125
01-14 19:35:57.296: A/chromium(16363): #7 0x418bcfe3 /system/lib/libdvm.so+0x00026fe3
01-14 19:35:57.296: A/chromium(16363): #8 0x418c3fa3 /system/lib/libdvm.so+0x0002dfa3
01-14 19:35:57.296: A/chromium(16363): #9 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)

@VeeruPV
Copy link

VeeruPV commented Mar 4, 2014

Exactly the same problem - any suggestions?

@hayksaakian
Copy link
Author

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.

@VeeruPV
Copy link

VeeruPV commented Mar 4, 2014

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.

@hayksaakian
Copy link
Author

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" [email protected] 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//issues/9#issuecomment-36591112
.

@VeeruPV
Copy link

VeeruPV commented Mar 4, 2014

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

@hayksaakian
Copy link
Author

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 [email protected] 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//issues/9#issuecomment-36594345
.

@VeeruPV
Copy link

VeeruPV commented Mar 4, 2014

No, that is not the case, it is a native app, with one screen showing a webview, with the mentioned sockets in it.

@hayksaakian
Copy link
Author

i had to solve the same exact problem in one of my apps

look at this class, and follow the bread crumbs

https://github.com/destinygg/android/blob/destinyapp/src/gg/destiny/app/support/WebViewClientWithWebSockets.java

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 [email protected] 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//issues/9#issuecomment-36594655
.

@mogoweb
Copy link
Owner

mogoweb commented Jun 13, 2014

solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants