Docstoc

excerpt_index

Document Sample
excerpt_index Powered By Docstoc
					                                                                          index
Symbols                                          showAsAction attribute 571
                                              action views 574
@ symbol 25                                      assigning 574
                                              app name and title 564–565
A                                             background drawables 576
                                              checking for presence of 563
aapt 42                                       customized 561
abortBroadcast 200                            display options 563–570
AbsoluteLayout class                             DISPLAY_HOME_AS_UP 563
  LayoutParams class 87                          DISPLAY_SHOW_CUSTOM 563
access permissions 134                           DISPLAY_SHOW_HOME 563
AccountAuthenticator 428                         DISPLAY_SHOW_TITLE 563
AccountManager service 423                       DISPLAY_USE_LOGO 563
accounts, add and manage 422                     methods 563
action                                           setting 564
  ACTION_BATTERY_CHANGED                      drop-down list style 577
     constant 115                             font type 576
  ACTION_BOOT_COMPLETED                       foreground text color 576
     constant 115                             getting ActionBar instance 562
  ACTION_CALL constant 110                    handling at runtime 575
  ACTION_PACKAGE_ADDED constant 115           hide() method 575
  ACTION_PACKAGE_REMOVED                      introduction 561–562
     constant 115                             multiple-choice indicator 576
  ACTION_TIME_CHANGED constant 115            navigation modes 565–566
  ACTION_TIME_TICK constant 115                  list navigation 569–570
  ACTION_TIMEZONE_CHANGED                        methods 566
     constant 115                                NAVIGATION_MODE_LIST 565
  and intent filters 107                         NAVIGATION_MODE_STANDARD 565
  built-in 109                                   NAVIGATION_MODE_TABS 565
action bar                                       tab navigation 566–569
  action items 570–574                        overriding default overflow menu style 577
     application icon 573–574                 pop-up menu style 576
     creating programmatically 572            removing, showing, and hiding 575
     creating with menu resources 571         show() method 575
     handling 572                             single-choice indicator 576
     location 571                             styling 575–577



                                        613
614                                              INDEX


action bar (continued)                            adb 43, 72, 139, 611
  tab listener methods 568                           arguments 361
  tab navigation methods 567                         interacting with Android SDK 612
  tab style 576                                      kill-server 612
  text size 576                                      shell 361, 373
  text style 576                                     start-server 612
  theme 575                                          See also DDMS
action view 574                                   addOnBackStackChangedListener() method 557
  assigning 574                                   addProximityAlert() method 294
ACTION_CALL 107                                   Address 306
ACTION_DOWN 349                                   addresses, converting with Geocoder 305
ACTION_DRAG_ENDED 585                             addTab() method 567
ACTION_DRAG_ENTERED 585                           addToDB() method 275
ACTION_DRAG_EXITED 585                            ADT 34, 591
ACTION_DRAG_LOCATION 585                             configuring 599
ACTION_DRAG_STARTED 585                              installing 597
  responding to 587–589                              plug-in for Eclipse 36
ACTION_DROP 585                                   Advanced Audio Coding (AAC) 261
  responding to 587, 589–590                      Advanced Video Coding (AVC H.264) 261
ACTION_EDIT 106                                   aidl tool 121
ACTION_MEDIA_SCANNER_SCAN_FILE 275                Ajax 441
ACTION_MOVE 349                                   alarm 219–225, 481
ACTION_PICK 15                                      compared to Services 499
ACTION_UP 349                                       example 220–222
ACTION_VIEW 106                                      receiver 220
ActionBar API 562–563                                setting 222
  classes 562                                        types 222
ActionBar.TabListener interface 568                  using notifications with 222–225
activities 65–66                                  AlarmManager 222, 499
  creating 66–75                                     alarm types 222
  entire lifecycle phase 74                          methods 219
  foreground phase 74                                retrieving 219
  handling shutdowns 72                           AlertDialog 71, 304
  lifecycle 72                                       setMessage() method 71
  passing objects between 72                      Alpha, Red, Green, Blue (ARGB) 229
  referencing resources 91–93                     Android
  themes 97                                          application
  visible phase 74                                      building in Eclipse 45–53
Activity 24, 38, 57, 316, 345, 423                      mapping flow 316–320
  adding background fragment to 554                     requires manifest file 320
  creating 68                                        Bluetooth capabilities 386–393
  displaying UI elements 18                          building application in Eclipse 45–53
  extended by user classes 17                        building apps without the SDK 357–362
  findViewById() method 94                           built-in actions 109
  including fragment in 552–553                      common sensors 394
  initiates DayTime Server query 378                 components 17–24
  lifecycle compared to fragment lifecycle 546          Activity 17
  navigation between 131, 319                           BroadcastReceiver 19
  RefreshJobs 337                                       ContentProvider 22
  ShowJob 341                                           Service 18
adapters 69                                          contact model 406–411
  ArrayAdapter class 69                              core packages 35
AdapterView class 79                                 Cursor object 146
                                          INDEX                                      615


Android (continued)                        Android Interface Definition Language 120–121
  designing application 312–316              allowed types 121
     See also field service application      directional tags 120
  development requires Java skills 11      Android Market 10
  discourages direct file sharing 22         merit-based system 611
  displaying progress 337                    publishing to 607, 611
  emulator 41, 53–58                         rules 607
     setting up environment 54             Android Native Developer Kit. See NDK
     splash screen 321                     Android NDK. See NDK
     working with an SD card 142           Android Open Source Platform. See AOSP
  environment, should vs. can 185          Android Project Wizard 45
  and Exchange account 408                 Android SDK 34
  and Google account 408                     installing 594
  licensing 9                              Android Service 499
  Linux                                    Android Virtual Device. See AVD
     applications 356                      android:actionBarTabStyle 576
     kernel-based OS 4                     android:actionBarTabTextStyle 576
  logging mechanism 19                     android:actionDropDownStyle 577
  moving from Activity to Activity 131     android:actionLayout 574
  only encrypted connections 387           android:actionViewClass 574
  optimizing web applications 442–449      android:dropDownListViewStyle 577
  packages, world x permission 135         android:height 231
  philosophy 409                           android:id attribute 48
  platform 4–9                             android:listChoiceIndicatorMultiple 576
  runtime 363                              android:listChoiceIndicatorSingle 576
  same-but-different 7                     android:popupMenuStyle 576
  SenseBot. See SenseBot                   android:radius 231
  shell 26                                 android:selectableItemBackground 576
  stack 10–13                              android:textColor 576
  stock icon 319                           android:textSize 576
  taking a photo 539                       android:theme 575
  two versions of platform 56              android:title attribute 571
  user applications written in Java 4      android:typeface 576
  version 2.0 or later 385                 android:windowActionBar 575
  vs. iPhone 9                             android.animation 31
  vs. itself 8                             android.bluetooth package 387
  web development 440–442                  android.content.ContentResolver 273
