-1

I am building an hybrid android app using crosswalk webview as my app needs webrtc support. I have a query in my mind as cordova webview is not stable over android versions and also do not have webrtc support therefore we add crosswalk plugin ,then why not use use crosswalk standalone . In this case we will also have some control over native features of android. THen what is the advantage of using cordova + crosswalk over using crosswalk webview alone.

SwagDevelopers
  • 109
  • 2
  • 12

3 Answers3

0

Cordova is a complete HTML5 development framework with plenty of plugins that can help you to use Web API to do some works that only native code can do originally. By default, Cordova is using the system WebView on Android. In contrast, Crosswalk is a HTML5 engine with the main purpose of being more powerful WebView. If you're developing pure web application, Cordova is the recommended way and you can replace the system WebView with Crosswalk by installing the Crosswalk plugin. But if you already have lots of native Java code and want to build a hybrid application, it's more convenience to use the embedding API of Crosswalk directly.

lincsoon
  • 401
  • 3
  • 3
0

If you do that you are basically repackaging a website into an app. I don't know about Android, but Apple will not approve your app for sure, which defeats the purpose of using a hybrid framework anyway.

Chisko
  • 3,092
  • 6
  • 27
  • 45
  • that is of course unless you want to recreate the wheel and provide a UX that sticks to each OS guidelines – Chisko Jun 24 '16 at 05:55
0

You can do it, I have and there are some things you need to be aware of. You will run into errors, the crosswalk community is way smaller, and therefore some solutions to your errors will be harder to find in the usual places.

Then you will have to make some decisions (space-wise). In crosswalk you have Shared and Embedded modes.

https://crosswalk-project.org/documentation/shared_mode.html

You will run into some trouble with embedded mode and testing with x86 and 64-bit phones. (You need to change your gradle dependency to 64-bit). With proguard and architecture splits you can package your app to a "reasonable" size ( under 40mb ), depending on the contents of your assets folder. (Embedded mode)

As a java developer, I don't see the advantage of using cordova + crosswalk in most projects, but I do wish that the documentation available for crosswalk would be updated more frequently.

To get started, add this to your gradle file:

repositories {
    mavenLocal()
    maven {
        url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2'
    }
}

dependencies {
    compile 'org.xwalk:xwalk_core_library:20.50.533.12'
}
ruifn
  • 140
  • 8