Index

Symbols

> (closing bracket), 133

… (ellipses), 175

| (or) operator, 130, 176

A

AbsoluteLayout class, 53

abstract class, 185

access control, 230

access point, Wi-Fi, 258

accessibility, 109

Account activity, 48

AccountFragment element, 7072

ACL (Android Compatibility Language), 66

Action Bar

basic description of, 2122

placing menu item on, 62

Active activity state, 77

activity

affinity, 87

basic description of, 2021, 4647

coordinating, 80

declaring in AndroidManifest.xml file, 4950

differentiating by theme use, 181

event listener, 5455

fl ow of, 4748

handling user interaction in, 5859

implementing, 50

invocation message, 50

layout, embedding fragment in, 6873

life cycle, 7680

map, 253

menu linked to, 60

persistent activity state, 79, 83

stacked, 86

starting, 8082

state, 77

step implemented by, 21

switching between, 21

task to manage behavior of, 8587

transient state, 8385

transition, 77, 79

UI implementation, 5056

view, 116

Activity base class, 50

Activity Manager, 18

Address class, 265

address, e-mail, 268269

ADT (Android Development Tools) plug-in

functionality, 3233

installation, 3334

affinity, 87

AIDL-supporting service, 87

alignment, widget, 150152

alpha channel, 160

Amazon Appstore for Android

cloud-based service, 339

legal relationship with, 338339

sign-up process, 338

Amazon SNS (Amazon Simple Notifications Service), 339

Amazon S3 (Amazon Simple Storage), 339

Amazon SQS (Simple Queue Service), 339

Amazon Web Service (AWS), 339

Android application. See application

Android Application Framework. See also framework

Action Bar, 2122

application, 20

Android Application Model

activity, 2021

App Widget, 20

basic description of, 1920

content provider, 22

context object, 24

file, 22

fragment, 21

how this book is organized, 35

incorporating design into, 197

intent and intent filter, 23

menus, 2122

resource, 23

services, 20

Shared Preferences, 22

task, 24

views, 21

Android Compatibility Language (ACL), 66

Android Developer Guide, 314

Android Developers home page, 346347

Android Development Tools (ADT) plug-in

functionality, 3233

installation, 3334

Android Market. See also marketing

browsing the, 329

developer account, 330331

Developer Console, 333334

Developer Distribution agreement, 335336

distribution of platforms, 106

home page, 328329

license agreement, 334337

Market app, 328329

merchant account, 332333

preparing application for, 321328

publishing on, 328330

registration fee, 331

uploading application, 337338

website, 328

Android 1.5 (Cupcake) version, 108

Android 1.6 (Donut) version, 108109

Android platform

cost, 12

development benefits, 1213

reusable capabilities, 12

Android runtime

basic description of, 15

system architecture, 18

Android SDK and AVD Manager, 304, 306

Android SDK Components. See also SDK

download and installation, 3132

widget, 50

Android SDK Starter Package, 3132. See also SDK

Android security model, 232237

Android system architecture. See system architecture

Android 3.0 (Honeycomb) version, 111

Android 2.0 (Eclair) version, 109

Android 2.2 (Froyo) version, 110

Android 2.3 (Gingerbread) version, 110111

AndroidManifest.xml file

basic description of, 45

declaring activity in, 4950

android.view package, 50

Angry Birds application (Rovio Mobile Ltd.), 355357

API (Application Programming Interface)

deprecated method/class, 112

levels, 103, 106107, 112113

testing framework, 319

APK (application package), 326

app. See application

App Widget

defined, 46

versus generic widget, 20

AppAlarm LITE application (episode6), 361362

AppBrain marketplace, 321, 339

application

Android 1.6 version, 109

Android 2.0 version, 109

Android 2.2 version, 110

Android 2.3 version, 110

Android 3.0 version, 111

basic description of, 15, 20

core, 4

debugging, 306309

defined, 46

development guideline, 154155

driving customer to, 341

ease of use, 115

embedding browser in, 246248

familiarity with, 43

fee versus free, 340

forward compatible, 108

globalizing, 324325

high level design, 2425

Home, 20, 46

incorporating web page into, 262

Landscape mode, 6671

launching browser from, 244246

with limited capabilities, 325326

naming, 323324

object-oriented design, 186

optimization, 213215

Portrait mode, 6667, 6973

preferences, 6364

responsiveness, 222225

runtime, 15

sharing data across, 9598

signing, 326327

testing, 322323

tracking, 306309

unauthorized, 233

uploading to Android Market, 337338

versioning, 323324

application framework, 15

application model. See Android Application Model

