문제

What is the difference b/w these two methods

webView.loadUrl("file:///android_asset/www/index.html");

and super.loadUrl("file:///android_asset/www/index.html");

When i am using second one my application running well but when i am using first one it looks either blank or in some cases a alert dialog appear said about plugins...

I want to make application on Phonegap, I exactly want to know that which one is better approach for it.

When i am using webview.loadurl() and call addJavascriptInterface(), In that case the functions are written into the HTML file under the <script> tag are not invoke on click of any button(defined in HTML),

Please help me, i am stuck, Thanks in advance...

도움이 되었습니까?

해결책

In your Phonegap project the Main Activity .java class contains extends DroidGap

so in this case

super.loadUrl("file:///android_asset/www/index.html");

is useful because Webview of DroidGap capture this url.

And in your Android app your activity .java class contains extends Activity so

webView.loadUrl("file:///android_asset/www/index.html");

The Webview specified by you in your activity class will capture the Url .

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top