1

Problem is: I cannot see the content of a CrossWalk WebView using Chromes DevTools (chrome://inspect/#devices). Neither local websites (like image below) , nor external like google.com. But it is working for the standalone chrome.apk.

https://i.stack.imgur.com/nxdB6.jpg

Configuration: Chrome for Linux v. 37.0.2062.94

Crosswalk prebuild: crosswalk-webview-9.38.199.0-arm

Android 4.4.2/4.0.3

ADB Debugging working fine. Javascript console logs are working. I can see the page on my phone.

Creating the webview

public class CrosswalkActivity extends Activity {

    private final String TAG = "CrosswalkActivity";
    private XWalkView xWalkView;
    public static Context context;

      @Override
      protected void onCreate(Bundle savedInstanceState) {
          context = getApplicationContext();

        super.onCreate(savedInstanceState);
        setContentView(R.layout.xwalkview);
        xWalkView = (XWalkView) findViewById(R.id.xWalkView);
        String index = FileManager.getAssetPath(context, "index.html");
        Log.i(TAG, "Loading: " + index);

        this.configureWebView();

        xWalkView.load("file://" + index, null);
      }

    private Boolean configureWebView() {
        try{
            xWalkView.addJavascriptInterface(new JSInterface(CrosswalkActivity.context),"JSInterface");

            xWalkView.setKeepScreenOn(true);
            XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING, true);
            return true;
        }
        catch(Exception e){
            Log.e(TAG, e.getMessage());
            return false;
        }
    }
}
P. Stresow
  • 308
  • 3
  • 11
  • So, I kinda found a solution: You can inspect the code using release stable v7 or beta 8 and initialize the activity the exact same way. But still not working with canary v9. – P. Stresow Sep 09 '14 at 12:12
  • [Debug xwalkview or webview remotely](https://stackoverflow.com/a/44692358/6521116) – LF00 Jun 22 '17 at 07:05

1 Answers1

0

Updating to Chrome 38 (beta) seems to fix this.

Stable release seemed to work fine in Chrome 37, but the beta and canary releases still had this issue. Moving to Chrome 38 allows the beta release to work... I assume the folks working on Crosswalk will update their comparability chart once 38 / Crosswalk 9 goes live.

laughingpine
  • 1,039
  • 14
  • 20