0

Is there a way I can read the content of webview after the page is loaded in android using nativescript.

I am using this webview : https://docs.nativescript.org/angular/ui/ng-ui-widgets/web-view I find this SO: get content of webview in nativescript But here is not solution for android. It leads to How do I get the web page contents from a WebView?, but here is solution for android, but I am not sure how solve it in NS on Android.

What with: MyJavaScriptInterface with decorators or how set setWebViewClient(new WebViewClient() { in NS

Thanks

3
  • Possible duplicate of How do I get the web page contents from a WebView? Commented Sep 28, 2018 at 13:20
  • See this answer: stackoverflow.com/a/4892013/2708650 (linked from the question/answer you provided in your question). Commented Sep 28, 2018 at 13:20
  • I dont think that is duplicate, because of I find solution for nativescript. I am not sure how define and call calbacks in NS for Android. For example this: browser.addJavascriptInterface(new MyJavaScriptInterface(), "HTMLOUT"); Commented Sep 30, 2018 at 7:05

1 Answer 1

1

I already solve it and I used this NS plugin Nota NativeScript Webview Ext: https://market.nativescript.org/plugins/@nota%2Fnativescript-webview-ext

In angular project is needed import it in app.module.ts for register WebViewExt element.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.