Seeking Advice on Embedding a Custom WebView Implementation in Android App #1836
Replies: 4 comments 13 replies
-
|
wow, what a request! extremely interesting. give me time to regroup and answer you properly. |
Beta Was this translation helpful? Give feedback.
-
|
I haven't forgotten about you, but your question needed some technical insight from me before I answered it. I was not aware of Crosswalk so I wanted to check what it was. too bad it is based on chromium 53, but I think there may be suggestions in the code on how to proceed. your goal is something I would like to do in the future, I really like challenges, but I have other priorities first. I can tell you how I would deal with the problem,
First of all, understand how AwShellActivity.java works, being the one that comes closest to integrating a webview into a project. I would start with that, however you should have basic knowledge of how to compile chromium and especially gn. or maybe you can ask Soren Stoutner, he was planning to do it https://redmine.stoutner.com/issues/86 although I have never seen any updates on the issue
I can't know without seeing what you've done, but it looks to me like a hack and as such it could break easily. |
Beta Was this translation helpful? Give feedback.
-
|
@nonameShijian I found https://github.com/wuruxu/crwebview/tree/main |
Beta Was this translation helpful? Give feedback.
-
|
Hi is there any new update about this? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I'm currently working on an Android app and wish to embed a custom WebView instead of relying on the system WebView. Given that Crosswalk is no longer being updated, I decided to take a different approach. I extracted the dex file from webview.apk, converted it into a jar file, and included it in my project. My intention was to hook into the WebView implementation at runtime by specifying my app as the WebView provider. However, this led to the following error:
"Rejecting class com.android.webview.chromium.WebViewChromiumFactoryProviderForT that attempts to sub-type erroneous class com.android.webview.chromium.WebViewChromiumFactoryProvider in /data/app/xxx/xxx/base.apk"
It seems that the issue might be related to not being able to access internal classes such as WebViewFactory within my app. Is there a recommended or correct approach to embedding a WebView implementation directly within an Android app? Any guidance or suggestions would be greatly appreciated.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions