Chapter 3. Getting Started with PhoneGap and the PhoneGap-NFC Library
PhoneGap is a development framework that allows you to build apps for iOS, Android, BlackBerry, Windows Phone 7 and 8, Symbian, and Bada all using (mostly) HTML5 and JavaScript. The folks at PhoneGap have created what is essentially a basic browser application, but with no interface. You implement the interface in HTML5 and JavaScript, then compile the app for your given platform. They’ve also developed a system for plug-ins so that developers can extend the basic browser application using native features of the various platforms. It’s handy because it means you don’t have to know the native application frameworks for the various mobile platforms in order to write applications that can run on them all.
For this book, you’ll be using PhoneGap to write apps for Android and a plug-in that allows you to access the NFC hardware that’s built into many Android phones. The code you write to listen for tags and to interact with the user will be written in JavaScript and the interface will be laid out in HTML5. The application shell is written in Java, as is the NFC plug-in, but you won’t have to change any of the shell code for the projects in this book.
Why Android?
PhoneGap-NFC also supports Windows Phone 8, BlackBerry 7, and BlackBerry 10. We chose Android for this book because it has the largest market share and the most NFC phones, and most users of the PhoneGap-NFC plug-in have been Android users. If you have a Windows ...
Get Beginning NFC now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.