Android 2.2 389                            android.content.ContentValues 273
Android 3.0 30–32                          android.drm 31
  copy and paste 581                       android.intent.action.MAIN application entry
  drag-and-drop 579                             point 25
  new features 31                          android.intent.category.LAUNCHER 25
  targeting in manifest file 561           Android.jar 47
Android Activity 473                       android.media.MediaRecorder 273
Android ARM. See ARM                       android.net 161
                                           android.provider.Telephony.SMS_RECEIVED 22
Android Asset Packaging Tool. See aapt
                                           android.R.id.home 573
Android Compatibility Package 557–558
                                           android.renderscript 31
Android Debug Bridge. See adb
                                           android.telephony 192, 201
Android Development Tools. See ADT
                                           android.view package 76
Android development, Intent 13
                                           Android/Java, refers to Java 357
Android device
                                           Android/Linux
  security 313
                                             environments and tools 360
  touch screen-capable 318
                                             nontrivial activities 371
616                                               INDEX


Android/Linux (continued)                          AppWidget
  refers to Linux 357                                configuring 494
  startup code appearance 368                        data elements 483
  system libraries 363                               data handling 483–486
AndroidManifest file 99                              deployment patterns 476
AndroidManifest.xml 21, 24, 45, 506, 561             metadata file 495
  @symbol 25                                         updating 498–505
  application descriptor file 15                   AppWidgetHost 474
  AppWidget 495                                    AppWidgetProvider 487–491
  deployment descriptors 24                        argc 367
animation 231–238                                  argv 367
  code to perform 237–238                          ARM 357
  creating programmatically 234–238                  Android/Linux application on 368
  frame-by-frame 232–234                             processor family 368
  project, creating 235–236                        arm-none-linux-gnueabi-gcc 358–359, 362
AnimationDrawable.start() method 232               arm-none-linux-gnueabi-ld 358
<animation-list> 233                               arm-none-linux-gnueabi-objdump 358
animations 90, 98–99                               <array> element 97
  duration attribute 98                            arrays 97
  interpolator attribute 98                        asInterface() method 121
  startOffset attribute 98                         ASL, friendlier toward commercial use 9
AOSP 8                                             aspect ratio 247
Apache 10                                          assembly language 358
  commons.io package 145                           Atom Publishing Protocol. See AtomPub
  HttpClient 170                                   AtomPub 180, 182
  ResponseHandler 172                              audio
Apache Software License. See ASL                     capturing 272–276
API                                                  encoding, setting 273
  dummy request 431                                  output file format 273
  linkedin-j 426                                     playing 263–264
API key, LinkedIn APIs 411                           source, setting 273
.apk file 542                                      audio codecs 261
Apple 7                                            audio file, metadata 275
  AppStore 9                                       AudioPlayer 261
Application class 71                               auth token 423
application distribution, Android vs. iPhone 10    authenticating to LinkedIn 425
<application> element 99                           authentication 423
application icon as action item 573–574              key. See Ki
Application Layer 163                                lightweight service wrapper 431
Application Not Responding event 82                AuthScope 176
applications                                       AVD 287
  communicating between 120–129                      management Eclipse 36
  distribution beyond Market 611                   AVD Manager 54, 595
  getting to Market 608                            AwesomePlayer 262
  hybrid, building 458
  made for mobile 448                              B
     link to full site 449
     simplify, reduce, and eliminate 449           background fragment 553–555
  manifest 158                                       adding to Activity 554
  mapping to processes 26                            creating 554
  name and icon, on action bar 564                   vs. service 553
  preparing for distribution 601–604               background services 116–120
  RestaurantFinder 66–101                          BaseAdapter class 85
                                           INDEX                                    617


BaseColumns 153                             CALL_PHONE permission 100
BasicNameValuePair 178                      CamcorderProfile 282
batch builds without using IDE 51           camDemo 271
batch operations on contacts 417            camera 267–272
beginRecording 281                             support for multiple 282
Binary Runtime Environment for Wireless.       support, testing on emulator 272
     See BREW                               Camera application 528
Bitmap 349, 533, 536                        Camera class 267–272
BlackBerry 7, 10                               get() method 282
  email capabilities 8                      CAMERA permission 267, 276
Bluetooth 10                                Canvas 349
  capturing events 392                      CAPTCHA and GData ClientLogin 185
  classes, Android 388                      capturing media 266–282
  close-range wireless networking 161          capturing audio 272–276
  peer 392                                     recording video 276–282
  permissions 393                           carrier. See mobile operators
  and SenseBot 386                          Cascading Style Sheets 97
Bluetooth Serial Port Profile 387           CATEGORY_LAUNCHER 14
BluetoothAdapter 391                        CDMA 35, 189
bonded 388                                     primary rival to GSM 190
BounceActivity 235                          characters() method 334
bound services 120                          CharSequence type
boundary conditions 442                        and AIDL 121
BREW 7                                      checkForZombies() method 490
broadcast receivers 114–116                 Class class 104
  creating 115–116                          ClassNameRS 256
BroadcastReceiver 203, 392, 474, 500        client/server 164
  in every Android application 24           ClientLogin 182, 185
  no UI 20                                  ClipboardManager 581
  tags 25                                   ClipData 580–581
browser control, add to UI layout 458       ClipData.Item 581
browser detection                           ClipDescription 580–581
  examination of user agent string 446      codecs 261
  media query 447                           CodeSourcery 357, 360
browsers                                    <color> element 96
  overriding behavior 459                   color values, defining 229
  storing data directly 449                 com.google.android.maps 299
  WebView 461                               com.google.android.phone.Dialer 15
BufferedOutputStream 351                    ComponentName 104
BufferedReader 167                          conditional global replacement 418
BufferedWriter 168                          configuration activity 481
build script, need for 362                  connecting to a remote device 390
Builder pattern 71                          connection, wireless internet 313
building a native library 526               ConnectivityManager 165
Bundle 20, 179, 329                            mobile or WiFi 161
                                            contacts
                                               adding 418
