makeCustomAnimation() method, 341
makeScaleUpAnimation() method, 341
makeThumbnailScaleUpAnimation() method, 341
Map APIs. See Google Maps Android API v2
mapping.txt, 452
Material design, L Developer Preview, 461–463
Material theme, L Developer Preview, 462
Matrix class, transforming bitmaps, 313–314
Measuring text screen requirements, 312
MediaDrm class, 202
MediaPlayer object, 202–203, 205–206
MediaRecorder object, 200–201, 204–205
MediaRouteProvider APIs, 209
Media router APIs, 209
Media router library, multimedia APIs, 209
MediaScannerConnection class, 198
MediaStore content provider, 198, 206
Memory, bitmap optimization, 313–314
MenuInflater, contextual action mode, 104
Message flow, Google Cloud Messaging, 272, 273–274
Metadata, NotificationListenerService, 91
<meta-data> manifest tag
Android Backup Service, 431
App Widgets, 399
Google Cloud Save, 299
Google Maps Android, 265
Methods
building content provider, 57–62
chaining in Java, 501
MIME types
application acting as content filter, 410–413
building content provider, 61–62
overview of, 411
minSdkVersion, action bars, 101
MMS (Multimedia Messaging Service), 216–217
monkey application, 472, 478–481
monospace font
conventions used in this book, 7
drawing on screen, 310
MotionEvent object, gesture detectors, 123
Mouse-overs, WebView control, 178
moveToFirst() method, Cursor, 41–42
moveToNext() method, Cursor, 41–42
Moving transformations, 336
mSaveText, listening for focus changes, 122–123
MultiChoiceModeListener(), contextual action mode, 105
media router library, 209
overview of, 191
searching for multimedia, 207–208
working with face detection, 203–204
Multimedia APIs, still images
assigning as wallpaper, 199
capturing with camera, 192–196
choosing among device cameras, 199–200
common camera parameters, 197
configuring camera mode settings, 196
sharing images, 198
zooming camera, 197
Multimedia Messaging Service (MMS), 216–217
Multiplayer gaming, Google Play game services, 299
Multiple processors, 16
Multiple users, creating on devices, 428–429
Multitouch gestures, 123, 129–133
MyOnClickListener class, using inner classes, 504
name attribute, Google Cloud Save, 299
Naming conventions
applications for tablets, 155
content provider URI, 56
National Geospatial-Intelligence Agency (NGA), World Magnetic Model, 230
Native Android applications, Adobe Air and, 188
NativeBasicsActivity.java, 380–381
native_basics.c file, 381
Native code. See Android NDK (Native Development Kit)
Native Development Kit. See Android NDK (Native Development Kit)
Native Google TV apps, 157–158
Native libraries, Android NDK
building own NDK project, 380
building sample application, 379
improving performance, 384–385
only on Android 1.5 and higher, 377–378
Navigation
detecting gestures, 123
optimizing web applications for Google TV, 157
user interface. See Action bars
NDEF (NFC Data Exchange Format) Push over NFC, 241–243
NDK. See Android NDK (Native Development Kit)
ndk-build script, building own NDK project, 380
Nesting transactions, SQLite, 40, 491
NetworkInfo objects, Android network status, 172
Android network status, 171–173
asynchronous operations, 12, 167–171
mobile networking, 163
overview of, 163
parsing XML from network, 166–167
StrictMode, 164
NetworkOnMainThreadException, 164
Network operator name, requesting service information, 214
Network resources, displaying images, 170–171
New Project creation wizard, Android Studio, 509–512
NfcAdapter class, Android Beam, 242–243
NFC Data Exchange Format (NDEF) Push over NFC, 241–243
NGA (National Geospatial-Intelligence Agency), World Magnetic Model, 230
Noise, notifications, 86
Nonprimitive types, 53, 170–171
Nonprofit Khronos Group, OpenGL ES, 345
Normal broadcasts, 67
Notification.Builder() class, 78, 80–81, 83
NotificationCompat library, 78
NotificationCompat.Builder class, 79, 85–86, 88–90
NotificationListenerService, 91
NotificationManager object, 79, 80–81, 83
Notification queue
expandable and contractible notifications, 88–90
communicating data to user, 24
compatibility, 78
components of simple, 79
expandable and contractible, 88–90
L Developer Preview enhanced, 463–464
making noise, 86
notification listener, 91
sounds of system events, 208
using NotificationManager service, 79
vibrating phone, 84
for wearables, 158
notifyBuilder variable, 79
ObjectAnimator class, property animation, 337
onActionItemClicked() method, contextual action mode, 104
onActivityResult() method, recording speech, 145
onAnimateMove() method, fling gestures, 128
onAnimateStep() method, fling gestures, 128
onBackup() method, 431, 433–434
ON_BICYCLE, activity recognition APIs, 261
onBind() method
creating Service, 21
implementing remote interface, 26–28
onClick() method
building basic action bars, 100
building web extensions, 185
geocoding locations, 258
playing audio, 205
recording video, 201
onConnected() method, fused location provider, 261
onConnectionFailed() method, fused location provider, 261
OnConnectionFailedListener, 261
onConsoleMessage() method, web extensions, 183
OnCreate() method
AsyncTask class, 13
data for Google Analytics, 287
Google Play game services, 297
remote interface, 27
search Activity, 423
wallpaper Service, 405
onCreateLoader() method, 16
onCreateOptionsMenu(), search, 420–421
onDeleted() method, AppWidgetProvider, 396
OnDestroy() method
Cursor management, 41
data for Google Analytics, 287
wallpaper Service, 405
onDisabled() method, AppWidgetProvider, 395
onDisconnected() method, fused location provider, 261
onDoubleTap()method, gestures, 124, 128–129
onDoubleTapEvent() method, gestures, 124–125
onDown() method, gestures, 124, 128–129
onDowngrade() method, SQLiteOpenHelper, 47–48
onDraw() method
single-touch gestures, 126
onDrawFrame() method
Android NDK, 385
OpenGL ES 2.0, 372
onEnabled() method, AppWidgetProvider, 395
onFaceDetection() callback event, 203–204
onFling() method, gestures, 124, 129
OnFocusChangeListener class, 122–123
ON_FOOT, activity recognition APIs, 261
OnGlobal LayoutListener class, 121
onInit() method, TTS, 146
OnInitListener interface, TTS, 146
onJsBeforeUnload() method, WebChromeClient, 179
onKeyDown() method, OpenGL ES, 364–365, 368
onKeyUp() method, OpenGL ES, 365
onLoaderReset() method, Loaders, 16
onLoadFinished() method, Loaders, 16
onLocationChanged() method, device location, 255–256
onLocationChanged() method, geocoding location, 257
onLongPress() method, GestureDetector, 124
onMove() method, gestures, 128–129
onNewIntent() method, search Activity, 423
onOpen() method, SQLiteOpenHelper, 47–48
onOptionsItemSelected() method, action bar, 104
onOrientationChanged() method, screen, 136
onPause() method, Cursor, 41
onPause() method, WebView, 179–180
onPerformSync() method, sync adapters, 429
onPostExecute() method, AsyncTask, 13
OnPreDrawListener class, 120
onPreExecute() method, AsyncTask, 13
onProgressUpdate() method, AsyncTask, 13
onReceive() callback method, broadcasts, 69, 71
onResetLocation() method, gestures, 128–129
onRestore() method, 431, 433–434
onResume() method
avoiding logging of, 292
Cursor management, 41
WebView state, 179
onScaleBegin() method, multitouch gestures, 132
onScale() helper method, multitouch gestures, 131
onScroll() method, gestures, 124, 129
onSensorChanged() method, 228–229
onServiceConnected() method, remote interface, 27
onServiceDisconnected() method, remote interface, 27–28
onShowPress() method, gestures, 124
onSingleTapConfirmed() method, gestures, 124
onSingleTapUp() method, gestures, 124
onStartCommand() method, Service, 20–22, 25
onStart() method, Service, 20–22, 25
onSurfaceChanged() method, wallpaper Service, 405
onSurfaceCreated() method, wallpaper Service, 405
onSurfaceCreate() method, OpenGL ES 2.0, 370
onSurfaceDestroyed() method, wallpaper Service, 405
onTouchEvent() method, gestures, 123, 125–127, 131
onTouchEvent() method, wallpaper Service, 405
onTouchModeChanged() method, 120
OnTouchModeChangeListener class, 120
onUpdate() method, App Widget, 395–396, 398
onUpgrade() method, SQLiteOpenHelper, 47–48
onVisibilityChanged() method, wallpaper, 405
OpenGL ES
ensuring device compatibility, 346–347
handling tasks manually, 347–353
leveraging in Android, 346
overview of, 345
using APIs in Android SDK, 347
OpenGL rendering pipeline, 2D graphics, 321
OpenGL Utility Toolkit (GLUT), 352
openOrCreateDatabase() method, SQLite database, 36
Operations, asynchronous networking, 167–171
Options menu resource file, action bars, 100–101
Ordered broadcasts, 67
alternative resources for, 153
determining device, 230
developing tablet applications, 155
using space on big landscape screens, 153–154
OrientationEventListener class, 135–136
OutOfMemoryError, bitmap optimization, 313–314
Output, speech, 139
OutputStream, Bluetooth devices, 238
Overflow menu icon, action bars, 101
OvershootInterpolator, animation, 341
Paint object
anti-aliasing, 307
drawing text, 309
gradients, 307
hardware acceleration and, 325
setting properties via XML, 316
styles, 307
understanding, 307
working with canvases and, 305–306
working with color, 307
Parameters class, camera, 196–197
Parameters, NDK project, 381–382
Parents, style inheritance, 109–111
Parsing XML from network, 166–167
Password protection, software piracy, 450
Pasting data, from system clipboard, 119
pause Timers() method, WebView, 180
PayPal billing APIs, 280
peek Drawable() method, wallpaper, 199
Percentage, of battery use, 233
Performance optimization
2D bitmaps, 313
3D graphics in Android NDK, 384–385
Permissions
Bluetooth, 235
camera, 192
content provider access, 64
fused location provider, 261
making phone calls, 220
monitoring battery use, 231
monitoring Wi-Fi state, 246
phone state information, 212
sending/receiving SMS messages, 218
setting wallpaper, 199
sounds of system events, 209
using Google Analytics SDK for Android, 286
using GPS in your applications, 254
vibration with notifications, 84
video from Internet resource, 202
Wi-Fi Direct on Android, 246
working with SIP, 221
permitAll() method, skipping StrictMode, 17, 164
Personalizing devices, 199, 208–209
PhoneNumberUtils class, 215–216, 445
Pinch-to-zoom, multitouch gestures, 129–130
Plug-ins, WebView, 178
postDelayed() method, View class, 15
post() method
Power issues
Daydream, 408
live wallpaper, 406
Precision updates, AppWidgetProvider, 396
Preferences, backing up shared, 432
PrefListenerService class, 398
Press-and-hold action, long-click events, 121
Preview All Screen Sizes, Android Studio, 514
Preview controls, Android Studio, 515
previewImage field, App Widgets, 394
Preview window, Android Studio, 514–515
Pricing, antipiracy tips, 454
Printing debug information, 478
Priorities, setting notification, 90–91
Processors, 16
Programmatically
defining property animation, 339–341
defining shape drawables, 316–317
defining tweened animations, 333
implementing locale support, 444–445
ProgressBar control, 13, 202–203, 220
proguard-project.txt file, 451
Projects, Android Studio, 509, 512
Project Volta, L Developer Preview, 461
Properties
SQLite database, 37
typeface, 310
Property animation
defined, 329
defining as XML resources, 337–339
defining/modifying programmatically, 339–341
propertyName attribute, property animation, 338
Provider(s)
account, 428
content. See Content providers
SMS, 217
Telephony API service, 214
Publishing applications for foreign users, 446
publishProgress() method, AsyncTask, 13
pull command, retrieving files, 472
push command, copying files, 472
Push messaging services, 271–273, 275
Queries, paired Bluetooth devices, 237
Queries, SQLite database
complex queries, 44
to multiple tables, 495
raw queries, 45
with SELECT, 493
subqueries for calculated columns, 497
using calculated columns, 496–497
using sqlite3 to test, 490
query() method
enabling search suggestions, 419
executing simple queries, 43–44
retrieving content provider data, 64
Questions, answered in this book, 3–4
queueEvent() method, GLSurfaceView, 368
Quick Search Box, global searches, 424–425
Quick-Start Guides
ADB. See ADB (Android Debug Bridge)
Android Studio. See Android Studio
SQLite. See SQLite databases
Quotas, Google Play game services, 298
Radial gradients, 309
Rate limiting management, Google Play game services, 298
Raw HTML, WebView control, 177
rawquery() method, 45
readFromParcel() method, Parcelable class, 29
Reading
READ_PHONE_STATE permission, 212
readText() method, text-to-speech, 147
Real-time multiplayer APIs, Google Play game services, 299
<receiver> tag, App Widgets, 399
Receiving
Android Beam messages, 243–244
SMS messages, 218
RecognizerIntent intent, recording speech, 142–145
Reconfigure() method, bitmaps, 314
Recording
Records
deleting SQLite database, 39–40
inserting SQLite database, 38
query results corresponding to returned, 41
updating SQLite database, 38–39
recordSpeech() method, speech recognition, 145
RectEvaluator class, property animation, 337
RectShape object, 318
recycle() method, transforming bitmaps, 313
RecyclerView, L Developer Preview, 462
Referential integrity, SQLite limitations, 491
registerListener() method, sensors, 228–230
registerReceiver() method, sticky broadcasts, 67
Registration
of applications using ADB, 431
of backup agent in manifest file, 434
receiving broadcasts and, 69–71
Reinstallation, of applications using ADB, 473
release() method, playing audio, 206
Remote backup service, 430–431
customizing notifications, 86–88
remove() method, SQLite database records, 39–40
Renderer class, GLSurfaceView, 366–369
RenderScript
computing with, 385
deprecated in Android 4.1, 374
repeatCount attribute, property animation, 338–339
repeatMode attribute, property animation, 338–339
Reports, generating bug
Android Debug Bridge, 477
Google Analytics Dashboard, 288–290
requestLocationUpdates() method, 254
requestRestore() method, 435
requestStop() method, OpenGL ES thread, 350
requiredAccountType attribute, restricted profiles, 429
/res/animator/grow.xml, animations, 333
/res/animator/resource, animations, 332–333, 337–339
/res/drawable, internationalization, 441
/res/drawable/resource, shape drawables, 315–316
/res/layout, internationalization, 440–441
/res/values, internationalization, 440–441
/res/values/styles.xml, styles, 106–109
/res/xml, live wallpaper, 406
Resolution, bitmap, 314
Restore, forcing, 477
RestoreObserver object, 435
restrictedAccountType attribute, profiles, 429
Restricted profiles, tablets, 428–429
Return values, building NDK project, 381–382
Reverse geocoding, 256
RFCOMM connections, Bluetooth, 235
Right-to-left (RTL) language localization, 445
RingtoneManager object, 208–209
Roaming, 214
RotateAnimation class, 335
Rotating transformations, 335
RoundRectShape object, 318–319
RTL (right-to-left) language localization, 445
runOnUiThread() method, Activity, 15
Runtime, L Developer Preview, 460–462
sample.html file, 185
Sans Serif typeface, drawing on screen, 310
Saving, game data with Cloud Save, 299
Scale
bitmaps, 313
designing flexible user interfaces, 152
loading content into WebView, 178
monitoring battery use, 233
working with transformations, 335–336
ScaleAnimation class, 336
ScaleGestureDetector class, 123, 129–131
Scenes
state animations with, 342
Schema
creating SQLite database, 37–38
designing SQLite database, 491–492
listing for database with sqlite3, 488
listing for table with sqlite3, 487
Screens
2D drawing on. See Drawing 2D objects
3D drawing on. See Drawing 3D objects
designing flexible user interfaces, 152
handling orientation changes, 134–136
listening for events on entire, 120–121
listening for focus changes, 122–123
listening for long-click event, 121–122
listening for touch mode changes, 119–120
optimizing web applications for Google TV, 157
removing action bars from, 104–105
using alternative resources for, 153
using space effectively on big landscape, 153–154
WebView control as entire, 178
Screen saver, Daydream, 408–410
Scripts, SQL, 489
Scroll gestures, 124–125, 128–129
SDK Manager, Android Studio, 508–509
basic, 417
configuring Android manifest file for, 423–424
creating search Activity, 422–423
making application content searchable, 415–416
voice, 420
Search button, deprecated, 420
SearchManager class, 417
searchSuggestAuthority attribute, 418
searchSuggestThreshold attribute, 418
Secondary logs, accessing, 476
Security
host card emulation applications, 245
JavaScript control for Android app, 187
software piracy. See Software piracy protection
video content, with MediaDrm class, 202
Seed feature, stress testing applications, 480
SELECT statement, querying SQLite database tables, 493
Semicolon (;), sqlite3, 490
sendBroadcast() method, 67
Sending
enabling Android Beam, 241–243
sendOrderedBroadcast() method, 67
sendStickyBroadcast() method, 67
sendStickyOrderedBroadcast() method, 67
SensorEvent class, 228
SensorEventListener object, 228
Sensors. See Hardware sensors
separator command, sqlite3, 489
Sequential tweened animations, 333
Serial number, ADB commands to specific devices, 470
Serif typeface, drawing on screen, 310
Servers
alternative to GCM, 275
integrating GCM on Android application, 274
Service class
creating App Widget, 393
creating App Widget update Service, 398–399
implementing Daydream, 409
working with live wallpapers, 404–408
ServiceConnection object, remote interface, 27–28
Service information, requesting, 214
<service> manifest tag
configuring App Widgets, 399
configuring live wallpapers, 406–407
creating Service, 25
implementing remote interface, 27
registering Service implementation, 20
Services
controlling, 25
default messaging applications, 217
implementing IMEs as Android, 117
implementing IntentService class, 30–33
implementing Parcelable class, 28–30
implementing remote interface, 26–28
lifecycle, 20
overview of, 19
when to use, 19
Service Set Identifier (SSID), Wi-Fi state, 247
ServiceState object, call state, 213–214
Session Initiation Protocol (SIP), Telephony API, 222–223
<set> tag, tweened animations, 333
setAccuracy() method, location of device, 255
setAutoCancel() method, notifications, 83
setBackground() method, drawable animations, 330
setBeam PushUris() method, Android Beam over Bluetooth, 245
setBitmap() method, wallpaper, 199
setBuiltInZoomControls() method, WebView, 178
setClass() method, broadcasts, 74
setcolor() method, Paint, 307
setContentDescription() method, accessibility, 140
setContentText() method, notifications, 80, 87, 89
setContentTitle() method, notifications, 80, 87, 89
setContentView() method, themes, 112
setContentView() method, WebView, 178
setDataSource() method, playing audio, 205
setDisplayHomeAs UpEnabled() method, icon clicks, 104
setEGLContextClient Version() method, OpenGL ES 2.0, 370
setFlags() method, hardware acceleration, 325
setHapticFeedbackEnabled() method, accessibility, 140
setHTMLText() method, web extensions, 185–186
setInitialScale() method, WebView, 178
setInterpolator() method, interpolator, 341
setJavaScriptEnabled() method
web extensions, 183
WebView, 178
setLayerType() method, hardware acceleration, 325
setLightTouchEnabled() method, WebView, 178
setMediaController() method, VideoView, 202–203
setNdefPushMessageCallback() method, Android Beam, 242
setNotificationUri() method, content provider, 57
setOnClickListener() method, 123, 504
setOnCompletionListener() method, video, 202–203
setOneShot() method, drawable animation, 330
setOnFocusChangeListener() method, focus changes, 122–123
setOnLongListener() method, View, 123
SetPackage() methods, application broadcasts, 74
setParameters() method, camera, 196
setPowerRequirement() method, location of device, 255
setPreviewFormat() method, camera, 195
setPrimaryClip() method, copying/pasting, 119
setResource() method, wallpaper, 199
setShader() method, Paint, 307–309
setSound() method, notifications, 86
setStream() method, wallpaper, 199
setStyle() method, notifications, 88–90
setSupportZoom() method, WebView, 178
setTables() method, content provider, 57
setTarget() method, property animations, 339
Settings
Daydream, 409
Settings, Language & import menu, 115
setTint() method, drawable resources at runtime, 462
setVibrate() method, notifications, 84
setVideoURI() method, video, 202–203
setWebChromeClient() method, 179
SGI (Silicon Graphics), and OpenGL, 345
SHA-1 fingerprint, map API key, 263–264
Shaders, OpenGL ES 2.0, 370–373
Shadows, L Developer Preview, 462–463
ShapeDrawable
defining as XML resources, 315–316
defining programmatically, 316–317
using ArcShape object, 320–322
using OvalShape object, 319–320
using PathShape object, 323–324
using RectShape object, 318
using RoundRectShape object, 318–319
using view animations, 331–332
Shapes
defining shape drawables, 315–317
drawing ovals and circles, 319–320
drawing rectangles and squares, 318
drawing rectangles with rounded corners, 318–319
Shared
preference files, backing up, 432
still images, 198
Shell commands, ADB
accessing sqlite3 tool, 486
inspecting SQLite databases, 478
installing custom binaries via, 481–482
issuing single shell commands, 471
starting and stopping emulator, 471–472
stress testing applications, 478–481
using shell session, 471
showAsAction attribute, action bar, 102–103
showVoiceSearchButton value, voice search, 420
shutdown() method, text-to-speech, 147
Sidebars, conventions used in this book, 7
Signal strength, Telephony API, 214–215
Silicon Graphics (SGI), and OpenGL, 345
SIM operator name, requesting service information, 214
SimpleAccessProvider application, 63–64
SimpleAppWidgetActivity, 397
SimpleBackup application, 430–435
SimpleBroadcasts application. See Broadcasts
SimpleCursorAdapter
binding data to controls, 50–53
creating search Activity, 423
retrieving content provider data, 64
SimpleDataUpdateService class, App Widgets, 398
SimpleGestures application, 125–129
SimpleIntentService application, 31–33
SimpleInternationalization application. See Internationalizing applications
SimpleLiveWallpaper application, 406
SimpleNetworking application, 164–166
SimpleNotifications application. See Notifications
SimpleOnScaleGestureListener class, multitouch, 130
SimpleOpenGL application. See Graphics, 3D applications
SimpleOrientation application, 135–136
SimplePropertyAnimation application, 337–341
SimpleSearchableActivity, 422–423
SimpleSearchProvider application. See Content providers
SimpleSpeech application, 141–145
SimpleTextInputTypes application. See Textual input methods
SimpleWeb application. See Web APIs
SimpleWebExtension application, 183–187
SimpleWireless application, 238–239
Simultaneous tweened animations, 333
Single-touch gestures
GestureDetector class detecting, 123
overview of, 123
SIP (Session Initiation Protocol), Telephony API, 222–223
Siri speech-recognizing assistant, Apple, 139
Size
calculating App Widget, 394
GCM for Android limits, 272
SQLite limits, 491
Smartphones
audience for, 153
challenges of games for, 154
Fragment-based design for, 152
scaling graphics for, 154
tablets vs., 154
SmartSmoothZoom() method, camera, 197
SMS
applications other than default, 217–218
default messaging application, 215–216
overview of, 216
permissions to send/receive messages, 218
SMS Provider, 217
SoftKeyboard legacy sample application, 117
input using, 115
Speech Recording option, 141–142
text input, 115
obfuscating with ProGuard, 450–452
other antipiracy tips, 453–454
overview of, 449
secure coding practices, 450
using License Verification Library, 452–453
vulnerability of all applications, 449
speak() method, text-to-speech, 147
Speech recognition framework, accessibility, 141–145
SpeechRecognizer class, 141
SQL
executing commands on sqlite3, 490
executing scripts from files with sqlite3, 489
SQLite databases. See also sqlite3 command-line
binding data to application user interface, 48–53
common tasks, 485
content providers. See Content providers
designing persistent databases, 46–48
inserting records, 38
inspecting using ADB shell, 478
storing structured data, 35–36
transactions, 40
SQLite databases, example
altering/updating data in tables, 495
creating tables with AUTOINCREMENT, 492
deleting tables, 497
designing schema, 491
foreign/composite primary keys, 493–494
inserting data into tables, 492–493
overview of, 491
querying multiple tables using JOIN, 495
querying tables for results with SELECT, 493
setting typeface, 492
subqueries for calculated columns, 497
SQLite FTS3 extension, 420
connecting to SQLite database, 486–487
debugging tool for database state, 36
executing SQL commands, 490
finding application database file on device, 36
importing/exporting database and its data, 488–489
inspecting SQLite database via ADB shell, 478
launching ADB shell, 486
other commands, 490
overview of, 486
using ADB shell interface to run, 472
SQLiteDatabase instance, 36, 37
/src folders, Android Studio project, 512
SSID (Service Set Identifier), Wi-Fi state, 247
startActivity() method, 221, 263
startActivityForResult() method, 145, 237
startAngle parameter, arcshape, 321–322
start command, emulator, 472
startDiscovery() method, Bluetooth devices, 238
startDrag() method, drag-and-drop, 134
start() method
drawable animation, 330
property animations, 339
startOffset property, tweened animation, 333
startscan() method, Wi-Fi state, 247
start-server command, ADB server, 470
State
animations with scenes/transitions, 342
permission to access information on phone, 212
Static inner classes, 504
Statistics. See Google Analytics
Status bar
customizing notifications, 86–88
displaying notification queue on, 80–82
notifications displayed on, 77–78
Status, retrieving Android network, 171–173
Stepping through code, Android Studio, 516
Sticky broadcasts, 67
STILL, activity recognition APIs, 261
assigning as wallpaper, 199
camera mode settings, 196
camera parameters, 197
capturing with camera, 192–196
choosing device camera, 199–200
debugging with Chrome DevTools, 187
sharing images, 198
during video sessions, 201
working with multimedia, 191–192
zooming camera, 197
stop command, emulator, 471
stopFaceDetection(), camera, 204
stop() method
drawable animations, 331
playing audio, 205
stopSmooth Zoom() method, camera, 197
Storage
gathering statistics and avoiding, 292
SQLite databases for structured data, 35–36
SQLite limitations for procedures, 491
STREAM_NOTIFICATION, making noise, 86
Stretchable graphic formats, 152
StrictMode
impact on networking code, 164
networking code requiring, 12
responsiveness of applications, 17
L Developer Preview improvements, 462
leveraging inheritance, 109–111
user interface design, 106
submitScore() method, leaderboards, 298
Subqueries, SQLite database, 497
supportsRtl attribute, RTL language localization, 445
@SuppressWarnings option, exceptions with native code, 383
surfaceCreated() method
starting OpenGL ES thread, 349–350
surfaceDestroyed() method, Camera, 193, 195
SurfaceHolder, 193–195, 202–203
SurfaceHolder.Callback, SurfaceView, 348–349
SurfaceView
creating for OpenGL ES, 348–349
enabling OpenGL threads, 362–365
initializing GLS, 352
initializing OpenGL ES, 352
OpenGL ES APIs in Android SDK, 347
starting OpenGL ES thread, 349–350
sweepAngle parameter, arcshape, 321–322
Sweep gradients, 309
Sync adapters, synchronizing data with, 429–430
Synchronizing data
not using backup services for, 430
notifications, L Developer Preview, 463
Synthesized speech, text-to-speech, 145
System images, Android TV, 464–465
System-wide accounts, 428
Tables, SQLite database
adding data, 492
altering/updating data, 495
dumping contents with sqlite3, 488–489
foreign/composite primary keys, 493–494
listing available with sqlite3, 487
querying, 493
querying multiple, 495
Tablets
attracting new types of users, 153
designing flexible user interface, 152
developing applications, 154–155
overview of, 151
using screen space effectively, 153–154
takePicture() method, Camera class, 195, 201
TalkBack application, accessibility, 140
Target Class, application broadcasts, 74
monitoring signal strength/data speed, 214–215
permission to access information, 212
receiving phone calls, 221–222
requesting call state, 212–214
requesting service information, 214
working with phone numbers, 215–216
working with telephony utilities, 211–212
TelephonyManager object, 212–214
Temp variables, unnecessary Java, 501
10-foot experience, Google TV, 157
Ternary operations, Java, 503
Testing
Android Wear, 158
applications for ART, 460
asynchronous code on real devices, 12
backup services, 435
custom locales, 442
Google Play game services, 296
SQL queries with sqlite3, 490
Text
layouts with WebView, 176
measuring screen for, 312
prediction, 118
Text notifications
components, 79
displaying on notification queue, 80–82
expandable and contractible, 88–90
updating, 83
Text-to-speech (TTS) services, accessibility, 145–147
customizing software keyboards, 117–118
overview of, 115
text prediction and user dictionaries, 118
using clipboard framework, 118–119
working with software keyboards, 115–117
Texturing objects, 3D graphics, 359–362
Text view, Android Studio, 514–515
TextView control
building simple styles, 106–109
implementing text-to-speech, 147
parallel execute to update, 14
updating in UI, 13
updating with Thread, 16
working with view animations, 331–332
Themes, user interface design, 111–113
Third-party services
in-app billing APIs, 280
backup services, 430
push messaging services, 275
that use ADB for package installation, 473
Thread class
asynchronous network operations, 168–169
offload processing off main UI thread, 12
Threading and asynchronous processing
Loaders, 16
overview of, 11
StrictMode, 17
ThreadPoolExecutor, 16
Throttling mechanism, Google Cloud Messaging, 272
ThrowNew() method, exceptions with native code, 382–383
TILTING, activity recognition APIs, 262
timeDistanceFactor, single-touch gestures, 129
TimeEvaluator class, property animation, 337
time mode, LogCat logging, 474
tint attribute, drawable resources at runtime, 462
Title text, notifications, 79, 90
Toast messages, 24
ToDegrees property, rotating transformations, 335
toggleFPSDisplay() method, OpenGL/application threads, 365
Touch mode, listening for changes, 119–120
toXDelta, fromYDelta values, 336
toXScale, toYScale values, 335–336
Tracking ID, Google account for Analytics, 284
TransactionBuilder class, 290–292
Transactions, SQLite application databases, 40
Transformations, animation, 333
TransitionManager, 342
Transitions, state animations with, 342
TranslateAnimation class, 336
Translation services, internationalizing applications, 445
Transparency, alpha transformations, 334–335
Trial editions, preventing application piracy with free, 454
Triggers
creating SQLite database, 37–38
SQLite limitations, 491
True north, finding, 230
try/catch block, SQLite database transactions, 40
TTS (text-to-speech) services, accessibility, 145–147
Turn-based multiplayer APIs, Google Play game services, 299
TV
attracting new types of users, 153
overview of, 151
using screen space effectively, 153–154
Tweened animations. See View (tweened) animations
TYPE_ALARM, system events, 208
TYPE_NOTIFICATION, 208
TYPE_ORIENTATION sensor value, 230
UI thread
moving network operations off main, 167–171
offload processing of main, 12
Unary operations, Java, 502
unbindService() method, remote interface, 27–28
Uninstallation, of applications using ADB, 473
uninstall command, 473
UNKNOWN, activity recognition APIs, 262
updateAppWidget() method, 398
update() method
building content provider, 59–60
records in SQLite database, 38–39
updatePeriodMillis attribute, App Widgets, 394
Updates
Android Studio versions, 507
antipiracy tips, 453
content provider, 62
data in SQLite database tables, 495
global search, 425
UriMatcher class, 57, 58–59, 419
URIs
building content provider, 56
enabling search suggestions, 419
URLUtil class, WebKit API, 182
UsbAccessory object, 240
Use case. See Extending Android application reach
backup service. See Backup service
managing with Account Manager, 427–428
multiple users, restricted profiles and, 428–429
overview of, 427
User dictionaries, 118
accessibility with alternative, 140
fine-tuned control over, 116
gestures. See Gestures
screen orientation changes, 134–136
speech recognition services, 141–145
action bars. See Action bars
binding data to application, 48–53
challenges of games, 154
contextual action mode, 105–106
creating devices with flexible, 152
overview of, 97
quiz Q & A, 113
state animations with scenes/transitions, 342
UserDictionary content provider, 118
Users
attracting to new types of devices, 153
designing notifications, 77–79, 91–92
with disabilities. See Accessible applications
L Developer Preview improvements for, 461–464
protecting privacy when collecting statistics, 293
Users overview reports, Google Analytics, 288
<uses-feature> manifest tag
configuring Android Beam, 244–245
configuring for Open GL ES 2.0, 369
configuring sensors, 227
declaring Bluetooth, 237
declaring device features, 152
improving performance with Android NDK, 384
OpenGL ES device compatibility, 346–347
requesting CAMERA permissions, 192
using GPS, 254
<uses-sdk> manifest tag
configuring for Open GL ES 2.0, 384
creating Android NDK Project, 380
creating live wallpaper, 407
improving graphics performance, 380
Validation, parsing XML, 167
ValueAnimator class, property animation, 337
valueFrom attribute, property animation, 338–339
valueTo attribute, property animation, 338–339
valueType attribute, property animation, 338
Variables, unnecessary Java temp, 501
Verbose logging, 478
Versions
Android SDK OpenGL ES, 346
Android Studio updates, 507
devices running Android NDK, 377–378
preventing application piracy by blocking old, 453–454
Vertex buffer, drawing vertices, 353–355
Vertices
Vibration, phone notifications, 83
Video
view.accessibility package, 140
View attribute values, 106
View controls
accessibility, 140
detecting user motion, 123–124
hardware acceleration, 325–326
varying for animation, 331
ViewGroup, scene state transitions, 342
View hierarchies, RemoteViews, 396
View objects
contextual action mode, 105
making styles, 111
Viewport, OpenGL ES, 352
ViewPropertyAnimator class, 337, 340
interacting with OpenGL ES and Android, 362–365
SQLite limitations, 491
ViewTreeObserver class, 120–121
alpha transparency transformations, 334–335
defined, 329
defining as XML resources, 332–333
defining programmatically, 333
defining simultaneous/sequential, 333
loading, 334
moving transformations, 336
rotating transformations, 335
scaling transformations, 335–336
View widgets, L Developer Preview, 462–463
Voice search, enabling, 420
Vulnerabilities, software piracy protection, 450
Wallpaper
WallpaperManager class, 192, 199
WallpaperService class, 404–408
<wallpaper> XML tag, 406
Wearables
attracting new types of users, 153
developing applications, 158–159
browsing with WebView. See WebView control
building web extensions, 182–187
debugging WebViews, 187
overview of, 175
working with Adobe AIR and Flash, 187–188
WebBackForwardList class, WebKit API, 182
WebChromeClient class, 179–181, 183–184
WebHistoryItem class, WebKit API, 182
WebKit rendering engine, 175, 182
WebSettings class, WebView, 178–179
WebViewClient class, 179
adding browser chrome, 179–181
adding features, 178
building web extensions, 182–187
designing layout, 176
WHERE clause
executing simple queries, 43–44
update() method, 38
Wi-Fi
overview of, 245
WifiP2pManager class, 246
Wildcards, enabling search, 419–420
World Magnetic Model, 230
writeToParcel() method, Parcelable class, 29
wtf error, filtering log events, 475
XML
creating search configuration, 417–420
defining property animation, 337–339
defining shape drawables, 315–316
defining tweened animations, 332–333
editor, in Android Studio text view, 514–515
XMLPullParser()method, 166–167
XMPP, 275
Zoom
camera settings, 197
modifying WebView control, 178
3.145.103.16