So what is a pedestrian crossing and why does it bother me? Take a look at the website: https://crosswalk-project.org/
CrossWalk is an HTML5 runtime, you can use it to create HTML5 applications with native features. You can use CrossWalk to create an HTML5-only application for Android (x86 and arm architecture) and Tizen, but you can also use CrossWalk as a view in an android project.
This means that you can replace Android WebView with XWalkView and get additional features, such as:
-Webgl
-WebRTC
-WebAudio
http://software.intel.com/en-us/html5/articles/crosswalk-application-runtime
How to embed CrossWalk WebView with XWalkView in an Android application to have all this on my hybrid application (Android Native with html5 functions)
First you need to load the runtime:
https://crosswalk-project.org/#documentation/downloads
Download any version of Android (ARM).
Inside the file is all you need to get started in your html5 application.
For this test, we will need to import the xwalk-core-library project inside our Eclipse
Create a new Android project with a basic action, move it to the library and put this code in Activity:
package com.example.xwalkwithlibrary; import org.xwalk.core.XWalkView; import android.app.Activity; import android.os.Bundle; import android.view.Menu; import android.widget.LinearLayout; public class XWalkEmbedLib extends Activity { private LinearLayout commentsLayout; private XWalkView xWalkWebView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_xwalk_embed_lib); commentsLayout=(LinearLayout)findViewById(R.id.principal); xWalkWebView = new XWalkView(this, this); xWalkWebView.load("file:///android_asset/www/index.html", null); commentsLayout.addView(xWalkWebView); } @Override public boolean onCreateOptionsMenu(Menu menu) {
Put it on your main layout
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".XWalkMain" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/hello_world" /> <LinearLayout android:id="@+id/principal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/textView1" android:layout_below="@+id/textView1" android:layout_marginLeft="35dp" android:layout_marginTop="86dp" android:orientation="vertical" > </LinearLayout> </RelativeLayout>
finally, inside your /assets/www folder, enter your html file and that it