C                                              conditional global replacement 418
                                               identifiers 416
C 356                                          managing 413–420
  application 356                              modifying database 417
  application build script 362                 multiple insertions 420
  times where better than Java 525             single logical 410
C99 251                                        table 414
618                                              INDEX


content                                           data table 414
   provider 24                                    database
   selectively loading 446                          modifying contacts 417
   staying up to date 152                           not WORLD_READABLE 150
CONTENT_URI 151, 153                                open a connection 149
ContentObserver 152                                 opening 453
ContentProvider 22, 130, 200, 315, 483, 580         persisting data to 145
   accessible by any application 152                server 23
   additional properties 159                      datagram 163
   classes 151–159                                Date & Time settings 512
   creating 152, 159                              Daytime Client 377–380
   extending 154                                    single Activity 378
   in every Android application 24                  special permission 380
   URI variations 151                               testing 380
ContentResolver 23, 151                           DayTime Server 373
ContentView 229                                     application has two parts 371
Context class 19, 68, 135, 194, 324, 340            listens on TCP port 370, 379
   bindService() method 125, 127                  DBHelper
   stopService() method 128                         inner classes 146
Context.getSystemService(Context.ALARM_             outer class 147
      SERVICE) 219                                DBOpenHelper 146, 149
converttogray function 534                        DDL 375
convolution 536                                   DDMS 36, 600
copy-and-paste API, classes used for drag-and-      perspective
      drop 581                                         dashboard-like view 39
corners tag 231                                        LogCat view 40
createPackageContext 135                          DDMS tool
creation, widget instance 497                       requires decimal format 287
CSS                                                 supports KML 289
   multiple files per page 447                      two contexts 286
   selectively choose file 446                      working with a GPX file 289
ctime 373                                         Debug
Cursor 23, 131                                      Certificate 301
   data items changed 158                           perspective 37, 59–60
                                                  debugging 59
                                                  Delicious 180
D                                                 depth buffer 245
                                                    depth test 246
DAL 146                                             flags to compare values 246
Dalvik Debug Monitor Server. See DDMS             DetailsWebFragment 548, 550
Dalvik VM 11                                      developer API, LinkedIn 411
  relies on Linux kernel 12                       device ID 194
  result is innovation 12                         .dex files 12, 53
dashboard 475                                     DialogFragment 548
data                                              digital signature 604–607
  contacts, good citizen principles 411             jarsigner 605
  raw contact, storing 410                          keystores 604
  sample, properly set up 602                       keytool 605
  storage requirements 315                        <dimen> element 96
  structures 327                                  dimensions 96
  values 516                                      directory change 361
Data Access Layer. See DAL                        disassembling 358
Data Definition Language. See DDL                 drag event 582, 585–586
data handling, AppWidget 483–486                    actions 585
                                                INDEX                                        619


drag event (continued)                           edge detection 525
  listening for 587–588                            routine 529
     listener vs. callback 587                   edges, finding 541
  which to respond to 587                        Editor 324
drag operation, starting 586–587                 EditText 28
drag shadow 583                                  EditView 326
drag-and-drop 581–583                            Electronic Serial Number. See ESN
  drag event. See drag event                     ELF 368
  drag operation, starting 586–587               email addresses, conditional global
  drag-start operation, responding to 588–589         replacement 418
  drop operation, handling 589–590               empty processes 72
  introduction 580                               emulator
  sequence diagram 582                             switches 600
  shadow builder 583–584                           vs. simulator 54
  use of copy-and-paste API 581                  Emulator Control, testing connectivity 41
drag-and-drop classes 580–581                    endElement method 334
DragEvent 580–581                                endElement() method 334
DragShadowBuilder 580–583                        end-user license agreement. See EULA
drag-start operation, responding to 588–589      Enterprise Information Systems 7
draw() method 228                                equator, base for latitude 287
Drawable 228, 238                                Error Console, WebKit 457
drawables 47, 90, 321, 400                       ESN swap 191
  managing 515                                   EULA 602
drawBitmap 349                                   events 89–90
drawColor 349                                      broadcast receivers 114
drawFrame 242                                      broadcasting 114–115
drawing graphics 227–231                           Observable and Observer 89
  with XML 228–230                               executable and linkable format. See ELF
     layout 229                                  exit 367
     shapes 230–231                              Extensible Markup Language resources 90
drawing in OpenGL ES 243–250
drop operation, handling 589–590
dropReceived() method 589                        F
dummy API request 431
                                                 FAT 142
dynamic linking 362–370
                                                 field service application
                                                    assumptions 313
E                                                   manifest file 320
                                                    resource files 319
Eclipse                                             source code 320–334
  DDMS                                              source files 318
     perspective 37                                 steps 316
     view 360                                    FieldService Activity
  debugging Android application 59                  goal 322
  default perspective 593                           implementing 324
  Emulator Control 286                           File Allocation Table. See FAT
  installing 591                                 File Explorer view, Eclipse 41
  Java perspective 37                            file_get_contents 354
  and NDK 542                                    FileInputStream 145, 331, 351
  Package Explorer 37
                                                 FileOutputStream 138, 144, 351
  plug-in, File Explorer view 134
                                                 files
  setting up development environment 13
                                                    accessing 138
  workspace prompt 592
                                                    read and write 138
Eclipse IDE 592–593
                                                    view resource files 93
  See also ADT
620                                        INDEX


filesystem, based on Linux 137              FragmentTransaction.addToBackStack()
findViewById 30                                 method 556
   method 28                                FragmentTransaction.commit() method 556
finish 337                                  FragmentTransaction.executePendingTransac-
fixed-length record 406                         tions() method 556
focus 88–89                                 fromBundle 329, 341
   DEFAULT_FOCUS 88
