Preface

This book is intended for an audience interested in building powerful HTML applications by bridging the gap between JavaScript and the device’s native APIs. This book lays down a solid foundation for the architectural aspects of hybrid applications on Android, covering internals of WebKit and Android as needed. As part of this book, we have not only introduced some of the key web technologies used for building hybrid applications, but we have also focused on how they can be integrated into the Android build system. We will also be discussing some important aspects of hybrid applications from a security perspective.

To tie it all together, we are also introducing the Karura Framework. The purpose of this framework is two pronged. First, we want to simplify the overall process of integrating native components in hybrid applications. Second, we want to present a lean framework that is easy to read and write for. The framework itself is plug-in–based and can be extended and cut down based on the requirements of individual applications. We have released the framework under a dual license scheme. You can easily import Karura Framework into your project using Eclipse or the command line and start developing for it.

To reiterate, this book has been written with the purpose of allowing our readers to understand the following:

  • What is a hybrid application?
  • What goes under the hood in Android in the case of hybrid applications?
  • What does the architecture of a hybrid application look like?
  • What are some key tools and technologies for building next generation hybrid apps?
  • What are the security considerations for hybrid applications?
  • How do I publish an application in Google Play and Amazon App Store?

Conventions Used in This Book

The following typographical conventions are used in this book:

Italic
Indicates new terms, URLs, email addresses, filenames, and file extensions.
Constant width
Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.
Constant width bold
Shows commands or other text that should be typed literally by the user.
Constant width italic
Shows text that should be replaced with user-supplied values or by values determined by context.

Tip

This icon signifies a tip, suggestion, or general note.

Warning

This icon indicates a warning or caution.

Using Code Examples

This book’s accompanying files, libraries, and required frameworks (such as Karura) are hosted on GitHub. You can view them online or download them from http://github.com/karuradev.

We will continue to maintain the Karura Framework and will provide various examples of Hybrid Apps on GitHub as well. Should you have any questions or inquires about Karura Framework, please contact us at .

This book is here to help you get your job done. In general, if this book includes code examples, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.

We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “Building Hybrid Android Apps with Java and JavaScript by Nizamettin Gok and Nitin Khanna (O’Reilly). Copyright 2013 Nizamettin Gok and Nitin Khanna, 978-1-449-36191-4.”

If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at .

Safari® Books Online

Safari Books Online is an on-demand digital library that delivers expert content in both book and video form from the world’s leading authors in technology and business.

Technology professionals, software developers, web designers, and business and creative professionals use Safari Books Online as their primary resource for research, problem solving, learning, and certification training.

Safari Books Online offers a range of product mixes and pricing programs for organizations, government agencies, and individuals. Subscribers have access to thousands of books, training videos, and prepublication manuscripts in one fully searchable database from publishers like O’Reilly Media, Prentice Hall Professional, Addison-Wesley Professional, Microsoft Press, Sams, Que, Peachpit Press, Focal Press, Cisco Press, John Wiley & Sons, Syngress, Morgan Kaufmann, IBM Redbooks, Packt, Adobe Press, FT Press, Apress, Manning, New Riders, McGraw-Hill, Jones & Bartlett, Course Technology, and dozens more. For more information about Safari Books Online, please visit us online.

How to Contact Us

Please address comments and questions concerning this book to the publisher:

O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the United States or Canada)
707-829-0515 (international or local)
707-829-0104 (fax)

We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at http://oreil.ly/hybrid-android-apps-java-javascript.

To comment or ask technical questions about this book, send email to .

For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.

Find us on Facebook: http://facebook.com/oreilly

Follow us on Twitter: http://twitter.com/oreillymedia

Watch us on YouTube: http://www.youtube.com/oreillymedia

Acknowledgments

Nizamettin Gok

I would like to thank my colleague Sriraman Krishnamoorthy for his valuable input in this book. He is an excellent architect in the mobile space. I also would like to thank the passionate and talented technical reviewer Mauvis Ledford who helped review and correct this book.

It has been an amazing journey for me to complete this book. During this journey, I quickly realized that writing a book is not only a way of teaching someone, but also learning the correctness of what I have learned. For this reason, it is my ultimate pleasure to give back to the developer community.

Nitin Khanna

We would like to thank Mavious Ledford for reviewing the book. We would also like to thank our families, without their support and patience this book would not have been possible.

About the Technical Reviewer

Mauvis Ledford is a full-stack developer, speaker, and technical lead specializing in front-end technologies (CSS3, JavaScript, and HTML5) and cloud computing. He has worked and consulted for start-ups and companies large and small from Disney Mobile to Skype. He currently runs his own software company Brainswap focused on productivity applications.

Get Building Hybrid Android Apps with Java and JavaScript 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.