application package (APK), 326

Application Programming Interface. See API

assert statement, 313

assets element, 45

attribute

height, 128

preference, 64

RelativeLayout class, 149150

TextView class, 175176

View class, 175

width, 128

audio

background music, 8790

capturing and playing, 273279

filename, 278

loading, 273

MediaPlayer class, 278279

playback, 274, 277

recorder application, 276277

recording, 274, 276

SDK components, 294

service, 277

Start Audio button, 274

state, 278

Stop Audio button, 274

Audio activity, 90

audioFileURI file, 275

audit trail, 230

authentication, 230

AWS (Amazon Web Service), 339

B

background image, 133134

backup, 240

backward compatible SDK, 113

base class, 119

battery life, 219222

Bentley, Jon

rules for writing efficient programs, 215

“bind” variable, 238

bitmap, 284285

BitMapFactory class, 285, 294

Bluetooth technology, 228, 245

border, 172173

bottom constant, 129

bound service, 87

branding restriction, 337

broadcast, 233

browser

embedding in application, 246248

launching from application, 244246

built-in style, 178179

built-in widget, 157159

Bundle class, 84

Burd, Barry

Java For Dummies, 5th Edition, 3

button

basic behaviors, 166167

border, 172173

click, 166167

code-based GUI control, 163166

color, 160

custom, 169174

drawable resource, 161

hint attribute, 163

with image, 161

logic, 167169

push, 159161

size, 160

spacing, 161162

state, 166168

text font and type face, 161

View class hierarchy, 117

width, 160

Button class

button specification, 53

image, 161

methods, 121

size and color, 160

text, 119

C

C library, 15

C++ library, 15

calculator layout, 139

camcorder application, 282

camera application, 284

Camera class, 294

Canvas class, 172

caption, 153

Cardio Trainer (WorkSmart Labs, Inc.), 364365

cell tower, 258

cellphone ownership level, 9

center constant, 129

center_horizontal constant, 129

center_vertical constant, 129

channeling the outside world, 243

checkLogin() method, 95

Checkout Merchant agreement (Google), 336337

child controls, 123

Christensen, Clayton

disruptive innovation theory, 341

class

AbsoluteLayout, 53

abstract, 185

Activity, 50

Address, 265

assigning responsibilities to, 192

base, 119

BitMapFactory, 285, 294

Bundle, 84

Button, 119, 121, 160161

Camera, 294

Canvas, 172

concrete, 185

ConnectivityManager, 261

Criteria, 265

DatabaseHelper, 94

extracting and defining, 187, 192

FrameLayout, 53, 152153

GameLogic, 167169

GeoLocation, 221, 254, 258

GeoPoint, 262

GLSurfaceView, 157

helper, 119

ImageView, 282284

instance, 124

layout, 119

LayoutParams, 128

LinearLayout, 52, 125, 127128, 137139

Location, 264

LocationManager, 264265

MapActivity, 253, 263

MapClass, 249

MapController, 263

MapView, 250253, 263

MarginLayoutParams, 128

MediaPlayer, 89, 278279, 294

MediaRecorder, 294

MediaStore, 294

missing, 193194

object of the, 192

object-oriented design, 185

PowerManager, 226

PreferenceManager, 65

R, 53

RelativeLayout, 148152

RSSurfaceView, 157

scenarios to discover, 193194

SensorEvent, 295

SensorManager, 287, 294295

SMS Manager, 271

subclass, 185

superclass, 185, 187

TableLayout, 139148

TableRows, 140, 142

VideoView, 279, 282

view, 122123

View, 50, 53, 5557, 116122, 175

ViewGroup, 50, 53, 122123

WebView, 246248, 262

class attribute, 69

CLI (command line interface), 27

click, button, 166167

clip_horizontal constant, 129

clip_vertical constant, 129

closing bracket (>), 133

cloud-based service, 339

cmd (Windows), 27

code example, 2

code optimization, 215219

Code site directory (Google), 349350

coding practices, 214215

collaborator

object-oriented design, 186

scenarios to discover, 192194

color

alpha channel, 160

button, 160

gradient, 171

style, 178

text, 135136

transparency, 160

column, table, 97, 141148

Columns string array, 97

combo box, 159

command line interface (CLI), 27

communication

Android 1.5 version, 108

Android 1.6 version, 109

Android 2.0 version, 109

Android 2.2 version, 110

Android 2.3 version, 110

Android 3.0 version, 111

compromise, design, 206207

computation, 219

concrete class, 185

connectivity

Internet, 260

location-based service, 260261

ConnectivityManager class, 261