for additional locales 514                  G
formatNumber 198
FountainRS 255                              gcc 358, 364
fovy 249                                    GData API
<fragment> 552                                implementation of AtomPub 182
fragment 88                                   not true REST 182
   adding 556                               GData ClientLogin and CAPTCHA 185
   adding to back stack 556                 GenerateNotification() method 216
   Android Compatibility Package 557–558    geo
   back stack 556–557                         fix 288
      adding to 556                           query 317
      methods 557                           geo type 107, 110
      pop, simulating 555                   Geocoder 305–306
   background fragment 553–555                creating 306
      adding to Activity 554                  map between point and place 286
      creating 554                          geocoding 305
      vs. service 553                       GeoPoint 286, 298
   creating 548–553
                                            getActionBar() method 575
   finding by resource ID 555
                                            getArguments() method 550
   finding by tag 555
                                            getBackStackEntryAt() method 557
   including in Activity 552–553
                                            getBackStackEntryCount() method 557
   instantiating with arguments 549
                                            getCameraInfo() method 282
   introduction to 545
                                            getDisplayOptions() method 563
   lifecycle 546
                                            getEmail() method 324
      compared to Activity lifecycle 546
                                            getExtras() method 341
      methods 546
                                            getFragmentManager() method 555
   removing 556
                                            getHolder() method 242
   replacing 556
                                            getJob() method 341
   retaining when created 554
                                            getLayoutInflater() method 211
   with no UI 553
Fragment class 548                          getMeasuredWidth() method 87
   subclasses 548                           getNavigationItemCount() method 566
fragment layout                             getNavigationMode() method 566
   creating 548–553                         getNumberOfCameras() method 282
   defining 551–552                         getProvider() method 294
fragment manager 555                        getSelectedNavigationIndex() method 566
   back stack methods 557                   getSelectedTab() method 567
fragment subclass, creating 548–551         getSharedPreferences() method 131
fragment transaction 555–556                getSupportFragmentManager() method 558
   adding to back stack 556                 getSystemService() method 166, 194, 294
FragmentActivity 558                        getTelephonyOverview() method, reset screen
FragmentManager class 555                        details 195
FragmentManager.add(fragment, tagString)    getView() method 85, 583
      method 554                            GL_DEPTH_TEST 245
FragmentManager.beginTransaction()          GL_PROJECTION 244
      method 555                            GL_Triangle_Strip 243
FragmentTransaction class 555               glClear 244
                                      INDEX                                       621


glDepthFunc 245                        handlers 80, 82–83, 119
glDrawArrays 245                       handling long-running requests 236
glEnable 245                           holographic theme 561
glEnableClientState 245                  customizing 577
global number 199                      home activity 574
Global Positioning System. See GPS       jumping to from app icon 573
global replacement, conditional 418    Honeycomb. See Android 3.0
global start directive 369             hotspot 478
Global System for Mobile. See GSM      HTML5 440
GLU.gluLookAt 249                      HTTP 161
gluOrtho2D 245                           authentication 177
gluPerspective 247                       creating helper 173
glVertexPointer 245                      defines internet rules 164
GNU General Public License. See GPL      GET 170, 176
Google                                   headers 176
  Android Market 10                      and java.net 170
  Contacts 182                           parameters 176
  GData 180, 182                         POST 170, 176, 349
  Maps 26                                protocol stateless 169
  and Open Handset Alliance 3            working with 169–179
Google APIs 56                         HttpClient 173
Google Maps API                        HttpEntity 173
  key, requesting 300                  HttpPost 178
  support through MapView 300          HttpRequestHelper 170, 175, 181
Google TV 32                           HttpRequestInterceptor 177
GPL 9                                  HTTPS 180
GPS 6                                    creating helper 173
  data stamped on job 349              HttpUrlConnection 170
  most common location provider 285
  obtaining provider directly 295
  services 474                         I
GPS Exchange Format. See GPX
                                       IBinder 423
GPX
                                       IBinder interface 122
  DDMS tool 289
                                          transact() method 122
  storing points 288
                                       ICANN 165
graphics
                                       ICCID 190
  drawing 227–231
     with XML 228–230                     identifies SIM card 190
     XML shapes 230–231                identity matrix 245
  OpenGL ES. See OpenGL ES             ifconfig 168
Graphics API 227–238                   ImageCaptureCallback 271
GSM 35, 189                            ImageView 233, 321
  Android standard 190                 IMEI, identifies device 190
gsm command 196                        IMSI 194
GUIUPDATEIDENTIFIER 236                   subscriber and network identifier 190
                                       inches 96
                                       independent software vendor. See ISV
H                                      index.html file 460
                                       InputStream 331
Handango 10
                                       instance state 75
handle 453
                                       integer primitive, int 483
handleMessage() method 83
                                       Intent 13, 80, 103, 180, 197, 317
Handler 322, 332, 337
                                          action 103–104
  relationship diagram 173
                                          ACTION_DIAL constant 110
Handler class 236
622                                                  INDEX


Intent (continued)                                    ISO format 511
  ACTION_VIEW constant 110                            ISV 16
  built-in actions 103–110                            ItemizedOverlay 302
  category 104                                           handles details 304
  component 104                                       iTunes, as an example 164
  data 103–104
  defined 14                                          J
  defining 103–104
  explicit 16                                         jar 53
  extras 104                                          jarsigner 605
  getExtras() and putExtras() methods 81              Java 4, 357
  handing intent requests 107–109                        array 455
  implicit 16                                            connecting UI to a DayTime Server 378
  implicit versus explicit invocation 104                locale-specific data classes 516
  intent filter matching criteria 108                    Runnable interface 338
  intent filters 107–114                              Java byte codes, convert to dex file 52
  late binding 103                                    Java development tools. See JDT
  linking between applications 105–107                Java ME 7
  making calls 196                                    Java Native Interface. See JNI
  MIME type 108                                       Java packages, included in Android SDK 35
  receiving 19                                        Java Perspective 37
  resolution 16                                          Eclipse default 593
  type 104                                            Java Platform, Micro Edition. See Java ME
Intent filters                                        Java Runtime Environment. See JRE
  and category 108                                    java.net 161, 170
  and data 108                                        Javadocs
  associating with broadcast receivers 115               android.provider package 152
  defining in XML 110–112                                view 38
Intent.FLAG_ACTIVITY_CLEAR_TOP 573                    JavaScript
IntentFilter 19, 25                                      errors found at runtime 451
  defined 14                                             implementing handler 461
  defines relationship 14                                interface code 463
IntentFilter action 474                                  multiple handlers 464
<intent-filter> element 100, 107, 112, 124               overriding alert() method 470
interface definition languages 120                       security matters 465
interfaces                                            JDK 591
  publishing 123                                      JDT 591
  remote version 123–124                                 Eclipse 38
