Hello
Today we would discuss about Embedding Webview in Andorid based PhoneGap Application:
Before starting let us have a formal introduction about the Webview:
It is a View that displays web pages. It is a class through which we can display some online content within our application.
Follow the below mentioned steps to embed the webview in PhoneGap Application:
Fetch the commons-codec-1.6.jar using bin/create.
Create Directory into /framework and run ant jar to build the cordova jar.
Now copy the cordova jar into Android project's /libs directory.
Edit main.xml file as per the folowing:
Now implement the CordovaInterface.
Add the thread pool as follows:
@Override
public ExecutorService getThreadPool() {
return threadPool;
}
We are done with embedding the Webview, Now
- Copy the application's HTML and JavaScript to the /assets/www directory of the project.
- Copy config.xml from /framework/res/xml to the project's /res/xml folder.
0 Comment(s)