Aardwolf, 145
about:app-manager
, Firefox, 206
Accelerometer API, 259–260, 335–337
clearWatch
method, 335
getCurrentAcceleration
method, 335–337
watchAcceleration
method, 335, 337
access
property, config.xml, 132, 134
ACTION_GET_CARRIER_NAME
constant, CarrierPlugin
, 416
ACTION_GET_COUNTRY_CODE
constant, CarrierPlugin
, 416
Active Scheme button, Xcode in iOS, 225
ADB (Android Debug Bridge) Helper, 206
Add Packaged App item, Firefox OS simulator, 207–208
AddEventListener
Cordova events, 333
Cordova initialization, 30, 32, 34
debugging with, 137
generated web application files, 43
monitoring events, 333
working with Cordova APIs, 35, 37
Additional Tools window, Windows Phone emulator, 259–261
Address book. See Contacts API
adduser
command, Plugman, 111
ADM (Android Device Monitor) utility, 191–192
Administrators
creating symbolic links, 82
Windows App Store setup, 251
Adobe
Brackets. See Brackets web code editor
Dreamweaver, 16
PhoneGap. See PhoneGap
Topcoat. See Topcoat UI framework
Android SDK installation, 59–65
Android Studio vs., 57, 169–170
build tools used with, 494
editing application content files, 179–180
importing Cordova project, 180–185
monitoring applications outside of, 191–192
overview of, 178
running Cordova applications, 185–191
ADT_HOME
environment variable, Visual Studio, 268–269
alert()
method
Cordova API errors with onError
vs., 322
Cordova initialization with, 32–33
debugging with Firefox OS simulator, 217–218
testing applications in Xcode, 227
unavailable in universal Windows apps, 33, 247–248
as visual notification, 328–329
Alerts, Windows security, 101–102
Anatomy
of default PhoneGap application, 310–312
Anatomy of Cordova application
overview of, 27
Android
adding platform to existing project, 83–85
content refresh via Hydration, 285
creating application icons, 387–389
creating Cordova native plugin, 410–414
creating native plugins, 414–423
creating Plugman project, 106–108
deploying PhoneGap Build applications, 302–305
executing applications with run
, 99–100
Hello World using Bootstrap on, 455
Hello World using jQuery Mobile on, 447–448
Hello World using OpenUI5 on, 459
Hello World using TopCoat on, 442
InAppBrowser benefits, 362
PhoneGap Developer running on, 150
platform support with Plugman, 118
Plugin Development Guide, 397
testing application on emulator, 389–392
android
command, 170
Android Debug Bridge (ADB) Helper, 206
Android Developer Tools. See ADT (Android Developer Tools)
Android development with Cordova
ADT vs. Android Studio, 169–170
monitoring application outside ADT IDE, 191–192
overview of, 169
testing on physical device, 192–195
using ADT IDE. See ADT IDE
using Android Virtual Device Manager, 172–177
using Chrome debugging tools, 195–202
Android Device Monitor (ADM) utility, 191–192
Android SDK
Firefox App Manager and, 206
LogCat, 138
managing Android Virtual Devices, 173–177
managing with Android SDK Manager, 170–172
Android SDK Manager (ASM), 170–172
Android Studio (beta)
Android SDK installation and, 59–60
configuring Android SDK and, 60–62
installer for, 60
migration from ADT to, xvii–xviii
Android Virtual Devices. See AVDs (Android Virtual Devices)
Ant
adding Android to existing project, 83–85
build tools used with ADT, 494
Apache Cordova 3 Programming
, xvi–xviii, 74, 169, 220, 373, 469
Apache Cordova API Cookbook
, xv–xviii, 7, 22, 154, 229, 317, 335, 353, 371, 439, 446
Apache Ripple. See Ripple Emulator (Apache Ripple)
APIs, Cordova
loading library in initialization, 32
App Manager. See Firefox App Manager
AppGyver, productivity enhancement tool, 486–489
app.js
file, Ionic framework, 463–464
Apple iOS Developer Program, 62
Application development, end-to-end
about, 373
adding mobile device platforms, 374–375
creating compass watch, 381–382
creating new Cordova project, 374
preparing for debugging, 380–381
updating config,xml file, 376–377
writing to console, 383
Apps List, Firefox App Manager, 214
apt-get update
, 236
Aptana Studio, 16
editing HTML and JavaScript source code, 473
keeping web content files open when working in Cordova, 126
using Aptana IDE for editing JavaScript code, 469
Arguments
bash script, 161
Windows command file, 158
ARM-based Android emulators, 172
Arrays, contact
object, 353
ASM (Android SDK Manager), 170–172
Attributes
Cordova initialization and viewport, 31
responsive design with CSS, 45–50
author
property, config.xml, 132, 134
Automation. See Cordova CLI, automating
Availability, Cordova API, 320–321
Available Packages window, WebStorm, 482–483
Available Software Wizard
AVDs (Android Virtual Devices)
creating/managing system emulator definitions, 191
defined, 172
Intel-based/ARM-based emulators for, 172–173
selecting at runtime, 190
viewing device emulator settings, 174–175
wiping existing user data, 175
BackgroundColor
preference, config.xml, 133
backgroundColorByName()
method, StatusBar, 370
Bash scripts, automating project setup, 161
Basic Settings, PhoneGap Build, 291–293
Batch files, automating tasks, 158
Battery Status plugin, 333–334
Beautify extension, Brackets, 474–475
beep
method, hardware notifications, 327
Bower, Joe, 72
Auto Close Braces option, 474
coding Cordova, 16
editing web applications, 223
keeping web content files open when working in Cordova, 126
PhoneGap plug-in, 479
Breakpoints
debugging Ubuntu applications, 240–241
debugging with Visual Studio, 262–263
Firefox App Manager Debugger, 215–216
in JavaScript code with GapDebug, 154–155
remotely debugging iOS with Safari, 231–232
Browser
testing applications in desktop, 103
weinre debug server and client, 140–141
window size in responsive design, 45–50
build
command, Cordova CLI, 98
Build process
PhoneGap, 3
Build tools
overview of, 494
buttonLabel
, 329
Buttons
adding to application’s main page, 34
Help, 206
physical menu vs. virtual, 332–333
Web Inspector JavaScript debugger, 231–232
C#, Windows Phone 8 on Cordova, 245
Callback functions
browser window events, 364
camera, 345
Cordova APIs, 8
Cordova initialization, 33
Cordova native plugin, 413
Cordova native plugins, 412–413
execute scripts, 364
iOS plugin, 426
Media API, 358
mol.js file for plugins, 402–403
onSuccess function, 366
callback
parameter
alert()
method, 329
prompt()
method, 330
callbackContext.success()
method, Android plugin, 416
cameraOptions
, 343
Discard button, 341
Take Photo button, 341
targetHeight
property, 343, 345
targetWidth
property, 343, 345
Camera plugin, 340
carrier.java
file, CarrierPlugin
class, 414–416
carrierName
property, iOS plugin, 426
Cascading style sheets. See CSS (cascading style sheets)
cd
command, changing directories for new project, 77–82
CDN (content delivery network)-hosted files, 448
cdva-hooks
, 166
CEF (Chromium Embedded Framework), Brackets, 473
charset
tag, Cordova initialization, 31
ChildBrowser plugin, 360
Elements pane, 199
Inspect Devices Application List, 197
Chromium Embedded Framework (CEF), Brackets, 473
Click chroot, Ubuntu, 242
configuring proxy settings, 72–74
Cordova. See Cordova CLI
enabling verbose output, 74–75
PhoneGap. See PhoneGap CLI
Plugman. See Plugman CLI
close
method, InAppBrowser, 363
.cmd
extension, Windows, 158
Code
adding style to project, 378–380
downloading for projects in this book, 30
structuring application, 38–41, 380
third-party validation tools, 469–473
overview of, 473
Collaboration, PhoneGap Build, 285, 292
Color, StatusBar, 370
Command lines. See CLIs (command-lines)
Command summary
Cordova CLI, 76
Plugman CLI, 105
Compass API
clearHeading
method, 338
getCurrentHeading
method, 338
heading
object, 338
onSuccess
function, 382
Compass app
creating application icons, 387–389
creating compass watch, 381–383
with jQuery mobile look, 380
preparing application, 376–378
rotating compass graphic, 378–379
compile
command, Cordova CLI, 76, 97
Composer application, AppGyver, 486
ConfiGAP
Advanced Settings tab, 296–297
General Settings tab, 296
Permissions tab, 298
config.json file, CLI configuration, 79
config.xml file
Cordova application options, 131–134
creating new Cordova project, 79
debugging with Firefox OS simulator, 209
PhoneGap application anatomy, 310–312
PhoneGap Build configuration, 294–301
PhoneGap Build plugins added via, 301–302
uninstalling plugins, 104
updating information in new application, 376–377
Visual Studio tools for Cordova, 271–272
confirm()
method, visual notifications, 329–330
Console
debugging by writing to, 136–139, 226, 383
Firefox App Manager, 214
PhoneGap Server, 151
viewing output in GapDebug, 155–156
viewing output in weinre Debug Client, 145
based on W3C Contacts API, 352
contact properties, 353
multiple
property, 355
options
object, 355
phone numbers, 356
populating contact
object, 354
Container, designing web applications for, 13–15
Content
changing with weinre Debug Client, 142–145
editing Cordova application, 179–180
GapDebug highlighting HTML, 154
loading with InAppBrowser, 360–363
refreshing in PhoneGap Build, 285
content delivery network (CDN)-hostedfiles, 448
content
property, config.xml, 132, 134
coolMethod
, Javascript-only plugin, 401–402
--copy-from
switch, project create
, 81–82
designing for container, 13–15
getting support, 20
hybrid application frameworks, 25
license for, 13
user interface capabilities, 10–12
Cordova APIs
checking availability, 320–321
hardware APIs. See Hardware APIs
overview of, 317
setting application permissions, 322–324
Splashscreen API, 367
Android and. See ADT (Android Developer Tools)
building applications with, 18
command summary, 76
cordova.js file and, 32
creating new Cordova project, 77–82, 124
creating Plugman project, 105–106
displaying project information, 95–96
executing Cordova applications, 98–103
generated web application files, 41–44
help, 77
listing platforms, 85
listing plugins, 90
PhoneGap tools, 3
Plugman. See Plugman CLI
as primary CLI, 75
removing platforms, 86
restoring plugins, 94
searching for plugins using, 91–92
upgrading Cordova/Cordova projects, 103–104
NodeJS used across platforms, 162–164
overview of, 157
project setup, 157
Windows command file for, 158–160
cordova
command, 33
cordova compile
, 97
cordova create
new Cordova application, 124
Plugman project with Cordova CLI, 105–106
Cordova Device Motion API, 260–261
.cordova
folder structure, CLI, 79–80
cordova-icon
, 388
cordova platform add windows
, 246
cordova platform add wp8
, 245
cordova platforms check
, 86–87, 104
cordova platforms up android
, 87
cordova platforms update
, 87, 104
Cordova Plugin Registry. See CPR (Cordova Plugin Registry)
Cordova plugins
adding plugins in Cordova CLI, 89
adding to applications, 375–376
adding to projects, 403
creating Android plugin, 414–423
creating JavaScript-only plugin, 398–399
creating native plugins, 408–414
removing, 91
restoring, 94
cordova prepare
copying help.html file into appropriate web content folders, 362
copying platform content into appropriate web content folders, 129, 207
creating project with Visual Studio, 254–255
developing Cordova applications, 125–127
getting information about prepare process, 74
importing Cordova project, 180, 183
testing application with device emulator, 389
working with Gulp and, 498–499
working with Xcode in iOS, 221–225
Cordova processes, automating, 164–167
cordova run
debugging Ubuntu applications, 237, 242–243
testing on Android emulator, 389–392
CoreTelephony
framework, testing iOS plugin, 427
adding user, 111
Plugman configuration information, 114–115
removing plugins installed from, 90–91
searching for plugins using, 113–114
unpublishing plugins from, 113
viewing plugin information, 114, 433
WebStorm, 482
create
command, in Cordova CLI, 76
create
script, Plugman project with shell scripts, 106–108
Cross-platform mobile development, 8
adding style to project, 378
changing with weinre Debug Client, 145
inserting with InAppBrowser, 365–366
jQuery Mobile containing, 444
responsive design using, 45–50
Topcoat UI framework based on, 439–443
CSS libraries, jQuery Mobile, 445
cssInfo
parameter, InAppBrowser, 366
CTTelephonyNetworkInfo
class, iOS plugin, 426
cvaReady
object, structuring application code, 41
-d
flag, 74–75, 80. See also --verbose
Dashcode, iOS, 223
data-role
attribute, jQuery Mobile, 446
Android applications, 179, 193–194
Cordova applications with Visual Studio, 262–265
Firefox OS applications with device, 218–220
Firefox OS applications with simulator, 207–218
iOS applications remotely with Safari, 227–233
preparing application for, 380–381
separating JavaScript code for, 39
on simulator vs. physical device, 224
PhoneGap Developer app, 148–151
Ripple Emulator (Apache Ripple), 145–148
Delete packages button, ASM, 170
description
property, config.xml, 132, 134
Design
responsive web application, 45–50
Develop menu, remotely debugging iOS, 228
Developer productivity enhancement tools
Developer Settings page, Firefox OS, 218–220
Development environment, configuring
Android development tools, 52–62
Cordova CLI installation, 51–52
overview of, 51
Development mechanics
application graphics, splash screens, and icons, 123–124
configuring applications, 131–134
creating applications, 124–131
debugging capabilities. See Debugging tools
overview of, 121
Development process, end-to-end
about the application, 373
Device Applications pane, Firefox, 211
Device Information page, Firefox, 219
Device Motion plugin, 335
device
object, 326
Device Orientation plugin, 337–339, 376
Device Orientation, Xcode in iOS, 224
device.platform
, API inconsistency, 123
deviceready event
checking API availability, 321–322
Cordova applications responding to, 93, 95, 295
Cordova initialization, 29, 32–34
debugging with alert()
, 135–136
delay in event firing and, 407
event listener for, 40–41, 43, 273, 467
generation of device information list following firing of, 440
Hello World using jQuery Mobile, 447
setting onDeviceReady
for, 381
Devices utility, Xcode, 227
device.version
, API inconsistency, 123
Directories, changing for new project, 77–82
DisallowOverscroll
preference, config.xml, 133
Displaying project information, Cordova CLI, 95–96
displayName
property, contact
object, 353
Documentation
application permissions, 323
Geolocation API, 318
JSHint, 472
PhoneGap Build, 295
PhoneGap CLI, 308
plugin, 431
Plugin APIs, 319
plugin.xml file, 400
testing Android on physical device, 194–195
weinre, 145
Domain Access tab, config.xml, 271
DOS command, automating tasks, 158
Dreamweaver, Adobe, 16
Eclipse
adding ADT to, 178
as Android Developer Tool, 59
coding Cordova applications, 16
editing Cordova application content files, 179–180
Edit Configuration, WebStorm, 482–483
Editing, Cordova application content files, 179–180
Elements pane
Chrome DevTools, 200
Ubuntu, 239
emulate
command
in Cordova CLI, 76
Ripple Emulator and, 147
running application on device emulator, 100, 207, 464
Emulator
Android. See AVDs (Android Virtual Devices)
grabbing screen shot, 192
running Cordova application in ADT IDE, 186–188
running Cordova application on Ripple, 147–148
testing Android plugin, 420–422
testing application with Android, 389–392
vs. simulator in this book, 135
End-to-end process. See Development process, end-to-end
Environment variable overrides, Visual Studio, 268–269
errorCallback
parameter, Cordova native plugin
executed on failure of plugin method call, 412–413
Camera API, 342
code validation tools, 469–473
Globalization API, 348
InAppBrowser window events, 364
JSHint code validation, 471–472
JSLint code validation, 470–471
Media Capture API, 347
Ripple, 148
Events
responsive design, 46
exec
object, Cordova native plugin, 412–413
Execute scripts, InAppBrowser, 364–365
executeScript
method, InAppBrowser, 364–365
exit
event, InAppBrowser, 363
Extensions, searching for, 474–475, 477
external web content editor, 179–180
Files, plugin. See Plugins
Filter, ADT IDE LogCat panel, 188
filter
property
Contacts API, 355
debugging on Firefox OS device, 218–220
debugging with Firefox OS simulator, 207–218
device compatibility issues, 220
Firefox OS
debugging applications, 218–220
debugging with simulator, 207–218
overview of, 203
Folders
Android SDK installation, 61
Bootstrap, 450
Cordova native plugin structure, 410
creating Android plugin, 419
creating new Cordova project, 78–82
developing Cordova applications, 124–126
frequency
property, watchOptions
, 381–382
Fullscreen
preference, config.xml, 133–134
coordinates
property, 340
getCurrentPosition
method, 339–340
timestamp
property, 340
getCarrierName
method
Android device results, 423
Android plugin, 418
Cordova native plugin, 412
getCountryCode
method
Android device results, 423
Cordova native plugin, 412
Getting Started page, Bootstrap, 450
proxy settings for, 73
git config
, 73
GIT_HOME
environment variable, 268–269
GitHub
accessing plugin source code, 398
adding plugins from, 88
Cordova 3 storing plugins in, 432
removing plugins installed from, 90–91
adding Globalization plugin to project, 347
dateToString
function, 350–351
error codes, 348
methods and parameters, 348–349, 351
Globalization plugin, 347
Google Chrome, 151–152, 195–202. See also Chrome DevTools
Google Gmail, 14
Google Maps, 14
Gradle
Ant vs., 57
Build tools used with ADT, 494
Graphics
application issues and, 123–124
Splashscreen API and, 367
testing on physical devices, 393
Grunt tool
as build tool, 494
executing Grunt process, 502–503
installing, 500
overview of, 500
types of processes managed by, 167
Gulp tool
as build tool, 494
example of use in Cordova project, 495
installing and populating gulpfile.js, 494–495
Ionic including configuration files for, 460–462
listing of gulp.js file, 495–497
types of processes managed by, 167
Hardware notifications, Cordova APIs, 326–327
HAXM (Hardware Accelerated Execution Manager) installer, 173
Hello World!
Creating Cordova project, 77–82
leveraging Cordova APIs, 35–38
responsive design and Cordova, 45–50
updating with UI from Topcoat, 439–441
using Ionic framework, 461–464
Help
Firefox App Manager, 204
hide()
method, StatusBar, 368–369
HideKeyboardFormAccessoryBar
preference, config.xml, 134
Highlighting
HTML content with GapDebug, 154
target content with weinre, 143–145
Home Screen, Firefox OS 2.0, 212–213
Hooks folders
adding, 269
complexity added to project with, 106
enhancing CLI commands with, 165
in new Cordova project, 79
role in code execution, 131
role in execution of code validation tools, 469
HTML
designing for container, 13–14
generated web application files, 41–44
structuring application code, 38–41
updating content in Web Inspector, 230–231
web applications using HTML5, 14–15
http.proxy
setting, Git, 73
https.proxy
setting, Git, 73
Hybrid applications
defined, 1
designing for container, 14–15
framework options, 25
managing using AppGyver, 487–489
Monaca as, 464
for new project with ThyM, 490–492
Hybrid Mobile project, ThyM, 490
Hydration, PhoneGap Build, 285
Icons, creating application, 123–124, 387–389
ID
adding plugin to project using, 433
searching for plugin with unknown, 91–92
ImageMagick, 388
Import Wizard, ADT IDE, 181–183
Importing, Cordova project
cordova prepare
command and, 180
locating project folder, 182
using ADT IDE Import wizard, 181–183
viewing available software with Eclipse wizard, 180
InAppBrowser API
issues with, 360
user interface, 12
index.html
file
adding reference to file in, 378–380
ADT IDE, 184
checking API availability, 320–321
contents of HelloCordova, 41–44
Hello World using Ionic framework, 461–462
Hello World using jQuery Mobile, 444–445
Hello World using Onsen UI, 465–466
Hello World using OpenUI5, 456–457
testing Android plugin, 420–421
testing iOS plugin, 428
testing plugin on Chrome DevTools, 406–407
Visual Studio tools for Cordova and, 273
index.js
file
Hello World updated with UI from Topcoat, 439–440
Hello World using Bootstrap, 454–455
Hello World using jQuery Mobile, 446–447
Hello World using Onsen UI, 466–467
Hello World using OpenUI5, 457–458
splitting JavaScript into own, 380
structuring application code, 40–41
testing Android plugin, 421–422
testing Javascript-only plugin, 404–405
info
command, Cordova CLI, 76
Initialization
creating Android plugin, 416
creating Cordova applications, 29–34
insertCSS
method, InAppBrowser, 366
Inspect Devices Application List, Chrome DevTools, 196–197
Inspector window, Firefox App Manager, 215
Install packages button, ASM, 170
Install page, PhoneGap Build, 302–303
Intel-based Android emulators, 172–177
Intel XDK, Apache Ripple for, 145
IntelliJ IDEA IDE, 59
Ionic UI framework
installing, 460
iOS
adding platform to existing project, 83–85
application icons for, 387–389
automating project setup across platforms, 163
build/deployment to simulator in Visual Studio, 275–281
content refresh via Hydration, 285
Cordova native plugin for, 410–414
Hello World using jQuery Mobile on, 447–448
Hello World using Onsen UI on, 467
Hello World using Topcoat on, 442–443
InAppBrowser benefits for, 362
jQuery Mobile built to mimic, 444
platform support with Plugman, 118
Plugman project with Cordova CLI for, 106
testing application on simulator, 389–390
iOS development tools
Node installation, 65
iOS development with Cordova
overview of, 221
testing applications in Xcode, 225–227
using Safari Web Inspector, 227–233
isoCountryCode
property, iOS plugin, 426
isOffline
function, 333
javac
command, installing JDK for Android, 52, 56
JAVA_HOME environment variable, Android development, 52–56
JavaScript
access to Cordova native APIs, 5–10
build tools used with Cordova, 494
Chrome DevTools error, 201–202
configuring application for weinre, 140–141
Cordova alert
results vs., 328
Cordova application packaging process and, 2–3
Cordova native plugin using, 411–412, 414
failing silently in Cordova applications, 138
plugins containing source file for, 8–9, 398
structuring application code by separating, 38–41
try/catch block for API inconsistency, 123
JavaScript Dynamic Content shim, Windows Store apps, 249
Javascript-only plugins, creating
Plugin Development Guide for, 397
JDK (Java Development Kit), Android development, 52–56
JetBrains, 479
jQM (jQuery Mobile)
adding style to project, 378–379
rotating compass graphic on page, 378–379
structuring application code for, 39
as third-party UI framework, 444–450
js-module
element, plugin.xml
, 417–418
JSHint tool
code editors supporting, 473
installing, 471
problems report in Brackets, 475–476
JSLint tool
code editors supporting, 473
installing, 470
.jsproj
files, Windows 8.1, 246
Keywords, searching for plugins, 433–434
Landscape orientation
Hello World using Bootstrap on Android, 455
working with Xcode in iOS, 223–225
Lazy loading, Cordova CLI, 79
Libraries
in Cordova initialization, 32
downloading to use jQuery Mobile, 445
jQM JavaScript, 444
Licenses
Cordova, 13
for generated web application files, 41–42
Visual Studio for Windows Phone using, 250–251
--link-to
switch, folders, 82
Links, symbolic, 82
Linux
Cordova tools for Ubuntu supported on, 235
creating application icons, 388
executing CLI commands in, 76–77
installing Cordova CLI on Ubuntu, 236
installing Grunt in, 500
installing Gulp in, 494
installing Ripple in, 146
updating Cordova CLI/Cordova projects, 103–104
writing bash script to automate project setup, 160–161
Listing
project platforms, 85
project plugins, 90
ListView, jQuery, 445–447, 459
Live preview, Brackets, 473–474
loaderror
event, InAppBrowser, 363
loadstart
event, InAppBrowser, 363
loadstop
event, InAppBrowser, 363
Local content, InAppBrowser, 362–363
Locals panel, Visual Studio, 264
Location
Windows Phone emulator, 260–261
‘location=yes’
parameter, InAppBrowser, 361
LogCat
Android SDK, 138
Message Filter Settings in ADT IDE, 186–188
monitoring activity outside of ADT IDE, 191–192
Macintosh OS X
Android SDK configuration on, 60–62
application icons for, 388
automating project setup across platforms, 162–164
automating project setup with bash script, 160–161
Brackets Cordova plugin on, 476–479
executing CLI commands on, 76–77
GapDebug on, 152
installing Ant for Android on, 56–59
installing Grunt on, 500
installing Gulp on, 494
installing JDK for Android, 52–56
installing JSHint on, 471
installing Ripple on, 146
installing weinre on, 140
remote agent installation, 276–278
remotely debugging iOS with Safari, 227–233
updating Cordova CLI/Cordova projects, 103–104
Windows development system requirements, 249
Xcode IDE installation using, 63–65
MakeAppicon, 388
makeListItem
function, Topcoat UI, 440
Manifest Editor, 209
Manifest file, HTML5, 14
MDHAE (Multi-Device Hybrid Apps Extension)
overview of, 265
warning page display, 268
Media Capture API, 340, 345–347
captureAudio
method, 346
captureVideo
method, 346
duration
property, 347
getFormatData
method, 346
options
parameter, 347
Media Capture plugin, 345
Merges folder
copying application content from, 96
managing platform-specific files with, 129–131
MessageDialog
class, troubleshooting Windows, 247
Methods
Globalization API, 349
Media API, 358
Microsoft
configuring Windows Phone device for app testing, 253
creating account, 251
registering Windows Phone device with, 251
Windows. See Windows
Monaca cloud-based development, 464
More Information page, Firefox OS Settings, 219
Multi-Device Hybrid Apps Extension. See MDHAE (Multi-Device Hybrid Apps Extension)
myplugin.m file, 118
name
property, config.xml, 132, 134
Naming conventions
Android Virtual Devices, 174–175
debugging application with weinre, 142
hooks files, 166
new Cordova project, 77
PhoneGap Build application, 288
Native APIs
Cordova initialization and, 29
creating Cordova native plugins, 408–414
setting application permissions, 322–324
Native code
creating Android plugin, 414–423
creating Cordova native plugin, 408–414
debugging iOS with Xcode, 226
deploying PhoneGap Build applications, 302–303
not necessary in plugins, 398
Native developers, using Plugman CLI, 72
Navigator, Cordova initialization, 33–34
navigator.notification.alert()
in Cordova initialization, 30, 32–34
debugging with alert() vs.
, 136
leveraging Cordova APIs, 35, 37
structuring application code, 40
Network connectivity, loss of, 333
Network Information plugin, 324
New Project dialog, Visual Studio, 266–267
New Project wizard, ThyM, 490–491
Nitobi, and PhoneGap, 4
NodeJS (Node JavaScript runtime engine)
build tools used with Cordova, 494
Cordova CLI using, 51
cross-platform approach using, 162–164
iOS development, 65
Norton Antivirus, 209
Notepad, 15
Notifications, user
overview of, 326
npm config
command, proxy settings, 73–74
NPM (Node Package Manager)
adding Console plugin, 375
adding mobile device platforms to application, 374–375
automating project setup across platforms, 162–164
configuring proxy settings for, 73
creating application icons, 388
Git installation for iOS development, 65
installing Cordova CLI for iOS, 66–67
installing Cordova CLI on Ubuntu, 236
installing Grunt, 500
installing Gulp, 494
installing JSHint, 471
installing JSLint, 470
installing Ripple on Windows, 146
Ionic including configuration files for, 460–461
plugins now stored in, 432
npm-g
cdva-create
Node installation, 162
Cordova icon Node installation, 388
Cordova installation, 66–67, 236
Grunt installation, 500
Ionic installation, 460
JSHint installation, 471
JSLint installation, 470
Plugman installation, 69
remote Macintosh agent installation, 276
Ripple Emulator installation, 146
updating Cordova, 103
Objective-C, iOS applications, 225
OnBodyLoad
function
Cordova initialization, 32, 34
debugging with alert()
, 136
onDeviceReady
function
Cordova initialization, 32, 34
generated web application files, 44
leveraging Cordova APIs, 36
setting deviceready event, 381
structuring application code, 41
Topcoat UI, 440
onError
function
catching Cordova API errors, 322
preparing application for debugging, 380–381
testing on Android emulator, 392
OnFailure
function
Globalization API, 348
onload
event function, Cordova initialization, 32
onOrientationChange
function, responsive design, 46–48
OnSuccess
function
Media Capture API, 346
Open Project link, Visual Studio, 256
Orientation
Accelerometer API, 337
Hello World using Bootstrap on Android, 455
Windows Phone emulator, 259–260
working with Xcode in iOS, 223
Orientation
preference, config.xml, 133–134
overlaysWebView()
method, StatusBar, 368–369
package.json file
executing Grunt process, 502–503
executing Gulp process, 497–500
publishing plugin, 432
Packaging process, 2
Packaging tab, config.xml, 271–272
PATH
environment variable. See also System path
adding A nt to System path, 62
Android JDK installation, 54–56
Android SDK installation, 61–62
editing Windows Path variable, 56
Pause button, Firefox App Manager, 215–216
Permissions
ConfiGAP tab for, 298
Firefox App Manager Device, 212
Personal Package Archive (PPA), Ubuntu, 236
history of Cordova and, 4
plugin for Brackets, 479
understanding, 3
used in this book, 3
using with ThyM, 492
PhoneGap Build
adding plugins to project, 301–302
collaboration, 285
configuring application, 294–301
content refresh via Hydration, 285–286
deploying applications, 302–305
forum for, 20
PhoneGap CLI interaction with, 312–315
anatomy of default application, 310–312
dealing with API inconsistency, 123
interacting with PhoneGap Build, 312–315
overview of, 307
project management, 309
workflow differences, 312
PhoneGap Developer app, 148–151
PhoneGap Enterprise, 20
PhoneGap Essentials, xvi
phonegap remote build android
, 313
debugging Firefox OS with, 218–220
debugging in Xcode with, 223–224
debugging Ubuntu with, 242–243
deploying PhoneGap Build applications to, 302–305
deploying Windows Phone apps to, 251
Firefox App Manager communicating with, 206
grabbing screen shot of, 192
Hello World using Bootstrap on Android, 455
Hello World using jQuery Mobile on, 447–448
Hello World using Onsen UI on iOS, 467
Hello World using OpenUI5 on Android, 459
Hello World using Topcoat on, 442–443
running Cordova in Visual Studio, 258
running Cordova in Xcode, 225
testing Android plugin on, 423
testing application on, 392–395
testing iOS plugin, 430
testing with Windows Phone, 251–254
platform
command, Codova CLI
in CLI command list, 76
defined, 82
listing platforms, 85
removing platforms, 86
updating platforms, 86–87, 104
Platform tools, Android SDK, 170–172
platformOverrides.js file, Visual Studio, 273–274
Platforms
adding support for mobile device, 374–375
adding support with Plugman CLI, 118–120
adding to existing project, 82–85
automating project setup with NodeJS across, 162–164
Brackets Cordova plugin, 476–477
building Cordova applications for, 16–18
Cordova API quirks across, 319–320
Cordova support for Windows, 245
creating Android plugin, 418
creating Cordova native plugin, 410
dealing with API inconsistency, 122–123
deploying PhoneGap Build applications, 302–305
developing Cordova applications for multiple, 124–131
listing supported, 85, 102–103
registering with manufacturers, 100
removing with Cordova CLI, 86
removing with Plugman, 120
supported by GapDebug, 151
Play symbol, Visual Studio, 258
Plugin APIs, documentation, 319
Plugin Development Guide, 397
Plugin Registry. See CPR (Cordova Plugin Registry)
plugin
command, Cordova CLI
in CLI command list, 76
adding Device API to project, 36
adding to application, 375–376
adding with Cordova CLI, 87–90
adding to PhoneGap Build project, 301–302
Adobe PhoneGap API, 3
building Cordova application, 18, 127–131
ConfiGAP tab for, 299
as Cordova components, 4
creating Android native, 414–423
creating Cordova native, 408–413
creating JavaScript-only, 8–9, 398–403
creating with Plugman, 110, 116–118
documentation for Cordova, 23
forgetting to add critical project, 322
listing with Cordova CLI, 90
managing using CLI, 319
native developers using, 72
reinstalling in upgraded project, 104
removing with Cordova CLI, 90–91
restoring with Cordova CLI, 94
saving with Cordova CLI, 92–94
searching for particular, 91–92
troubleshooting PhoneGap Build, 291
uninstalling with Plugman, 110
using Plugin Registry, 110–116
WebStorm Cordova, 482
Plugins tab, config.xml, 271–272
plugin.xml file
creating Android plugin, 417–418
creating Cordova native plugin, 411
creating Javascript-only plugin, 399–401
overview of, 398
publishing plugins to Plugin Registry, 111–113
command summary, 105
creating Javascript-only plugin, 399
creating plugins, 69–70, 116–118
creating Plugman projects, 105–108
overview of, 104
platform support with, 118–120
plugman adduser
, 431
plugman config get
, 114
plugman config ls
, 114
plugman create
, 116–117, 409–410
plugman info
, 114
plugman platform remove
, 120
plugman publish
, 431
plugman publish pluginfolder
, 431
plugman search
command, 113
plugman unpublish plugin_id
, 113
uninstalling plugins, 110
used by Cordova CLI, 71
Portrait orientation
for Hello World using Bootstrap on Android, 455
working with Xcode in iOS, 223–225
PPA (Personal Package Archive), Ubuntu, 236
Preferences
default PhoneGap application, 310–311
remotely debugging iOS with Safari, 228
StatusBar plugin, 368
prepare
command, Cordova CLI
build
command calling, 98
copying code into platform subfolders, 126–127
copying platform content into appropriate web content folders, 129, 207–208
creating new Cordova project, 82
creating project with Visual Studio, 255
editing weg application content and, 125
getting information about prepare process, 74
hooks folder exposing prepare events, 165–167
importing Cordova projects, 179–180, 183
project management with PhoneGap and, 309, 312
role in managing cordova.js
file, 108
testing applications with device emulator, 389
using with serve command to check that web content is current, 100
working with Gulp and, 498–499
working with Xcode and, 221–225
Problems report, Brackets, 475–476
Processes, automating Cordova, 164–167
Progress panel, ADT IDE, 185
Project, Cordova
creating new, 374
creating with Visual Studio, 254–255
displaying information, 94
executing applications, 98–103
opening in Visual Studio, 256–258
Project Options menu, Visual Studio, 257
Project setup, automating
cross-platform approach using NodeJS, 162–164
overview of, 157
Projects
managing with PhoneGap CLI, 309
Visual Studio options for new, 266–267
prompt()
method, visual notifications, 330–331
Prototyping, PhoneGap Build quick, 284
Publishing
plugins to Plugin Registry, 111–113
testing app on physical devices before, 251–254
QR (Quick Response) code
AppGyver steroids application, 488–489
PhoneGap Build applications, 302
readme.md file, plugins, 112–113, 431–432
Ready to Build button, PhoneGap Build, 288–289
Rebuild All button, PhoneGap Build, 289
Registration
Windows Phone Dev Center, 251
Windows Phone developer, 251–253
Registry, Cordova Plugin, 9
Remote agent, iOS build to simulator in Visual Studio, 275–281
Removing
platforms, 86
Resize
function, responsive design, 46–48
Resource filters, ADT IDE, 184
Bootstrap and, 450
browser and window size and orientation, 45–49
CSS use in, 45
examples of portrait and landscape orientation, 49
resources for, 50
Responsive Mobile Design: Designing for Every Device (Dutson), 50
restore
command, Cordova CLI
in Cordova CLI command list, 76
Ripple Emulator (Apache Ripple)
debugging Cordova application, 274–275
installing, 146
viewing application on multiple devices, 380
Run As menu, ADT IDE, 186, 191
Run button
debugging Ubuntu applications, 240–241
running Cordova project in Xcode, 224
Visual Studio tools for Cordova, 274–275
run
command, Cordova CLI
in Cordova CLI command list, 76
running applications on device emulator, 98-99, 207, 476–477
Run Configurations, 188–190, 482–484
Run menu, Eclipse, 493
Running, Cordova application, 185–191
debugger icons, 232
enabling remote debugging of iOS, 228–230
setting breakpoints/stepping through JavaScript code, 231–232
updating HTML content in, 230–231
viewing/editing variable values, 232–233
Sams Teach Yourself jQuery Mobile in 24 Hours (Dutson), 450
Sams Teach Yourself Responsive Web Design in 24 Hours (Kymin), 50
SAP Mobile Platform (SMP), 285
SAP Mobile Platform Hybrid SDK
author’s work with, xxiii
over-the-air web content updates for production applications, 285
types of hybrid mobile applications, 25
Sass, Ionic support for, 461–462
save
command
in Cordova CLI command list, 76
Scale, in responsive design, 45–50
Scanner application, Steroids, 486–489
Schemes, for Cordova project in Xcode, 224
Screen shots, grabbing, 192, 227
script
tag, Cordova initialization, 31–32
Scripts, executing in InAppBrowser, 364–365
SDK (software development kit)
building Cordova applications, 1, 16–18
Search, for plugins using keywords, 433–434
Search paths
installing local plugin, 89
Security
PhoneGap Build applications to Android, 302–303, 305
Windows app limitations, 247–248
_self
parameter, InAppBrowser, 361
serve
command
in Cordova CLI command list, 76
Session Filter, ADT IDE LogCat panel, 188
Shell scripts, Plugman, 106–108
show()
method, StatusBar, 368–369
Signing keys, troubleshooting PhoneGap Build, 290–291
debugging iOS with Xcode, 226–227
debugging on physical device vs., 223
debugging Ubuntu applications, 237–242
debugging with Firefox OS, 207–218
installing Firefox OS, 206–207
testing application on iOS, 389–390
testing iOS plugin, 430
testing PhoneGap Build applications on, 304–305
using weinre with device, 142–145
vs. emulators in this book, 135
Size, Windows Phone emulator, 259
SMP (SAP Mobile Platform), 285
Software development kit (SDK)
building Cordova applications, 1, 16–18
someOtherFunction
function, 34
Source code
accessing for plugin, 398
Cordova, 4
Sources pane
Chrome DevTools, 200
Splash screens, creating, 123–124
Splashscreen API, 367
showSplash
function, 367
Splashscreen plugin, 367
Stack Overflow, Cordova support, 20
Start Simulator button, Firefox OS simulator, 206
Static HTML pages, traditional web applications, 13–14
Step Into button
debugging iOS, 232
debugging with Firefox OS simulator, 215–216
Step Out button
debugging iOS, 232
debugging with Firefox OS simulator, 215
Step Over button
debugging iOS, 232
debugging with Firefox OS simulator, 215–216
Steroids application, by AppGyver, 486–489
Stop button, Cordova project in Xcode, 224
Style, StatusBar, 370
styleDefault()
method, StatusBar, 370
successCallback
parameter, Cordova native plugin, 7–8, 412–413
Support, Cordova, 20
Symbolic links, 82
_system
parameter, InAppBrowser, 361
adding Ant to, 62
ADT installation and, 60
Android SDK installation and, 61–62
cvs-create.sh
and, 161
JDK installation and, 54
Node.JS installation and, 65, 76
System requirements, Windows development with Cordova, 249
Target platforms
universal Windows app project, 246
Visual Studio Run menu, 275–276
Xcode available device, 224–225
telephone=yes
tag, Cordova initialization, 31
Context
class, 414
TelephonyManager
class, 414
Testing
Android on physical device, 192–195
application in desktop browser, 103
application with device emulators, 389–392
Cordova applications, 32, 134–135
Cordova applications in Visual Studio, 258
Cordova applications in Xcode, 225–227
as debugging. See Debugging
debugging tools. See Debugging tools
Git configuration for iOS, 65–66
Node installation for iOS, 65
separating JavaScript code for debugging, 39
The Hitchhiker’s Guide to the Galaxy (Adams), 398
Themes
UI5, 457
Third-party tools
code editors. See Code editors, third-party
developer productivity enhancement, 485–493
overview of, 469
THyM, productivity enhancement tool, 490–493
tm.getSimCountryIso()
method, Android plugin, 414–416
tm.getSimOperatorName()
method, Android plugin, 414–416
Tools
building Cordova applications, 16–18
Tools menu, Android SDK installation, 59
CSS library for creating UIs for web applications, 439
Hello World! examples, 440–441
light and dark themes, 442–443
Troubleshooting
Cordova applications, 32
creating project/adding platform, 79
leveraging Cordova APIs, 36
Twitter, creating Bootstrap, 450
Ubuntu development with Cordova
debugging applications, 237–243
installing Cordova CLI, 235–236
overview of, 235
UI (User interface)
building Cordova application with, 1–2
frameworks. See Third-party UI frameworks
updating in new project, 378–380
UIWebView
, remotely debugging iOS, 227
Unknown Sources, enabling on Android, 302–303
Updates
Cordova CLI/Cordova project, 103–104
plugin, 113
beep
and vibrate
methods, 327
overview of, 326
Variables, Web Inspector, 232–233
--verbose
, 74–75. See also -d
flag
Version attribute, PhoneGap Build, 301–302
vibrate
method, hardware notifications, 327
Vibration plugin, hardware notifications, 327
Viewport
changing settings on Bootstrap, 452
Cordova initialization, 31, 34
Virtual buttons, 333
Visibility, StatusBar, 368–369
Visual notifications, Cordova APIs
Visual Studio Express, 251
Visual Studio Professional, 251, 265
Visual Studio tools, for Cordova
index.html file, 273
iOS build/deployment in Visual Studio, 275–281
overview of, 265
warning page display, 268
controlling Windows Phone emulator, 259–261
debugging applications, 262–265
opening Cordova project, 256–258
running Cordova application, 258
testing Cordova applications, 254
Windows development with Cordova, 254–265
VMware Fusion, 249
W3C (World Wide Web Consortium)
Contacts API, 352
Cordova APIs, 24
hardware APIs, 335
Media Capture API, 345
Watch panel, Visual Studio, 264
Web 2.0 applications, 14
anatomy of. See Anatomy of Cordova application
building with IDE, 18
copying own files during project create, 81–82
designing for container, 13–15
editing Cordova content files, 179–180
monitoring activity outside of ADT IDE, 191–192
Web design. See Responsive design
Web developers
Web Developer menu in Firefox, 205
Web Inspector, Safari. See Safari Web Inspector
Web Inspector, Ubuntu, 239–240
WebView, 2
weinre (Web Inspector Remote)
debugging iOS applications, 225–226
debugging PhoneGap Build, 288–289
Whitelist, configuring application, 132
Window events, InAppBrowser, 363–364
alert
function unavailable in, 33
Android SDK configuration in, 60–62
Ant installation for Android in, 56–59
automating project setup in, 158–160, 162–164
executing CLI commands in, 76–77
Firefox OS simulator issues in, 209
GapDebug for, 152
installing JDK for Android development, 52–56
installing JSHint on, 472
installing JSLint on, 470
installing Ripple on, 146
serve
command security warning, 101
updating Cordova CLI/Cordova projects, 103–104
Windows development with Cordova
overview of, 245
system requirements, 249
Visual Studio workflow, 254–265
Windows App Store setup, 251
Windows Phone development tools, 250
Windows Phone device configuration, 251–254
Windows Phone limitations/security, 247–249
Windows vs. WP8 projects, 245–247
Windows Phone
deploying apps to Windows Phone Store, 251
development tools, 250
limitations/security restrictions, 247–249
system requirements for Cordova, 249
Windows Phone 8
creating project with Visual Studio, 254–255
debugging with Visual Studio, 262–265
running Cordova application, 258
supported by Cordova, 245
Windows Phone Dev Center, 250–253
Windows Phone SDK, 250
Windows platform
creating project with Visual Studio, 254–255
Wipe user data checkbox, AVD, 175
Workflow
Cordova developer, 72
native development and plugin, 409
PhoneGap CLI and PhoneGap Build, 313
PhoneGap vs. Cordova CLI, 312
Visual Studio. See Visual Studio, workflow
World Wide Web Consortium. See W3C (World Wide Web Consortium)
Writing to console, debugging by, 136–139
WWAHost process, Windows security, 248
www folder
copying application content from, 96–97
developing Cordova applications, 124–125
importing Cordova project, 183
Xcode
application console output in, 392
not using to edit web applications, 223
opening Cordova project in, 221–223
testing iOS plugin in, 428–429
Windows system requirements, 249
Xcode 6 Start to Finish (Anderson), 226
.xcodeproj
extension, iOS, 221–223
XHR (XMLHTTPRequest) API, Web 2.0 applications, 14
.zip files
ADT installation, 60
deploying custom plugins, 431
Plugman project with shell scripts, 106
Topcoat, 439
Zoom, Windows Phone emulator, 259