Console window (Eclipse IDE), 306307

contact display layout, 125126

Contacts element, 60

ContactsView activity, 9699

content provider

Android Application Model, 22

basic description of, 18

sharing data across applications through, 9598

Context menu, 22, 6162

context object, 24

context-based service, 249

controller component, 200201

coordinate, map, 254256

copy protection, 337

core application, 4

cost, Android platform, 12

Created activity state, 77

Criteria class, 265

Cupcake (Android 1.5) version, 108

cursor, 96

custom button, 169174

CVS version control system, 299

D

D (Debug) priority message, 308

Dalvik Debug Monitor Server (DDMS) perspective, 309310

Dalvik Virtual Machine, 18

data entry

Android 1.5 version, 108

Android 2.0 version, 109

Android 2.2 version, 110

masked, 240

data integrity, 230

data service, minimizing, 220221

data storage, 213

database record, 9495

DatabaseHelper class, 94

DDMS (Dalvik Debug Monitor Server) perspective, 309310

Debug (D) priority message, 308

debugging

application, 306309

setting up, 3940

Debugging perspective (Eclipse IDE), 303304

decompiled source code, 231

default.properties file, 45

deleting resource, 134

density independent pixel (dp), 105

density, screen, 104

deprecated method/class, 112

design

best practice, 183189

compromise, 206207

controller component, 200201

incorporating into Android Application Model, 197

inversion of control, 189

model component, 197199

multiple level, 212213

MVC pattern, 188, 197

object-oriented, 184187

pattern, 188

quality requirements, 211212

Singleton pattern, 203

software framework, 189

support data structure, 202206

view component, 201202

Design Patterns: Elements of Reusable Object-Oriented Software (Gamma, Helm, Johnson, Vlissides), 188

detection security role, 231

developer

framework-based guidance for, 12

resource, 345

developer account (Android Market), 330331

Developer Console (Android Market), 333334

Developer Distribution agreement (Android Market), 335336

development environment

setup, 2734

verifying, 3437

development guideline, 154155

development resource

Android development, 346347

how to get started, 354

technology, 352353

web, 348352

Device Choose dialog box, 40

Devices view (Eclipse tool), 215217

display characteristic, 104105

disruptive innovation theory (Christensen), 341

distance computation, 265

Donut (Android 1.6) version, 108109

dp (density independent pixel), 105

dpi (dots per inch), 105, 134

drawable component, 45, 141

drawable resource, 161

E

E (Error) priority message, 308

Eclair (Android 2.0) version, 109

Eclipse IDE

adding resource within, 134

ADT plug-in, 3234

Android SDK and AVD Manager, 304, 306

Console window, 306307

customization, 304

DDMS perspective, 309310

Debug priority message, 308

Debugging perspective, 303304

Devices view, 215217

Error priority message, 308

Fatal priority message, 308

functionality, 300301

Hello World Android test program, 3536

Info priority message, 308

Install directory, 29

Java Browsing perspective, 302

Java perspective, 302

Java Type Hierarchy perspective, 303

logcat window, 307308

message priority, 308

as most used IDE, 299

New Project Wizard, 304305

profiling tools, 215219

project, 300

refactoring tools, 135136

Resource perspective, 30, 301, 304

resource relationship, 300

setup, 2930

Silent priority message, 308

support, 300

Traceview profiler, 217

Verbose priority message, 308

Warning priority message, 308

workspace, 300

EditText element, 52

ellipses (…), 175

e-mail

address, 268270

client, 268

SDK components, 293294

send message, 268269

SMS text message, 270271, 273, 293294

embedded map, 327

emulator

creating, 3435

running on an, 3839

sensor on, 288

encapsulation, 185

encryption, 230, 239

Enterprise Java (J2EE) project, 301

environmental distraction, mobile device security, 229

error code, 195

Error (E) priority message, 308

event

event listener, 5455

sensor, 287, 295

Evernote application (Evernote Corporation), 363364

Exit element, 60

Export Android Application Wizard, 327

Extensible Messaging and Presence Protocol (XMPP) Manager, 19

external file storage, 9293

external service, 87

F

F (Fatal) priority message, 308

failed unit test, 316317

fast application. See optimization

fee versus free application, 340

file

external storage, 22, 9293

internal storage, 92

saving persistent data with, 9293

fill constant, 129

fill_horizontal constant, 129

fill_vertical constant, 129

finish() method, 79

fl oating menu, 61

font, 135136, 161

footprint, 239

forward compatible application, 108

fragment

basic description of, 21

class attribute, 69

embedding in activity layout, 6873

