ラボからJSを呼び出してリターンを表示するハイブリッドWebビューがあります...エミュレーターやSamsung Galaxy S5などの他のデバイスで動作しています...しかし、Galaxy S2とSony Xperiaでは動作しません。 ...重要ではないコードを削除しました
私のクラス:
public class TestPage : ContentPage
{
HtmlWebViewSource hwvsource = new HtmlWebViewSource();
HybridWebView hwv = new HybridWebView() { VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand };
StackLayout stack = new StackLayout { VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand };
public TestPage ()
{
this.hwv.RegisterCallback ("dataCallback", JSCallback);
//script that receives a list and call Native('dataCallback', list); ....
this.hwvsource.Html = @"
<!DOCTYPE html>
<html>
<head>
<script language=""javascript"">
Native('dataCallback', list);
</script>
</head>
</html>";
this.hwv.Source = hwvsource;
stack.Children.Add(activityIndicator);
stack.Children.Add(hwv);
stack.Children.Add(listView);
this.Content = stack;
this.hwv.LoadFinished += (object sender, EventArgs e) =>
{
this.hwv.IsVisible = false;
};
}
private void JSCallback(string result){
DisplayAlert ("callback", result, "ok");
}
}
私のアプリケーションの出力は次のとおりです。
[Trace] error opening trace file: No such file or directory (2)
[monodroid] Trying to load sgen from: /data/app-lib/app.Droid-1/libmonosgen-2.0.so
[monodroid-gc] GREF GC Threshold: 46080
[libEGL] loaded /system/lib/egl/libEGL_mali.so
[libEGL] loaded /system/lib/egl/libGLESv1_CM_mali.so
[libEGL] loaded /system/lib/egl/libGLESv2_mali.so
[] Device driver API match
[] Device driver API version: 17
[] User space API version: 17
[] mali: REVISION=Linux-r3p1-01rel1 BUILD_DATE=Tue Jul 2 15:06:24 KST 2013
[OpenGLRenderer] Enabling debug mode 0
[SpannableStringBuilder] SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
[SpannableStringBuilder] SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
[SpannableStringBuilder] SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
[SpannableStringBuilder] SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
[IInputConnectionWrapper] clearMetaKeyStates on inactive InputConnection
[IInputConnectionWrapper] getExtractedText on inactive InputConnection
[IInputConnectionWrapper] getTextBeforeCursor on inactive InputConnection
[IInputConnectionWrapper] getSelectedText on inactive InputConnection
[IInputConnectionWrapper] getTextAfterCursor on inactive InputConnection
[libc] protoent* getprotobyname(char const*)(3) is not implemented on Android
[libc] protoent* getprotobyname(char const*)(3) is not implemented on Android
[libc] protoent* getprotobyname(char const*)(3) is not implemented on Android
[Choreographer] Skipped 32 frames! The application may be doing too much work on its main thread.
[dalvikvm-heap] Grow heap (frag case) to 11.443MB for 5760016-byte allocation
Location ViewModel Messaging
*****Here*****
[TilesManager] Starting TG #0, 0x528e53f8
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[PicturePileLayerContent] Warning: painting PicturePile without content!
[webcore] skip viewSizeChanged as w is 0
私が言ったように、他のデバイスでは正常に動作しますが、S2
何が考えられますか?