Book Image

PhoneGap By Example

Book Image

PhoneGap By Example

Overview of this book

Table of Contents (17 chapters)
PhoneGap By Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

PhoneGap is an open source framework that is responsible for creating mobile applications. The framework created by Nitobi Software. In 2011, Adobe purchased PhoneGap. You may have heard of Cordova. So, PhoneGap and Cordova are almost the same thing. Let's take a look at this in detail.

What this book covers

Chapter 1, Installing and Configuring PhoneGap, talks about the download and installation of the PhoneGap framework. It also examines the ins and outs of a basic PhoneGap application. In this chapter, you will learn how to perform basic manipulations with plugins and how to select the mobile web framework.

Chapter 2, Setting Up a Project Structure with Sencha Touch, explains the main elements of the framework. It also covers how to set maintainable, scalable, and testable project structures. It also teaches you how to follow the mobile-first approach and use CommonJS practices.

Chapter 3, Easy Work with Device – Your First PhoneGap Application "Travelly", focuses on the application development tutorials with PhoneGap to build an application for travelers. You will learn how to access a camera to capture photo and how to work with the filesystem.

Chapter 4, Integrating the Travelly Application with Custom Service, adds new features to your applications, which allows you to sync data between the server and mobile device. You will learn how to build a custom web service with Node.js and integrate it with your PhoneGap application.

Chapter 5, Crazy Bubbles - Your First HTML5 Mobile Game, demonstrates the potential in building a HTML5 mobile game using the HTML5 Canvas and its 2D context. It teaches you how to build HTML5 animations, how to handle mobile gestures, and how to deal with performance issues.

Chapter 6, Share Your Crazy Bubbles Game Result on Social Networks, continues to provide information about the project from the previous chapter and adds the final touches to the game, including integration with the Facebook, Twitter.

Chapter 7, Building a Real-time Communication Application – Pumpidu, introduces all the popular WebRTC technologies and tells you how to build an audio/video chat with PhoneGap. It teaches you how to establish a video call among several mobile devices.

Chapter 8, Building "Imaginary" – An Application with Instagram-like Image Filters, shows you how to use the PhoneGap plugin in order to store pictures on the device. It also shows you how to implement Instagram-like picture filters.

Chapter 9, Testing the PhoneGap Application, teaches you how to use common approaches to test PhoneGap applications. You will learn how to use the key testing features on a real device and on a simulator.

Chapter 10, Releasing and Maintaining the Application, takes you through the process of how to release the application to different application markets, such as the App Store and Google Play. You will learn how to prepare the bundle for beta testing.

What you need for this book

In order to run the applications developed in this book, you will need Xcode and a Mac to run the PhoneGap application on iOS devices and Eclipse to run the PhoneGap application on Android devices. In order to publish an application to the App Store or Google Play, you will need accounts for these stores. I want you to pay attention to the fact that the developer account for publication in the App Store is a paid subscription. Also, we will be referring to the official PhoneGap documentation portal (http://docs.phonegap.com/) throughout .

Who this book is for

If you believe that mobile applications are the future of the information age and think that development should be quick and not a hustle, then this book is for you. You may be familiar with the fundamentals of JavaScript and HTML and have a basic understanding of cross-platform tools, but have no knowledge of PhoneGap. You may be interested in technologies or tools, such as Node.js, AngularJS, Grunt, Gulp, RequireJS, and so on. You will be able to build a real cross-platform mobile application in a short period of time and use the paradigm to build future projects. Building applications in this way will help you to shorten the release time.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "At the end of the install, you will be prompted to make sure that /usr/local/bin is in your path."

A block of code is set as follows:

Ext.application({
    name: 'Travelly',
    views: [ 'Main' ],
    // ...
    launch: function() {
        Ext.fly('appLoadingIndicator').destroy();
        Ext.Viewport.add(Ext.create('Travelly.view.Main'));
    }
    // ...
});

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

xtype: 'button',
text: 'My button',
id: 'myButton',
handler: function() {
   alert('My button has been clicked!');
}

Any command-line input or output is written as follows:

$ sencha generate model Picture id:int,url:string,title:string,lon:string,lat:string

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Once the installation is complete, you receive a Successful Installation message."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.