implementation, 7374

incorporating into activity behavior, 7476

life cycle, 67

multi-pane user interface, 66

reference to the view of, 74

reuse, 67

user interface representation, 6566

fragment manager

basic description of, 18

getFragmentManager() method, 76

FrameLayout class, 53, 152153

framework

Android system architecture, 1819

components, 1819

software, 189

framework-based guidance, 1315

FreeType library, 17

Froyo (Android 2.2) version, 110

G

GameLogic class, 167169

GameOptions activity, 48

Gamma, Erich

Design Patterns: Elements of Reusable Object-Oriented Software, 188

garbage collector, 285

gen element, 44

GeoLocation class, 221, 254, 258

GeoPoint class, 262

getBoolean() method, 65

getContacts() method, 9697

getFragmentManager() method, 76

getIntent() method, 80

GetJar marketplace, 321, 339340

getString() method, 65

getter method, 214

Gingerbread (Android 2.3) version, 110111

Gizmodo blog, 353

globalizing application, 324325

GLSurfaceView class, 157

Google

Android Developers home page, 346347

Android Market ownership, 322

API library, 250

Checkout, 332333

Checkout Merchant agreement, 336337

Code site directory, 349350

Groups, 350351

I/O sessions, 347348

market share, 321322

Places application, 368369

Search page, 354

ToS (Terms of Service), 334

GPS location-finding service, 257258

gradient, 171

graphics, 214

gravity and weight, 128

guideline, development, 154

H

hardware, 16

hash table, 291

height

attribute, 128

unit specification, 127

Hello World Android test program, 3536

Helm, Richard

Design Patterns: Elements of Reusable Object-Oriented Software, 188

Help element

identifier, 60

stacked activity, 86

helper class, 119

Helton, Johennie

Java Security Solutions, 239

Helton, Rich

Java Security Solutions, 239

hierarchy

sample program, 37

View class, 117122

high level design, 2425

high quality app, 12

hint attribute, 136, 163

Home application

basic description of, 20

Home screen, 46

Home screen widget, 46

Honeycomb (Android 3.0) version, 111

horizontal orientation

application development guideline, 154

LinearLayout class, 128

widget alignment, 150152

HorizontalScrollView element, 53

HTTP (Hypertext Transfer Protocol), 245

I

I (Info) priority message, 308

icon, how this book is organized, 5

id attribute, 133

IDE (integrated development environment)

basic description of, 27

Java, 299

if statement, 75

image

adding to background view, 133134

button with, 161

displaying and capturing, 282285

image-handling functionality, 283

ImageView class, 282284

implementation

fragment, 7374

menu, 5960

nonfunctional requirements, 212

service, 8790

indentation, 133

inflater class, 74

Info (I) priority message, 308

inheritance, 177178

injection attack, SQLite database, 237238

inner class, 94

Install directory (Eclipse IDE), 29

installation

ADT plug-in, 3334

Android SDK Components, 3132

Android SDK Starter Package, 3132

instance, 192

integrated development environment (IDE)

basic description of, 27

Java, 299

intent

basic description of, 23

getIntent() method, 80

security, 240

send e-mail, 23

standard, 8082

starting activity with, 8082

target component and action, 8182

intent filter

basic description of, 23

security, 240

starting activity with, 8082

<intent-filter> element, 50

interactive component, 50

internal file storage, 92

internationalization, 115

Internet connection, 260

inversion of control, 189

I/O session (Google), 347348

“is a” test, 187

isFinishing() method, 79

J

jarsigner Java tool, 327

Java

Android platform benefits, 12

code-based GUI control, 163166

jarsigner tool, 327

keytool tool, 327

setup, 2829

version, 28

zipalign tool, 327

Java All-in-One For Dummies, 3rd Edition (Lowe), 3

Java Browsing perspective (Eclipse IDE), 302

Java Development Kit (JDK), 2829

Java For Dummies, 5th Edition (Burd), 3

Java IDE, 299

Java JUnit framework, 311

Java perspective (Eclipse IDE), 302

Java Runtime Engine, 18

Java Runtime Environment (JRE), 28

Java Security Solutions (Helton), 239

Java Swing toolkit, 117

Java Type Hierarchy perspective (Eclipse IDE), 303

Java virtual machine (JVM), 215

JavaScript Object Notation (JSON) transfer, 255256

JDK (Java Development Kit), 2829

Johnson, Ralph

Design Patterns: Elements of Reusable Object-Oriented Software, 188

JRE (Java Runtime Environment), 28

JSON (JavaScript Object Notation) format, 255256

