Thursday 15 May 2014

android - How to load url of phonegap in native webview not in cordova webview? -



android - How to load url of phonegap in native webview not in cordova webview? -

i trying load url within custom webview

webview.xml-

<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/relativeview" android:layout_width="fill_parent" android:layout_height="fill_parent" > <scrollview android:id="@+id/scrollview" android:layout_width="fill_parent" android:layout_height="fill_parent" android:scrollbars="none"> <webview android:id="@+id/webview" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </scrollview> </relativelayout>

and here classfile

public class appdev extends cordovaactivity implements wlinitwebframeworklistener { private webview webview; @override public void oncreate(bundle savedinstancestate){ super.oncreate(savedinstancestate); wl.createinstance(this); wl.getinstance().showsplashscreen(this); wl.getinstance().initializewebframework(getapplicationcontext(), this); webview = (webview)findviewbyid(r.id.webview); } public void oninitwebframeworkcomplete(wlinitwebframeworkresult result){ if (result.getstatuscode() == wlinitwebframeworkresult.success) { // super.loadurl(wl.getinstance().getmainhtmlfilepath());// webview.loadurl(wl.getinstance().getmainhtmlfilepath()); } else { handlewebframeworkinitfailure(result); }}

loading url in webview producing next error-

com.worklight.common.logger$uncaughtexceptionhandler java.lang.nullpointerexception com.worklight.common.logger$uncaughtexceptionhandler(com.appdev.appdev.oninitwebframeworkco mplete(appdev.java:49)

is there anyway load url in custom webview not in cordova? help :(

did seek next integrating server generated pages in hybrid applications training module , sample application?

the module explains how bring webview , display external website in (and homecoming application's webview).

android cordova webview worklight

No comments:

Post a Comment