Skip to content
This repository has been archived by the owner on Mar 30, 2020. It is now read-only.

KevinGliewe/Xamarin.Android.XWalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xamarin.Android Crosswalk Binding

As of February 2017, Crosswalk is not being developed anymore. The last Crosswalk relase is 23.

An example Project to embed a Crosswalk View into your Android App.

Getting Started

The XWalk.Binding contains the Bindings to the Android Library and the Library (AAR) itself. If you want to use it, you can just copy it into your Project.

Usage

An Example how to use the Org.Xwalk.Core.XWalkView:

using Android.App;
using Android.Widget;
using Android.OS;
using Android.Views;

namespace XWalk
{
    [Activity(Label = "XWalk", MainLauncher = true)]
    public class MainActivity : Org.Xwalk.Core.XWalkActivity
    {
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);
        }

        protected override void OnXWalkReady()
        {
			var view = new RelativeLayout(this.BaseContext);
			var mp = ViewGroup.LayoutParams.MatchParent;
			var xwv = new Org.Xwalk.Core.XWalkView(this.BaseContext, this);
			view.AddView(xwv);
			this.AddContentView(view, new ViewGroup.LayoutParams(mp, mp));

			xwv.Load("https://jeromeetienne.github.io/AR.js/three.js/examples/mobile-performance.html", null);
        }
    }
}

This embeds a Crosswalk View into an Activity and navigates to the AR.JS example which uses the WebRTC API to access the Camera. So you should add the android.permission.CAMERA permission to your AndroidManifest.xml file to run this example.

Permissions

According to the Crosswalk Documentation, the minimal Permissions required to run are:

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

If you want to access Hardware components, you have to add the permission accordingly to your AndroidManifest.xml file.

Authors

Inspiration

I took a lot of inspiration from the Xamarin.CrossWalk Project from kYann. Thank you for your Work.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

An example Project to embed a Crosswalk View into your Android App.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages