Catch "page finished loading" event and do something in ionic/cordova MainActivity.java with xwalk webview

Viewed 2007

I have a android app that has built using ionic and i have used xwalk web-view in it. I need to catch page finished loading event inside my MainActivity.java which extends the CordovaActivity class and then perform some action. How i can do this.

3 Answers

the process event quite similar to Android Webview try this

xWalkView.setResourceClient(new XWalkResourceClient(xWalkView) {
     @Override
      public void onLoadFinished(XWalkView view, String url) {
           super.onLoadFinished(view, url);
           // Stop your loading dialog here
      }
 });

take care

Related