J2EE (Enterprise Java) project, 301

JVM (Java virtual machine), 215

K

kernel, Linux, 14

keystore, 326327

keytool Java tool, 327

L

LAN (local-area network), 245

Landscape mode, 6671

language, 325326

latitude, 255, 262, 264265

layout

AbsoluteLayout class, 53

calculator, 139

child controls, 123

classes, 119

contact display, 125126

effective use of, 124

FrameLayout class, 152153

height specification, 127

layoutopt command-line tool, 154

LinearLayout class, 125, 127128, 137139

LinearLayout.LayoutParams class, 128130, 132

MarginLayoutParams class, 128

RelativeLayout class, 148152

selection, 153155

style, 176177

TableLayout class, 139148

view, 5153, 122123

width specification, 127

layout component, 45

layoutopt command-line tool, 154

LayoutParams class, 128

least privilege principle, 239

left constant, 129

level, API

backward compatibility, 113

deprecated element, 112

identifier, 107

minimum-level, 112

SDK release, 103, 106107

libc native library, 17

library

basic description of, 15

C, 15

C++, 15

FreeType, 17

Google API, 250

libc native, 17

Media Framework, 17

OpenGL/ES, 17

SGL, 17

SSL, 17

system architecture, 17

library-implemented code, 215

license agreement

branding restriction, 337

Developer Distribution agreement, 335336

Google Checkout Merchant agreement, 336337

importance of, 334

Terms of Service, 334

life cycle

activity, 7680

fragment, 67

service, 295

limited capabilities, 325326

LinearLayout class

customized view, 137138

elements, 5253

layout height and width, 127

layouts, 139

orientation tag, 128

sequential set of widgets, 125

LinearLayout.LayoutParams class, 128130, 132

Linux kernel, 14

Linux operating system, 1617

Linux shell, 27

listing sensor, 286288

local service

basic description of, 87

implementation, 88

minimizing, 221222

local-area network (LAN), 245

Location class, 264

Location Manager, 18

location-based service. See also map

accuracy, 258

cell tower, 258

components, 249

connectivity, 260261

GPS service, 257258

location update register, 258259

SDK components, 261265

service change, 259

Wi-Fi access point, 258

LocationManager class, 264265

log file, 240

logcat window, 292, 307308

logging framework, 318

logic, button, 167169

Login activity

checkLogin() method, 95

layout file, 5152

user behavior, 48

long pause behavior, 155

longitude, 255, 262, 264265

Lowe, Doug (Java All-in-One For Dummies, 3rd Edition), 3

M

Mac OS X operating system, 27

main thread, 225

malware, 228

map. See also location-based service

activity, 253

address, 265

coordinate, 254256

displaying a, 251254

distance computation, 265

embedded, 327

geocoding web service and navigation, 254256

GeoLocation class, 254, 258

GeoPoint class, 262

Google API library, 250

installing development components for writing, 250

latitude and longitude, 255, 262, 264265

map key, 250, 252, 263

markers and overlays, 264

microdegrees, 255

REST-based web service, 255

route, 264

SDK components, 261265

street and satellite view, 263

tile, 263

timestamp, 264

zoom level, 255

MapActivity class, 253, 263

MapClass class, 249

MapController class, 263

MapView class, 250253, 263

margin, 128130, 142

MarginLayoutParams class, 128

Market app (Android Market), 328329

market share, 321

marketing. See also Android Market

Amazon Appstore for Android, 338339

AppBrain marketplace, 321, 339

fee versus free application, 340

GetJar marketplace, 321, 339340

name, 324

responsiveness to customer request technique, 341

versioning application for, 323

masked data entry, 240

match_parent constant, 127

Media Framework library, 17

MediaPlayer class, 89, 278279, 294

MediaRecorder class, 294

MediaStore class, 294

menu

Android Application Model, 2122

Context, 22, 6162

fl oating, 61

implementation, 5960

launching, 61

linked to activity, 60

Options, 59, 61

overloaded, 154

placing on Action Bar, 62

sub-menu, 6162

menu component, 45

menu.xml file, 60, 62

merchant account (Android Market), 332333

message priority (Eclipse IDE), 308

method

Button class, 121

delayed callback to, 224

getter, 214

setter, 198, 214

signature, 187, 195197

TextView class, 119121

microdegrees, 255

minimizing computation, 219

mitigation security role, 231

mobile application, 1

mobile device

device unavailability, 11

security, 227229

written application issues, 1011

model component, 197199

model-view-controller (MVC) design pattern, 188, 197

monitoring sensor, 286288

Moore, Geoffrey

