user2364818
user2364818

Reputation: 13

Web View Without the View?

I want my app to interact with my HTML page. Using a scheme and intent filter I can catch links but the problem is how to send things back to the browser. For example if I want to use my JS function I can use a WebView and call loadUrl("javascript:MyJSFunction(..) Can I do it with out the view part of the WebView?

Upvotes: 0

Views: 687

Answers (1)

Arun C
Arun C

Reputation: 9035

Add a WebView and set it visibility to View.GONE

Like

    WebView webView=new WebView(this);
    webView.setVisibility(View.GONE);

then

       webView.loadUrl("javascript:MyJSFunction(..)

Upvotes: 3

Related Questions