コード例 #1
0
 /// <summary>
 /// Asynchronously open an AppEngine channel. </summary>
 public GAEChannelClient(Activity activity, string token, MessageHandler handler)
 {
     webView = new WebView(activity);
     webView.Settings.JavaScriptEnabled = true;
     webView.SetWebChromeClient(new WebChromeClientAnonymousInnerClassHelper(this)); // Purely for debugging.
     webView.SetWebViewClient(new WebViewClientAnonymousInnerClassHelper(this)); // Purely for debugging.
     Log.Debug(TAG,string.Format("token:{0}", token));
     _androidMessageHandler = new androidMessageHandler(activity, handler, token);
     webView.AddJavascriptInterface(_androidMessageHandler, "androidMessageHandler");
     webView.LoadUrl("file:///android_asset/channel.html");
 }
コード例 #2
0
 /// <summary>
 /// Asynchronously open an AppEngine channel. </summary>
 public GAEChannelClient(Activity activity, string token, MessageHandler handler)
 {
     webView = new WebView(activity);
     webView.Settings.JavaScriptEnabled = true;
     webView.SetWebChromeClient(new WebChromeClientAnonymousInnerClassHelper(this));         // Purely for debugging.
     webView.SetWebViewClient(new WebViewClientAnonymousInnerClassHelper(this));             // Purely for debugging.
     Log.Debug(TAG, string.Format("token:{0}", token));
     _androidMessageHandler = new androidMessageHandler(activity, handler, token);
     webView.AddJavascriptInterface(_androidMessageHandler, "androidMessageHandler");
     webView.LoadUrl("file:///android_asset/channel.html");
 }