PhoneGap Essentials
eBook - ePub

PhoneGap Essentials

Ivan Turkovic

Compartir libro
  1. 178 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

PhoneGap Essentials

Ivan Turkovic

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

Use PhoneGap to build cross-platform mobile applications quickly and efficiently

About This Book

  • Build native mobile phone applications with HTML5, JavaScript, and CSS
  • Incorporate smartphone capabilities such as GPS, camera, accelerometer, and more into your apps for any mobile platform
  • Use Cordova view to embed PhoneGap into native applications to either transit smoothly to PhoneGap or incorporate PhoneGap functionalities

Who This Book Is For

If you are a mobile application developer in iOS or Android, or a web application developer who wants to learn how to make cross-platform mobile applications using PhoneGap, this book is perfect for you. To make the most of this book, it will be helpful if you have prior knowledge of HTML5, CSS, and JavaScript.

What You Will Learn

  • Get to grips with the fundamentals of PhoneGap to get started
  • Set up a development environment for Linux, Mac OS, and Windows
  • Use Cordova CLI, workflows, and Plugman Plugin manager to create mobile applications efficiently
  • Understand the development workflow to create native cross-platform mobile applications
  • Embed plugin support to transition to PhoneGap or use it to enhance existing applications
  • Improve your mobile development knowledge using object-oriented programming (OOP), reusable components, and AJAX closures
  • Be empowered to build your own mobile apps quickly with ease
  • Discover tips and tricks to make app development fun and easy

In Detail

PhoneGap is an open source framework that allows you to quickly build cross-platform mobile apps using HTML5, JavaScript, and CSS. PhoneGap Build is a cloud service that allows you to quickly develop and compile mobile applications without SDKs, compilers, and hardware. PhoneGap allows you to use its existing plugins or create new ones, as per your requirements, to enhance your mobile applications.

Starting by installing PhoneGap, you'll develop an app that uses various device capabilities through different plugins and learn how to build an app in the cloud with PhoneGap's Build service.

You'll discover how to use PhoneGap to create an application view, along with how to use a camera, geolocation, and other device capabilities to create engaging apps. Next, you'll augment applications with PhoneGap's plugins using minimalistic code. You'll explore the app preparation process to deploy your app to the app store.

By the end of the book, you'll have also learned how to apply hybrid mobile UIs that will work across different platforms and different screen sizes for better user experience.

Style and approach

This is an example-based, fast-paced guide that covers the fundamentals of creating cross-platform mobile applications with PhoneGap.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es PhoneGap Essentials un PDF/ePUB en línea?
Sí, puedes acceder a PhoneGap Essentials de Ivan Turkovic en formato PDF o ePUB, así como a otros libros populares de Informatik y Programmierung von Mobilgeräten. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2015
ISBN
9781785284687

PhoneGap Essentials


Table of Contents

PhoneGap Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Get up and Running with PhoneGap
A brief history
What is PhoneGap?
Where can it be used?
What PhoneGap is not
Competition
PhoneGap or Cordova?
Setting up a local development environment
Mac OS
Linux
Windows
Summary
2. Mobile Platform Support
Supported platforms
Supported features by platform
Support for development
PhoneGap Build
Platform support
Using PhoneGap Build
The PhoneGap Developer App
How to use it
Summary
3. Command-line Interface
Introduction to a command-line interface
PhoneGap CLI versus Cordova CLI
Installing the PhoneGap CLI
Creating a new project
Creating a Hello project
Creating a new project
Managing platforms
Adding a platform
Listing platforms
Removing a platform
Keeping platforms up-to-date
Application description
Creating a project from a template
Managing the project
Application preview
Preparing an application
Compiling an application
Building an application
Running an application
Emulating an application
Using PhoneGap Build
Authentication
Preparing the application
Building the application
Summary
4. Plugin Support
Introducing plugins
What is a plugin?
Support for different mobile platforms
Installing plugins
Command-line Interface
Finding plugins
Adding plugins
Listing plugins
Removing plugins
Plugman
Installing Plugman
Searching for plugins
Installing plugins
Removing plugins
npm
Plugins
Battery Status
Camera
Contacts
Device
The Device Motion plugin
Device position orientation
Dialogs
FileSystem
File Transfer
Geolocation
Globalization
InAppBrowser
Media
Media Capture
Network Information
Splashscreen
Vibration
StatusBar
Summary
5. First PhoneGap Application
Starting a new application
Creating a new application
Setting up the initial code
Project folder structure
Core PhoneGap events
The deviceready event
The pause event
The resume event
Essential plugins
The Device plugin
The Network Information plugin
The StatusBar plugin
The Dialogs plugin
Summary
6. Accessing Native APIs
Native APIs
Device status plugins
Motion sensing plugins
Media functionality plugins
Notification plugins
The Battery Status plugin
The Battery Status event
The Low Battery event
The Critical Battery event
The Device Motion plugin
The getCurrentAcceleration method
watchAcceleration
clearWatch
The Device Orientation plugin
getCurrentHeading
watchHeading
clearWatch
The Geolocation plugin
getCurrentPosition
watchPosition
clearWatch
The Position object
The Coordinates object
The Vibration plugin
Vibrate
Standard vibrate
Vibrating with a pattern (Android and Windows only)
Cancelling the vibration (not supported in iOS)
Summary
7. Accessing Media Content
Introducing multimedia
Media
File management
Contacts
File Transfer
The FileTransfer object
The FileUploadResult object
Upload
Download
Abort
Contacts
Contact
The Contact object
ContactName
ContactField
ContactAddress
ContactOrganization
The create method
Find
pickContact
Camera
getPicture
cleanup
InAppBrowser
The InAppBrowser object
The InAppBrowserEvent object
Open
Summary
8. Application Development Workflow
An introduction to a development workflow
Web project development
Native platform development
Best practices
Use local assets for the UI
Network access for data
Non-blocking UI
CSS animations
Click events
Performance
Optimize the image assets
Offline status
Load only what you need
Transparency
JSHint
Testing
Debugging
Desktop browsers
The PhoneGap emulator
Weinre
iOS Debugging
Xcode
Safari Remote Debugging
Android debugging
User interface
Summary
Index

PhoneGap Essentials

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: September 2015
Production reference: 1310815
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78528-468-7
www.packtpub.com

Credits

Author
Ivan Turkovic
Reviewers
Johnathan Iannotti
Yousuf Qureshi
Anthony Rumsey
Kasper Souren
Tomasz Trejderowski
Commissioning Editor
Neil Alexander
Acquisition Editor
Subho Gupta
Content Development Editor
Manasi Pandire
Technical Editor
Bharat Patil
Copy Editors
Stephen Copestake
Tasneem Fatehi
Project Coordinator
Suzann...

Índice