International Mobile Equipment Identity.              JNI
     See IMEI                                            building a library 530–537
International Mobile Subscriber Identity. See IMSI       functions 537
International Telecommunication Union H.263              library 526
     video standard (H.263) 261                             compiling 536
Internet Layer 163                                          load at runtime 540
Internet Protocol. See IP                             JobEntry 328
invalidate() method 236                               JobListHandler 332, 335
IP 161                                                jobs
  address 163                                            data managing 327–334
     finding 168                                         ManageJobs Activity 338
  network data 161                                       managing 334–351
ipconfig 168                                             with GPS data stamp 349
iPhone 7                                                 working with the ShowJob Activity 341
  vs. Android 9                                       Joint Photographic Experts Group (JPEG) 261
                                                 INDEX                                         623


JPEG                                                 logging in a two-stage process 426
  captured signature 351                             synchronizing 432
  converting to 349                                  transactions 437
JQuery 441                                        linkedin-j
JRE 591                                              API 426
                                                     project 412
K                                                 linker 363
                                                     arm-none-linux-gnueabi-ld 364
KDE 440                                              options 366
Keyhole Markup Language. See KML                  Linux 4
keystore, keys require an alias 605                  building applications 356
keytool 605                                          DayTime Server 370
Khronos 227                                          finding IP address 168
  OpenGL ES 238                                      kernel 10
Ki, authenticates SIM card 190                    Linux kernel
KML 289                                              and Dalvik VM 12
  checks files for Placemark 291                     why use 11
  drawbacks 291                                   Linux security system prevents ad hoc file
  international standard 292                            access 22
kSOAP, documentation 186                          list navigation on action bar 569–570
                                                  List type and AIDL 121
                                                  ListActivity class 79
L                                                 listeners
LAI, region device is in 190                         OnClickListener 70
Language & Keyboard 511                              OnFocusChangedListener 89
languages, target 513                             ListFragment 548
latitude, how expressed 287                       ListView 78–82, 339
launch screen 319                                 locale 511
Layout 47                                         localization
layout 473                                           multiple locales 512
   managing 515                                      need for 510–517
   XML 425                                           obstacles 522
LayoutInflater 211                                   translation team 517
layouts 68–72, 86–88                                 See also localizing
   FrameLayout 87                                 localizing
   layout resources 90                               applications 516
ld 364                                               entire infrastructure 513
LD_LIBRARY_PATH. 366                                 in Java code 520
LEGO Mindstorms NXT. See robot                       strategies 512
LEGO robot. See robot                             Location 292, 298
libsqlite.so 373                                  location
License Verification Library. See LVL                simulating 286–292
lifecycle                                            specify coordinates 286
   activity lifecycle phases 74                      updates 296
   bound services 128                             Location Area Identity. See LAI
   started services 128                           location-based service. See GPS
lightweight authentication service wrapper 431    LocationListener 292, 296
LinearLayout 29                                      onProviderDisabled 298
Link Layer 163                                       onProviderEnabled 298
LinkedIn 406                                         receive updates 286
   contacts, expanded details 418                 LocationManager 292
   creating account 424–431                          Criteria 295
   developer API key 411                             find available providers 285
624                                        INDEX


LocationManager (continued)                 MediaController 266
  getProvider 295                           MediaExtractor 261
  GPS_PROVIDER 294                          MediaPlayer 263
  NETWORK_PROVIDER 294                        example 263
LocationProvider 284, 292, 294              MediaPlayer API 260
  COARSE 295                                MediaPlayerService 262
  FINE 295                                  MediaRecorder
  permissions 295                             capturing audio 272–276
LogCat 40, 51, 600                            capturing video 276–282
  functionality 532                         MediaRecorder.setAudioEncoder() method
  superfluous statements 601                     273, 278
  values displayed 60                       MediaRecorder.setAudioSource() method
long click 581                                   273, 278
longitude, how expressed 287                MediaRecorder.setOutputFormat() method
lookup key 416                                   273, 278
loopback 163                                MediaRecorder.setPreviewDisplay() method 278
  don’t connect to 168                      MediaRecorder.setVideoEncoder() method 278
Looper 82, 338                              MediaRecorder.setVideoSource() method 278
LVL 607                                     MEID 191
                                            Menu class, setIcon() method 71
M                                           MenuItem.setActionView() 574
                                            menus vs. onscreen buttons 71
Mac 7                                       Message 173, 179, 236, 380
  finding IP address 168                      class 337
main.xml 47–48                                instances 337
makeText() method 208                         object, do not reuse 338
managedQuery() method 152                   MessageQueue class 82
<manifest> element 100                      metadata file, AppWidget 495
manifest file 66, 99–101                    methods
  targeting Android 3.0 561                   activity lifecycle methods 73–75
Map type and AIDL 121                         nextFocusLeft() method 88
MapActivity 285, 293                        metrics, location-related 284
  extending 299                             Microsoft Exchange 408
  writing with MapView 301                  Microsoft, platforms compelling 8
MapController 294                           millimeters 96
  get from MapView 302                      MIME_TYPE 153
mapping, applications to processes 26       MIMETYPE_TEXT_PLAIN 589
Maps application 287, 317                   minSdkVersion property 100
maps, working with 298                      mkdir, command on adb shell 361
MapView 285, 294                            mksdcard tool 142
  Google Maps API key 300                   Mobile Equipment Identifier. See MEID
  limited version of Google Maps API 299    mobile in mind, designing 442
  and Overlay classes 299                   mobile operators
  set zoom level 302                          challenges 6
  updating 286                                response to Android 5
  writing MapActivity 301                   mobile phone, basic states 195
MapViewActivity 292                         Mobile Safari 7
  screen 299                                  iPhone 7
MarginLayoutParams class 87                 MotionEvent 349
matrix mode 244                             Moving Picture Experts Group (MPEG) 261
MD5 fingerprint 301                         Moving Picture Experts Group 4 (MPEG-4) 261
media recording 261                         MP3 file, playing 263
media, capturing 266–282                    mPictureCallbackRaw 271
                                          INDEX                                    625


mShutterCallback 271                         using with alarms 222–225
multimedia                                   with button press 214–216
 capturing media 266–282                     with LED 218
    capturing audio 272–276                  with sound 219
    recording video 276–282                Notification class 212–214
 introduction to 261–263                     fields 213
 playing audio 263–264                     Notification.Builder 214
 playing video 264–266                     NotificationManager 213
