Background: http://kenneththorman.blogspot.dk/2014/01/goal-cross-platform-android-ios-webrtc.html
Source code at Github: https://github.com/kenneththorman/appspotdemo-mono/tree/TryingToFixWebView
Basically the code gets all the way to where it is loading a html file (https://github.com/kenneththorman/appspotdemo-mono/blob/TryingToFixWebView/Appspotdemo.Mono.Droid/Assets/channel.html) into the webview (https://github.com/kenneththorman/appspotdemo-mono/blob/TryingToFixWebView/Appspotdemo.Mono.Droid/GAEChannelClient.cs#L73).
Now the webview is supposed to take over and do communication over Google App engine. Loading this script with a fixed valid token in a real desktop Chrome/Firefox browser works and I can see the network trafic/communication happening.
But when the webview is supposed to invoke native code using the (https://github.com/kenneththorman/appspotdemo-mono/blob/master/Appspotdemo.Mono.Droid/Assets/channel.html#L22) to call (https://github.com/kenneththorman/appspotdemo-mono/blob/master/Appspotdemo.Mono.Droid/GAEChannelClient.cs#L154) nothing happens.
I have even added a console.log(token) in the html file (just before https://github.com/kenneththorman/appspotdemo-mono/blob/master/Appspotdemo.Mono.Droid/Assets/channel.html#L13) (which is supposed to be logging through the Log.Debug (in the adb logcat)).
So currently I am stuck here, everything just seems to die, and nothing further in the flow seems wired up. I have tried swapping string to Java.Lang.String (as indicated at https://github.com/xamarin/monodroid-samples/blob/master/WebViewJavaScriptInterface/WebViewJavaScriptInterface/JavaScriptInterfaceActivity.cs#L56), but this did not make any difference. Obviously I am missing something here, currently I am at a loss on how to properly trace debug what I am doing wrong.
Any help on how to further debug this would be most welcome.
Regards Kenneth Thorman