project start-up success, 341

motion event, 314

multimedia

Android 1.5 version, 108

Android 1.6 version, 109

Android 2.0 version, 109

Android 2.3 version, 111

multi-pane user interface, 66

music, 8790

MVC (model-view-controller) design pattern, 188, 19

N

name

application, 323324

marketing, 324

name attribute, 49

name-value pair of preference, 64, 91

network

basics, 245

local-area network, 245

protocol, 245

unreliability, 11

wide-area network, 245

New Project Wizard, 304305

NFR (nonfunctional requirements), 211212

noise, sensor, 290

non-repudiation, 230

Notification Manager, 18

noun

better fit of defining, 186187

candidate object and class, 190

merge, remove, and refine into class, 191

O

object-oriented design

abstract and concrete class, 185

application element, 186

class, 185

collaborator, 186

extracting and defining objects, 186187

idea behind, 184

object, 185

requirements analysis, 186

subclass, 185

type, 185

unnecessary object avoidance, 214

write-up, 186

older device compatibility, 180181

onAccuracyChange() method, 295

onClick method, 5455

onContextItemSelected() method, 60

onCreate() method, 54, 77

onCreateContextMenu() method, 60

onCreateOptionsMenu() method, 60

onCreateView() method, 74

onDestroy() method, 79

onDraw() method, 105, 172173

onOptionsItemSelected() method, 60

onPause() method, 79

onRestart() method, 79

onRestoreInstanceState() method, 8384

onResume() method, 77

onSaveInstanceState() method, 8385

onSensoryChange() method, 295

onStart() method, 77

onStop() method, 79

ontouchEvent method, 57

open platform, 12

OpenGL/ES library, 17

operating system. See OS

optimization

application performance, 213215

application responsiveness, 222225

battery life, 219222

code, 215219

coding practices, 214215

library-implemented code, 215

minimizing computation, 219

minimizing data service, 220221

minimizing location service, 221222

multiple level design, 212213

nonfunctional requirements, 211212

power management concept, 226

profiling, 215219

programming language, 213

requirements-driven architectural decisions, 213214

thread model and components, 225226

Options menu, 59, 61

or (|) operator, 130, 176

orientation tag, 128

OS (operating system)

Linux, 1617

Mac OS X, 27

privilege-separated, 231

Windows, 27

P

Package Manager, 19

package name, 323324

padding, 152

Pandora application (Pandora Internet Radio), 358360

passed unit test, 316317

password protection, 229, 239

pattern, design, 188, 203

Paused activity state, 77

permission

approving and rejecting, 233235

enforcing, 233

self-signing certificate, 233

permissions request, 326

persistent activity state, 79, 83

persistent data

Shared Preferences to save, 9192

sharing data across applications, 9598

SQLite to save, 9396

writing to file to save, 9293

perspective, Eclipse IDE, 301303

phishing, 228

phone call, 272273, 293294

phone contacts, 9598

pixel, 105, 168

Places application (Google Inc.), 368369

playback, audio, 274, 277

Portrait mode, 6667, 6973

power management concepts, 226

PowerManager class, 226

PreferenceManager class, 65

preferences

application, 6364

attribute, 64

default value, 64

description, 64

display form, 64

methods to read, 65

name-value pair, 64, 91

private class, 94

privilege model, 232

privilege-separated operating system, 231

profiling, 215219

programming language, 213

project

Eclipse IDE, 300

nature, 301

project start-up success (Moore), 341

protocol, 245

publishing on Android Market, 328330

push button, 159161

Q

quality requirements, 211212

R

R class, 53

random delay, 224

range, sensor, 290

RDBMS relational database, 93

record

database, 9495

requesting from cursor, 96

recording audio, 274, 276

recovery security role, 231

refactoring tools (Eclipse IDE), 135136

region code, 325

registration fee (Android Market), 331

RelativeLayout class

attributes, 149150

horizontal and vertical alignment, 150152

tutorial example, 148

remote service

application performance, 214

basic description of, 87

implementation, 88

starting and terminating, 89

reordering resource, 134

representational state transfer (REST-based) web service, 255

requirements analysis, 186

requirements-drive architectural decisions, 213214

res element, 45

resistance security role, 230

resolution

screen, 105

sensor, 290

resource. See also developer resource

adding, 134

adding within Eclipse IDE, 134

Android Application Model, 23

defined, 45

deleting, 134

Eclipse IDE, 300

reordering, 134

Resource perspective (Eclipse IDE), 30, 301, 304

responsibilities, 192

responsiveness to customer request technique, 341