multiple accounts 408                      notifications 116
 convenience and complications 408           debugging 601
Music Player 275                           NT Lan Manager. See NTLM
My Location 287                            NTLM 177
myLocalState 583                           number, global 199
MyLocationOverlay 302                      NyARToolkit 272
MySQL 315, 352
                                           O
N
                                           -o switch 359
NANP 199                                   objdump 358, 368
National Data Buoy Center. See NDBC        Observer design pattern 89
Native Developer Kit. See NDK              Ocean Matrix (OMX) 262
native library, building 526               OCR 525
navigation, detecting events 467           OGC 290
NBDC 285                                   onActivityCreated() method 550, 588
  feeds 302                                onActivityResult() method 324–325, 341, 345
NDK 4, 357, 524                            onBind() method 19, 119, 123
  build subsystem 530                      onCallStateChanged() method 195
  building an application 527              onClick() method 327
  directory 542                            onCreate() method 19, 69, 73–74, 128
  installing 526                           onCreateOptionsMenu() method 71, 347, 572
  integrating into Eclipse 542             onDestroy() method 74, 129
  uses for 525                             onDrag() method 587
netstat 373                                onDragEvent() method 581, 587
network protocols 162                      OnDragListener 580–581, 587
NetworkInfo 166                            onDragShadow() method 583
networking, overview 162–165               onDraw() method 228, 349
newTab() 567                               onDrawShadow() method 584
newTab() method 567                        OnFocusChangeListener 199
nextFocusDown() method 88                  onListItemClick() method 81
nextFocusRight() method 88                 onLocationChanged() method 297
nextFocusUp() method 88                    OnLongClickListener 580–581
NexusOne device 389                        onMeasure() method 85
Nintendo Wii 386                           onMenuItemSelected() method 81
NOAA 285                                   onNavigationItemSelected() method 570
NoActionBar themes 575                     OnNavigationListener 569
node 162                                   onOptionsItemSelected() method 347, 572–573
nop 368                                    onPause() method 74
North American Numbering Plan. See NANP    onPictureTaken() method 270–271
nostdlib 366                               onPostCreate() method 74
notification 212–216                       onProvideShadowMetrics() method 583
  custom view 216–219                      onReceive() method 200
  PendingIntent 214                        onRestart() method 74
  sending 214                              onResume() method 74
626                                          INDEX


onSaveInstanceState() method 75               paired 388
onServiceConnected() method 125               Palm 10
onShutter() method 270                        PathShape 228
onStart() method 74, 112                      patterns, AppWidget deployment 476
onStop() method 74                            PDU, SMS data packet 204
onTabReselected() method 568                  PendingIntent 202, 214, 294
onTabSelected() method 568                    permissions
onTabUnselected() method 568                    access 134
onTouchEvent() method 255, 349                  phone-related 197
Open Geospatial Consortium. See OGC             world x 135
Open GL and link command 365                  perspective 247–249
Open GL ES                                      aspect ratio 247
  context, creating 239–243                   perspectives
  introduction to 238–239                       DDMS 39
  standards comparison 238                      Debug 37, 59
Open Handset Alliance and Google 3              Eclipse 36
open source, double-edged sword 8               Java 37–38
OPEN, CLOSED 522                              pESN 191
OpenCORE 260                                  phone
open-ended records 407                          home screen 473
openFileInput 138                               number 194
openFileOutput 137, 331                       Phone 7 7
OpenGL 238, 363                               PhoneGap 465
OpenGL ES 10, 238–250                         PhoneNumberUtils
  3D shapes and surfaces 245–250                formatNumber() helper method 198
  drawing a rectangle 243–245                   parse and validate 198
  perspective 247–249                         PhoneStateListener 188, 192, 195
  primitives 243–244                          phone-top 472
OpenGL for Embedded Systems. See OpenGL ES    PHP 315
OpenGL libraries 525                            for exchanging data 315
OpenGLContext 239–243                           mobile integration code 354
openInputStream() method 23                     server-side dispatcher system 353
openRawResource() method 139                  PictureCallback 269, 271
Oracle, Java VM licensing 12                  PID 40
org.apache.httpclient 161                     PIN value 390
outbound calls, intercepting 200              pipe-delimited return string 478
output switch. See -o switch                  pixels 96
OutputStream 349                                density-independent pixels 96
OvalShape 228                                   scaled pixels 96
overflow menu list 570                        places, converting with Geocoder 305
Overlay                                       plain old XML over HTTP. See POX
  classes display on MapView 299              Point 238
  draw on top of map 286                      POP3 email program 421
  onTap 304                                   popBackStack() 557
  placing data on map with 302                port 370
OverlayItem 302                                 identifying number 45
                                                three ranges 165
P                                             Portable Operating System Interface for UNIX.
                                                   See POSIX
Package Explorer, Eclipse 37                  POSIX 166
packet 163                                    POST data 351
PacketVideo, OpenCORE 10                      postDelayed 322
padding tag 230                               Power Control widget 473, 475
                                               INDEX                                        627


POX 161                                         relational database, built-in 145
  exposes chunks of XML 179                     RelativeLayout class 94–95
  using a service 181                           remote device, connecting 390
PreferenceFragment 548                          RemoteViews, working with 491
preferences 131                                 removeAllTabs() method 567
preinit_array 369                               removeOnBackStackChangedListener()
prime meridian base for longitude 287                method 557
printf 359                                      removeProximityAlert() method 294
process ID. See PID                             removeTab() method 567
processes                                       removeTabAt() method 567
  how the system chooses which to kill 72       RenderScript 250–258
  saving state before they’re killed 74           application
produce information URL 317                          building 252–258
progress, displaying 337                             file structure 252
ProgressDialog 317, 332, 337, 346–347                source code 253
  show() method 81                                bytecode files 252
projectname.apk 53                                debugging, issues with 251
protocol data unit 204                            init() method 258
protocol layers 163                               introduction to 250–252
Prototype 441                                     pragmas 258
ps -a 26                                          pros and cons of using 251–252
Pseudo Electronic Serial Number. See pESN         root() method 258
publishing, Android Market 607, 611               types of apps to use for 251
                                                RenderScriptGL 255
Q                                               Representational State Transfer. See REST
                                                request, long-running, handling 236
