JavaScript With Xamarin

Rodrigo.7611Rodrigo.7611 USMember
edited June 2015 in Xamarin.Android

I have a web page with google maps API all cod in Javascript and jQuery. So I put my web application on Xamarim´s Android Application (webview). My web application has alerts functions too, and All alerts are working but my Map on google maps are not working.

`[Activity (Label = "IdCel", MainLauncher = true, Icon = "@drawable/icon")]
public class MainActivity : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);

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

    WebView localWebView = FindViewById<WebView>(Resource.Id.webView);
    localWebView.SetWebViewClient (new WebViewClient());
    localWebView.Settings.JavaScriptEnabled = true;


    localWebView.LoadUrl("http://URLAPPLICATON.COM");


    //localWebView.SetWebViewClient(new MonkeyWebViewClient(this));
    localWebView.SetWebChromeClient(new MonkeyWebChromeClient());
}

class MonkeyWebChromeClient : WebChromeClient {
    public override bool OnJsAlert(WebView view, string url, string message, JsResult result)
    {

        return base.OnJsAlert(view, url, message, result);
    }
}

}
`

Sign In or Register to comment.