REST-based (representational state transfer) web service, 255

reuse

Android platform benefits, 12

fragment, 67

intermediate results in variables, 214

right constant, 129

route, map, 264

row, table, 98, 140141, 143

RPC service, 87

RSSurfaceView class, 157

rule for writing efficient programs (Bentley), 215

RunKeeper application (FitnessKeeper Inc.), 365366

runtime

Android system architecture, 18

basic description of, 15

S

S (Silent) priority message, 308

sales tax, 337

sample program

creating and running, 3536

hierarchy of, 37

sandbox, 232

satellite view, 263

scaled pixel unit, 168

screen

density, 104

display characteristic, 104105

limited screen size, 229

resolution, 105

size, 104

scroll bounds, 120

scrolled text, 120

scrolling, 154

Scrollview element, 52

SDK (Software Development Kit)

API levels, 103, 106107, 112113

backward compatible, 113

hardware capability, 267

location-based service and map components, 261265

media components, 294

sensor components, 294295

service components, 295

version, 103104, 106, 108

XML relationship, 128

search, Android 1.6 version, 109

Search page (Google), 354

security

access control, 230

Android security model, 232237

audit trail, 230

authentication, 230

backup, 240

data integrity, 230

decompiled source code, 231

detection role, 231

encryption, 230, 239

footprint, 239

importance of, 227228

intent and intent filter, 240

least privilege principle, 239

log file, 240

mitigation role, 231

mobile device, 227229

non-repudiation, 230

password protection, 229

privilege model, 232

recovery role, 231

resistance role, 230

risk assessment, 228, 232

self-signing certificate, 233

sensitive information, 239

special password, 239

SQLite database, 237238

theft, 227

threat model, 230232

unauthorized and malicious software, 232

unauthorized invocation, 233

Wi-Fitechnology, 228

self-signing certificate, 233

send e-mail intent, 23

sensor

debug log, 289

defined, 286

on emulator, 288

event, 287, 295

listing and monitoring, 286288

modality, 291

noise, 290

range, 290

receiving sensed values, 289292

resolution, 290

SDK components, 294295

sensor manager, 289

SensorEvent class, 295

SensorEventListener interface, 295

SensorManager class, 287, 294295

Sensors.java file, 286

service

AIDL-supporting, 87

audio, 277

basic description of, 20

context-based, 249

defined, 46

implementation, 8790

life cycle, 295

local, 8788

remote, 8788

SDK components, 295

starting, 89

versus thread, 89

Session Initiation Protocol (SIP), 294

setter method, 198, 214

Settings element, 60

settings.xml file, 65

setup

development environment, 2734

Eclipse IDE, 2930

Java, 2829

SGL library, 17

shared data

through content provider, 9598

uses for, 95

using file system, 9697

Shared Preferences

Android Application Model, 22

using to save persistent data, 9192

shrinkable column, 144145

sidebar information, 2

signature

input parameter and output result, 187

method, 195197

signing application, 326327

Silent (S) priority message, 308

Simple Queue Service (Amazon SQS), 339

Singleton pattern, 203

SIP (Session Initiation Protocol), 294

size

button, 160

screen, 104

small keyboard, 10

small screen, 154

smartphone

current ownership level, 9

writing applications on, 10

SMS Manager class, 271

SMS text message, 270271, 273, 293294

Software Development Kit. See SDK

software framework, 189

Speckboy Design Magazine, 348349

SplashScreen activity, 48

spyware, 228

SQLite database

basic description of, 17

injection attack, 237238

saving persistent data with, 9396

security, 237238

src element, 44

SSL library, 17

Stack Overfl ow site, 351352

stacked activity, 86

standard intent, 8082

Start Audio button, 274

StartService() method, 89

state

audio, 278

button, 166168

transient, 8385

static constant, 215

static variable, 219

Stop Audio button, 274

Stopped activity state, 77

storage

application performance, 213

written application issues, 11

street view, 263

stretched column, 146147, 178

string, 135

String variable, 85

strings.xml file, 135136

style

adding inheritance to, 177178

attribute settings, 175176

built-in, 178179

color, 178

layout, 176177

themes to maintain, 179181

subclass, 185

sub-menu, 6162

Sudoku Free application (Genina.com), 357358

superclass, 185, 187

support data structure, 202206

Surface Manager window manager, 17

SVN version control system, 299

symbol, 195

system and performance

Android 2.0 version, 109

Android 2.2 version, 110

Android 3.0 version, 111

system architecture

components, 1415

framework, 1819

hardware, 16

Linux operating system, 1617

native library, 17

runtime, 18

T

