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

Android: plugin causes stop updating the dom until touch #658

Closed
n00dl3 opened this issue Oct 5, 2015 · 8 comments
Closed

Android: plugin causes stop updating the dom until touch #658

n00dl3 opened this issue Oct 5, 2015 · 8 comments

Comments

@n00dl3
Copy link

n00dl3 commented Oct 5, 2015

OK, so this is a weird bug, on Android (tested on HTC One m9 and Samsung galaxy S5).

I'm using angular js and Cordova: 5.2.0 to build my app, when I install this plugin, the webview isn't rendered anymore until I touch.

If I use the inspector, the DOM has changed, but it is not rendered on the webView. If and only if I touch the screen, then everythng is updated, animations are played, etc...

It happens since the last Webview Components update from the playstore, everything was working fine until then...

I'll try to find the problem, but It's been a while I've not developped any native Android App, so any help would be appreciated 😄 .

Thanks

@n00dl3
Copy link
Author

n00dl3 commented Oct 5, 2015

Ok, for the moment, I see the problem comes from these lines (195 to 197 in /src/android/plugin/google/maps/GoogleMaps.java):

if (Build.VERSION.SDK_INT >= 11){
          view.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
}

If I change view.setLayerType(View.LAYER_TYPE_SOFTWARE, null); to view.setLayerType(View.LAYER_TYPE_HARDWARE, null); everything is drawn normally on the webview. I didn't test much for the moment, but it seems to work...

@hirbod
Copy link
Contributor

hirbod commented Oct 5, 2015

I'm on Crosswalk, I don't see any issues. I don't know why Masashi implemented this, but I will change this to hardware by default, as I'm going to stop support for old android versions.

@hirbod hirbod added this to the 1.3.3 milestone Oct 5, 2015
@hirbod
Copy link
Contributor

hirbod commented Oct 6, 2015

Still, I do recommend that you should integrate crosswalk as well.. It has huge performance improvements..

@hirbod
Copy link
Contributor

hirbod commented Oct 6, 2015

Can anybody else confirm this issue? I think changing this globally will cause errors on many devices (some devices can't render transparent when webview is hardware accelerated). It will not effect Crosswalk, but maybe other Android-Versions. I need to know if anybody else has this problem. Will postpone this to version 1.3.4 or 1.3.5 until I got some more feedback.

Maybe it's time to make a breaking change and force hardware acceleration.. and for those folks stucking on black screen, they should switch to using a modern webengine like crosswalk

@hirbod hirbod modified the milestones: 1.3.4, 1.3.3 Oct 6, 2015
@roberthovhannisyan
Copy link

I also had the same issue with Sencha Touch. However it was observed only with the latest beta WebView (46.0.2490.52) version on Lollipop devices.

After changing to hardware rendering for SDK_INT >= 11 my app broke for pre-Lollipop devices. So I have enabled hardware accelleration only for SDK_INT >= 21 (Lollipop and up) and it seems to work both on older devices and new ones. But this may not be the case for other javascript frameworks and apps.

@roberthovhannisyan
Copy link

Guys,
it seems that it is a bug in the WebView and recommendation is to use hardware accelleration for >=L devices until it is fixed. You can see it here: https://plus.google.com/+JasonOgasian/posts/QTodsDrkGxj

Related bug can be followed up at http://crbug.com/520152

@n00dl3
Copy link
Author

n00dl3 commented Oct 7, 2015

That's what I thought first, but couldn't find any report/ticket about that... thank you @roberthovhannisyan ...

@hirbod
Copy link
Contributor

hirbod commented Oct 11, 2015

Incorporated L check. Let's hope it does not cause other problems.
I'll recommend everybody to include Crosswalk!

@hirbod hirbod closed this as completed Oct 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants