title: Loading Local HTML with WebView Xamarin Forms
body: <p>I am trying to load a local HTML page in a webview with Xamarin forms.
  I am using the basic example in the dev docs although I can get a URL to load I can't get my own HTML pages to load. This only needs to be done through Android so there is no worries about about IOS and Windows.</p>
  
  <p>The Xaml:</p>
  
  <pre><code> &lt;WebView
      x:Name="webviewjava"&gt;&lt;/WebView&gt;
  </code></pre>
  
  <p>The code behind:</p>
  
  <pre><code> public partial class javscriptExample : ContentPage
  {
      public interface IBaseUrl { string Get(); }
      public javscriptExample()
      {
          InitializeComponent();
          var source = new HtmlWebViewSource();
  
          source.BaseUrl = DependencyService.Get&lt;IBaseUrl&gt;().Get();
  
          webviewjava.Source = source;
      }
  }
  </code></pre>
  
  <p>The platform specific file (LocalFile.cs):
  Just to note this has been set as an Android asset.</p>
  
  <pre><code> [assembly: Dependency(typeof(LocalFiles))]
  namespace maptesting.Droid
  {
      public class LocalFiles: IBaseUrl
      {
          public string Get()
          {
              return "file:///android_asset/";
          }
  
      }
  }
  </code></pre>
  
  <p>and under the asset's folder there is a 'TestWebPage.html', also set as an Android asset.</p>
  
  <p>Although I dont know what the problem is I have put it through debug and the base url is coming back blank. Just to be clear im not getting a file not found, the screen is simply blank.
  Also, and Im not sure if this makes a difference. There is no syntax highlighting on 'IBaseUrl' in the LocalFiles.cs file. So I'm not sure if it can 'see' it.</p>
  
  <p>Any ideas?</p>