table

basic structure, 138, 140141

column, 97, 141148

non table row element, 142

row, 98, 140141, 143

TableLayout class, 139148

TableRows class, 140, 143

TalkAndroid site, 353

tap, 155

task

activity behavior, 8587

basic description of, 24

TCP/IP protocol, 245

teardown() method, 313

technology resource, 352353

telephone call, 272273, 293294

Telephony Manager, 19

Terminal application (Mac OS X), 27

Terms of Service (ToS), 334

testing

application, 322323

user interface operations, 314315

testing framework

API, 319

assert statement, 313

base testing class, 319

basic description of, 310311

failed unit test, 316317

Java JUnit framework, 311

link, 319

motion event, 314

passed unit test, 316317

special considerations, 319

test method, 311

test project creation, 311312

test target class, 313

thread, 314316

testPrecondition() method, 303, 312

testUI() method, 312315

testUIThreadTest() method, 312315

text

color, 135136

font, 161

scrolled, 120

size, 136

text message, 270271, 273

TextView class

attribute, 175176

hierarchy, 117

methods, 119121

string description, 52

theft, 227

theme

differentiating activity by using, 181

older device compatibility, 180181

style, 179181

thread

application responsiveness, 223224

location-based service connection, 261

main, 225

versus service, 89

testing framework, 314316

user interface, 225

threat model, 230232

Tic-Tac-Toe application example

activity fl ow, 4748

controller component, 200201

debugging, 3940

design decisions and compromises made in, 206207

developing the, 4546

importing, 3839

model component, 197199

push button, 161169

sample sequence, 1314

splash screen, 4041

support data structure, 202206

view component, 201202

tile, map, 263

timestamp, 264

top constant, 129

ToS (Terms of Service), 334

touchscreen data entry issues, 10

Traceview profiler, 217

tracking application, 306309

transient state, activity, 8385

transition, activity, 77, 79

transparency, 160

type, 185

typeface, 161

U

unauthorized application, 233

unauthorized invocation, 233

unit testing. See testing framework

URI (Uniform Resource Identifier), 81, 97, 246

URL (Uniform Resource Locator), 2, 244, 246

user interface

Android 1.5 version, 108

Android 1.6 version, 109

Android 2.0 version, 109

Android 2.2 version, 110

Android 2.3 version, 111

Android 3.0 version, 111

thread, 225

user interface management, 19

V

V (Verbose) priority message, 308

values component, 45

verb

better fit of defining, 186187

candidate responsibilities, 190

merge, remove, and refine into class, 190

Verbose (V) priority message, 308

version

Java, 28

SDK, 103104, 106, 108

versioning application, 323324

vertical orientation

application development guideline, 154

LinearLayout class, 128

widget alignment, 150152

video

camcorder application, 282

camera application, 284

loading, 273

recording and playing, 279282

SDK components, 294

starting and stopping, 282

VideoView class, 279, 282

view

basic description of, 21

class hierarchy, 157158

classes, 122123

defined, 116

functionality, 116

layout, 5153, 122123

View class

activity user interface implementation, 50

attribute, 175

as framework and support for complex process, 116

hierarchy, 117122

terminal UI components, 53

user interface implementation, 5557

weak cohesion, 116

view component, 201202

view group, 21

View System, 19

ViewGroup class

activity user interface implementation, 50

classes of, 122123

for UI components, 53

virtual device, 34

virtual machine, 18

virus, 228

Vlissides, John

Design Patterns: Elements of Reusable Object-Oriented Software, 188

Voice Recorder application (Mamoru Tokashiki), 360361

W

W (Warning) priority message, 308

WAN (wide-area network), 245

weak cohesion, 116

web page, 262

web resource, 348349

web service

Amazon Web Service, 339

geocoding and navigation, 254256

REST-based, 255

WebKit web browser engine, 17

WebView class, 246248, 262

weight and gravity, 128

WHERE clause, 98

wide-area network (WAN), 245

widget

alignment, 150152

Android SDK, 50

App, 20, 46

built-in, 157159

generic, 20

Home screen, 46

selection, 159

width

attributes, 128

button, 160

column, 143

unit specification, 127

Wi-Fitechnology

access point, 258

security, 228

Window Manager, 19

Windows operating system, 27

workspace, Eclipse IDE, 300

wrap_content constant, 127

writing applications, 1011

X

XML and SDK relationship, 128

XML block (element), 49

XMPP (Extensible Messaging and Presence Protocol) Manager, 19

Y

Yelp application (Yelp.com), 366368

Z

zipalign Java tool, 327

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.71.220