I have an html page loaded in Android WebView.
I am attempting to execute a java script function using the MotionEvenAction.Down event.
Here is the code that's not working
webView.Touch += (s, e) =>
{
if (e.Event.Action == MotionEventActions.Down)
{
webView.EvaluateJavascript(((string.Format("poweSelected({0})", 3), new JavascriptResult() ));
}
};
public class JavascriptResult : Java.Lang.Object, Android.Webkit.IValueCallback
{
public string Result;
public void OnReceiveValue(Java.Lang.Object result)
{
string json = ((Java.Lang.String)result).ToString();
Result = json;
}
}
I am getting the error message -- (EvaluateJavascript has red line under it)
There is no argument given that corresponds to the required formal parameter 'resultCallback' of 'WebView.EvaluateJavascript(string, IValueCallback)'
As far as I knwo i am implemetnting the ivaluecallback interface correctly and I have found examples exactly like the that seem to be working.
Any help would be appreciated Mark
webView.EvaluateJavascript(string.Format("poweSelected({0})", 3), new JavascriptResult());