Qualcomm 7                                      requestLocationUpdates 298
queuing, local 346                                use time parameter carefully 298
                                                Research in Motion 7
                                                Resources 140
R                                                 raw resources 139
R class 30, 95                                    XML resources 140
  inner classes 93                              resources 66, 90–99
R.java 30, 46                                     raw 90
  file 318                                        supported types 90
  updating 48                                     values 90–98
raw contact data, storing 410                     views and layouts as 93–95
read-only interface, AppWidget 473              ResponseHandler 173, 176
receiver 474                                    REST 161, 185
  tag 25                                          methods 182
<receiver> element 112                            uses URL-style approach 179
RECORD_AUDIO 276                                RestaurantFinder application 103–110
RECORD_VIDEO 276                                  basic screens 67
RecordHit, inserts record into SQLite DB 373    return, replace with exit call 367
records 407                                     RFCOMM 387
  fixed-length 406                                cable replacement profile 387
  open-ended 407                                RISC 358
     choosing 406                               robot
RectShape 228                                     communicating with 402
referencing resources 91                          controlling with phone orientation 400
RefreshJobs 335                                   driving 401
RefreshRunner 236                               RoundRectShape 228
regression testing 603                          router 164
628                                     INDEX


rows, inserting and deleting 456         ServerSocket 167
rpath 366                                Service 18, 24, 422
RSSurfaceView 254                          stopSelf() method 128
Runnable, Java interface 338               tags 25
                                         services 116
S                                          binding to 124–128
                                           compared to alarms 499
Safari 7                                   lifecycle 128–129
Samsung 389                                long-running 119
save 324                                   starting 127
SAX                                        tag 25
   parser 331, 334                         vs. background fragment 553
   style of tree traversal 142           setActionView() method 574
   XML parser 332                        setAlarm() method 221
scaling 445                              setArguments(Bundle) method 550
screen, clearing before drawing 244      setBackgroundColor() method 77
ScriptC_fountain 256                     setBackgroundDrawable() method 77
SD card 130, 142–145                     setBounds() method 228
   and the emulator 142                  setClickable() method 77
   handles large files 142               setContentView() method 28, 69, 92
sdcard path 143                          setCustomView() method 567
SDK 4                                    setDisplayHomeAsUpEnabled() method 563, 573
   upgrades 597                          setDisplayOptions() method 563
searching, Set Search Term button 466    setDisplayShowCustomEnabled() method 563
                                         setDisplayShowHomeEnabled() method 563
Secure Digital. See SD card
                                         setDisplayShowTitleEnabled() method 563
secure shell 361
                                         setDisplayUseLogoEnabled() method 563
Secure Sockets Layer. See SSL
                                         setEmail() method 324
security risks 465–466
                                         setFocusable() method 77
select() method 375
                                         setGravity() method 77, 209
selectTab() method 567
                                         setHeight() method 77
sendBroadcast() method 114
                                         setIcon() method 567
sendDataMessage() method 201
                                         setLayoutParams() method 77
sendEmptyMessage() method 83
                                         setListAdapter() method 81
sendMessage() method 83
                                         setListNavigationCallbacks() method 566, 569
sendMultipartTextMessage() method 201
                                         setLoadWithOverviewMode() method 551
sendOrderedBroadcast() method 114
                                         setMediaController() method 266
sendStickyBroadcast() method 114         setMinimumHeight() method 77
sendTextMessage() method 201             setMinimumWidth() method 77
SenseBot 386                             setNavigationMode() method 566, 569
   building the application 397          setNotificationUri() method 158
   uses Bluetooth to drive robot 386     setOnClickListener() method 77
SensorEvent fields 395                   setOnCompletionListener() method 264
SensorManager 393–397                    setOnDragListener() method 588
  classes 394                            setOnFocusChangeListener() method 77
sensors                                  setPadding() method 77
  enabling and disabling 396             setResult() method 351
  events 393                             setSelectedNavigationItem() method 566
SEO 444                                  setShowAsAction() method 572
Serial Port Profile. See SPP             setTabListener() method 567
server 351–355                           setText() method 77, 567
  communicating with 166                 Settings button() method 317
  relies on MySQL and PHP 352            setTypeFace() method 78
  role 168                               setUseWideViewPort() method 551
                                                   INDEX                                        629


setVideoFrameRate() method 278                      Sobel Edge Detection 525
setVideoPath() 266                                     convolution 536
setVideoPath() method 266                              highlighting image edges 529
setVideoSize() method 278                           Socket 167, 380
setWidth() method 78                                socket interface 387
SGL 10                                              software development kit. See SDK
shadow builder 583–584                              software version 194
Shape 228                                           sound, adding to a notification 219
ShapeDrawable 228                                   source-level debugging, Eclipse 36
SharedPreferences 322, 324                          speech codecs 261
   access mode 133                                  Spinner class 68
   Context 131                                      Splash Activity 319
   Editor 133                                       splash page, functionality 321
   objects 134                                      splash screen 316, 320
   storing with different modes 131                 splashhandler 322
   XML files permissions 134                        SPP 387
sharedUserId 139                                    SQL 23
Short Message Service. See SMS                         functionality 440
showAsAction 571                                       local database 450
ShutterCallback 270                                 SQLite 10, 315, 363
signature                                              built-in database system 145
   capturing with CloseJob Activity 345                database 373
   electronic 313                                      insert, update, and delete data 149
   JPEG image 318                                      insertion of data 371
SIM cards                                              and link command 365
   stored identifiers 190                              query 150
   used by GSM devices 190                             supports WeatherReporter 130
Simple API for XML 78                               SQLite database 407
Simple Object Access Protocol. See SOAP             SQLite3 145, 373
simulator vs. emulator 54                              tool 150
single logical contact 410                          SQLiteDatabase 149, 155
SiteMonitor                                         SQLiteOpenHelper 146
   application architecture 480–483                 SQLQueryBuilder 157
   basics 476–479                                   src folder 46
   monitors website health 477                      SSL 314
   supports multiple conditions 478                 stack 386
SiteMonitorModel class, two logical sections 483    stacks 72
SiteMonitorService 498                              Stagefright
size tag 231                                           introduction to 260–263
smart shortcut 475                                     overview 261–263
smartphone, major players 7                            supported files, services, and features 261
SMS 41–205                                          StagefrightPlayer 262
   pdus 204                                         standalone resources 93
   permissions 203                                  start routine 367
   receiving messages 204                           startActivity() method 18, 106
   send message to emulator 22
                                                    startActivityForResult() method 18, 324–325, 341
   sending messages 201–202
                                                    startAnimation() method 98
