O'Reilly logo

WordPress Mobile Applications with PhoneGap by Yuxian Eugene Liang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Extending our PhoneGap app

In this section, we will truly see the power of jQuery Mobile and PhoneGap. Now, in order to use the code that we have made in the previous section, all we have to do is port it over to our PhoneGap application:

  1. Go to your Eclipse editor and open up the main Java file. If you have been following the instructions up to this point, the name of the file should be HelloWorldMainActivity.java. Change the super.loadUrl("file://android_asset/www/phonegap.html") statement in the code file to super.loadUrl("file://android_asset/www/chapter5.html").
  2. Next, create a new file called chapter5.html in your assets/www folder. Copy and paste the code from app_advanced.html into chapter5.html. Save the file.
  3. Now, there is one important thing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required