O'Reilly logo

Instant PhoneGap Social App Development by Kerri Shotts

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

Putting it all together

We've almost got a fully functional app on our hands, but we're missing a couple of critical components – the parts that load it all and start it off. For this, we'll be creating an app.js file and two HTML files under the www directory.

How to do it…

The index.html and index_android.html files are what kicks everything off by loading the necessary scripts and calling app.js.

First, index.html, which is intended for iOS is as follows:

<!DOCTYPE html> <html> <head> <title>Socializer</title> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="viewport" content="width=device-width, maximum-scale=1.0" /> <meta name="format-detection" content="telephone=no" /> <link rel="stylesheet" href="./framework/base.css" ...

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