SmsManager 201
                                                    startDocument() method 334
SmsMessage 201, 205
                                                    startDrag() method 582–583, 586
SMTP rigorous procedures 164
                                                    startElement() method 334
SOAP 161, 185, 315
                                                    starting path 135
   imposes strict rules 179
                                                    startRecording() method 275
   kSOAP 186
                                                    startService() method 18, 127
   proxy 186
630                                             INDEX


state, persistent 75                                form factor 30
–static command-line switch 359                     market share 31
–static flag, applications self-contained 363    takePicture() method 267, 271
static method 483                                targetSdkVersion property 100
status code, should be internal 522              TCP 371
stopRecording() method 275                          reliable 164
storing raw contact data 410                        sockets 373
String 334, 483                                  TCP/IP 162
<string> element 95                              TDMA 190
String type and AIDL 121                         tel type 110
StringBuilder 334                                telephony 189
strings                                             alphabetic keypad 199
   comparison 469                                   format number 198
   identifying and managing 513                     outgoing call 200
   in resources 518                                 permission 194
   pipe-delimited return 478                     TelephonyManager 188, 192
strings.xml file 47, 515                         telnet 44
stroke tag 231                                   testing, run under varied conditions 603
Structured Query Language. See SQL               .text 368
Stub class 121                                   TextView 378
<style> element 97                                  methods 77
style sheet 447                                     presents job details 341
style.xml, theme styles 576                      theme style items, commonly used 576
styles 95–96                                     Theme.Holo.NoActionBar 575
stylus 318, 345                                  Theme.Holo.NoActionBar.Fullscreen 575
summary/detail view 548                          themes 97
SummaryListFragment 548–549                         and action bar 575
<supports-screens> element 101                   threads 82
surface object, and video recording 276             HandlerThread class 82
surface, managing 242                            TimerTask 234
surfaceChanged() method 242                      timestamp, appending 144
surfaceCreated() method 242                      titled 401
surfacedChanged() method 255                     Toast 415
surfaceDestroyed() method 242                       creating 208
SurfaceHolder 242–243                               custom view 210–212
SurfaceHolder.Callback 243                          displaying 208
SurfaceView 242                                     introduction to 207–209
sync 421                                            placing 209–212
   across multiple terminals 421                 toBundle 341
   retrying 422                                  tool chain, cross compiling 357
synchronization. See sync                        tools, linker 357
synchronizing lifecycle 432                      toString method, displaying jobs 329
System.currentTimeMillis() method 222            toXMLString 329, 331
SystemClock.elapsedRealtime() method 222         transaction function, unpacking 454
                                                 translation team 517
                                                 Transport Layer 163
T                                                troubleshooting 436
                                                 try/catch blocks 51
tab navigation on action bar 566–569
  listening for tab events 568–569
  setting up 567                                 U
tablet
                                                 U.S. National Oceanic and Atmospheric
  Android 3.0 and 30
                                                      Administration. See NOAA
  Android, developing for 30
                                                 UDP, fire and forget 164
                                    INDEX                                  631


UI                                      invalidate() method 236
  changes 47                            methods 77
  distortion 516                        subclasses 77
Unix, DayTime Server 370                widgets 400
update, triggering 500               View.setOnDragListener() method 587
updateDetails 551                    ViewGroup class 77, 86
Uri class 103                           inner classes 86
  custom URIs 110–114                viewport
  parse() method 106                    meta tag options 445
UriMatcher 155                          tag, adding 444
URIs 13                              views 65, 75–90
  Content 23                            and events 89
  examples 14                           assigning IDs to 94
  syntax 151                            common 76–78
URL 13                                  composite views 93
  product information 317               custom 83–85
Usage Stats 600                         defining with XML 93
user agent 446                          Devices 40
user friendly 473                       Eclipse 37
user ID 139                             Emulator Control 41
user interfaces 65–101                  File Explorer 41, 134
UsernamePasswordCredentials 176         FILL_PARENT constant 87
uses-feature 277                        Javadoc 38
uses-library 299                        Layout 48
uses-permission 25, 380                 lifecycle 85
  tag 25                                LogCat 40, 50, 60
<uses-permission> element 100           Package Explorer 37, 46
<uses-sdk> element 100                  Problems 38, 51
                                        referencing 69
                                        ViewGroup class 76–88
V                                       XML 48
                                     vnd.android.cursor.dir 153
Values 47
                                     vnd.android.cursor.item 153
values
                                     voicemail type 110
   externalizing 95
   simple value 96
Vector 331                           W
Verizon, Get It Now 7
versionCode 602                      WeatherReporter 150
versionName 602                      WeatherReporter application 110–129
video                                web camera, connecting to 268
   frame rate, setting 278           web control, desired behavior 459
   playing 264–266                   Web Inspector, WebKit 457
   recording 276–282                 web services 179–186
      permissions 276                Web Tools Platform 591
      surface object required 276    web view, ensuring proper fit 551
   size, setting 278                 WebChromeClient class 470
video application, debugging 282     WebKit 6, 10
video conferencing 282                 and KDE 440
                                       tools
video telephony 261
                                         Error Console 457
VideoView 264
                                         for testing 457
View 349
                                         Web Inspector 457
   drag-and-drop classes 580
                                     WebView browser 461
   focus methods 88
                                     WebViewClient 466
632                                                INDEX


WebViewFragment 548, 550                            X
widget instance, create 497
widgets 48                                          XML
  zombie 490                                          drawing graphics with 228–230
Wi-Fi 161                                                layout 229
  Bluetooth similar to 386                               shapes 230–231
  no emulation layer 161                                 type tag 229
WiMAX 161                                             parsing 182
Windows 7                                             resources 140
  finding IP address 168                              Schema 185
  NTLM 177                                            stream 354
Windows Mobile 10                                   xmldrawable.xml 230
WinRAR 53                                           XmlPullParser 142
WinZip 53
Workbench 592                                       Z
Worldwide Interoperability for Microwave Access.
     See WiMAX                                      zombie widgets 490
WRITE_EXTERNAL_STORAGE 276
WRITE_EXTERNALSTORAGE permission 267
WS-* 186

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:5
posted:9/9/2012
language:Unknown
pages:20