𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Android Cookbook (Early Release)

✍ Scribed by Ian F. Darwin


Publisher
O'Reilly Media
Year
2011
Tongue
English
Leaves
689
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Getting started -- Designing a sucessful application -- Testing -- Inter-/Intra-Process communication -- Content providers -- Graphics -- Graphical user interface -- GUI alerts: menus, dialogs, toasts, and notifications -- GUI : listview -- Multimedia -- Data persistence -- Telephone applications -- Networked applications -- Gaming and animation -- Social networking -- Location and map applications -- Accelerometer -- Bluetooth -- System and device control -- Other programming languages and frameworks -- Strings and internationalization -- Packaging, deploying, and distributing/selling your app

✦ Table of Contents


Table of Contents......Page 6
About Android......Page 14
What's in this Book?......Page 15
Conventions Used in This Book......Page 17
How to Contact Us......Page 18
Solution......Page 20
See Also......Page 21
Discussion......Page 22
Discussion......Page 24
Problem......Page 29
Discussion......Page 31
1.6Β  Set Up an IDE on Windows to Develop for Android......Page 42
Solution......Page 43
1. Install JDK (Java Development Kit)......Page 44
2. Install Eclipse for Java Development......Page 45
3. Install Android SDK (Software Development Kit)......Page 46
4. Android Development Tools (ADT) Plug-in......Page 48
Discussion......Page 51
Discussion......Page 52
1.9Β  Email Text From a View......Page 54
Solution......Page 55
Problem......Page 57
Discussion......Page 58
1.12Β  Installing apps onto an Android Emulator......Page 59
Solution......Page 60
See Also......Page 61
Discussion......Page 62
Discussion......Page 67
Problem......Page 68
Solution......Page 69
Discussion......Page 71
Solution......Page 74
Discussion......Page 75
Problem......Page 80
Discussion......Page 81
1. Member Class......Page 82
2. Interface Type......Page 83
4. Implementation in Activity......Page 85
5. Attribute in View Layout for OnClick Events......Page 86
Discussion......Page 88
Solution......Page 89
Discussion......Page 90
1.21Β  Program: Tipster, a tip calculator for the Android OS......Page 92
Discussion......Page 94
Binary Download URL......Page 108
Mobile Phone Market Growth......Page 110
Device features......Page 112
Data Feeds and Feed Formats......Page 113
Discussion......Page 114
Discussion......Page 116
Discussion......Page 117
Where to Catch Exceptions......Page 118
1. Setup broadcast receiver......Page 119
Discussion......Page 120
Using onRetainNonConfigurationInstance()......Page 122
Discussion......Page 124
Discussion......Page 126
Problem......Page 132
Problem......Page 133
Problem......Page 134
Discussion......Page 135
Discussion......Page 136
Discussion......Page 142
Discussion......Page 143
Discussion......Page 145
Introduction......Page 147
Use Case 1: Processing in the background......Page 149
Use Case 2: Processing in the foreground......Page 151
Discussion......Page 153
Problem......Page 155
Discussion......Page 156
Discussion......Page 157
2.21Β  Formatting the time and date display......Page 158
Discussion......Page 159
See Also......Page 160
Discussion......Page 161
See Also......Page 163
Discussion......Page 164
See Also......Page 169
Discussion......Page 170
Discussion......Page 172
Solution......Page 176
logcat......Page 177
Example Code (with error)......Page 179
Solution......Page 180
Discussion......Page 181
Discussion......Page 182
Discussion......Page 183
3.7Β  Sending text messages and placing calls between AVDs......Page 184
Discussion......Page 185
See Also......Page 189
Problem......Page 194
Discussion......Page 195
Discussion......Page 196
Discussion......Page 198
Discussion......Page 204
5.3Β  Using a Custom Font......Page 205
Discussion......Page 206
Problem......Page 210
Discussion......Page 212
Problem......Page 215
Discussion......Page 216
Solution......Page 218
Discussion......Page 219
Solution......Page 220
Discussion......Page 221
Discussion......Page 224
Problem......Page 226
Discussion......Page 228
Problem......Page 235
Discussion......Page 237
See Also......Page 246
Solution......Page 248
5.12Β  Simple Raster Animation......Page 251
Discussion......Page 253
See Also......Page 255
Discussion......Page 258
6.3Β  SlidingDrawer Overlapping other UI components......Page 259
Solution......Page 260
Source Download URL......Page 262
Solution......Page 263
Solution......Page 265
FragmentTestActivity.java......Page 266
TestFragment.java......Page 267
Binary Download URL......Page 268
Problem......Page 269
Custom haptic feedback using the device's vibrator......Page 270
Stock Haptic Feedback Events......Page 271
Discussion......Page 273
Discussion......Page 276
See Also......Page 278
Discussion......Page 281
Discussion......Page 282
Discussion......Page 283
Discussion......Page 285
Discussion......Page 287
A Better Way......Page 289
See Also......Page 290
Discussion......Page 291
Solution......Page 292
Discussion......Page 293
Solution......Page 296
Discussion......Page 297
Discussion......Page 299
6.18Β  Using CheckBoxes and RadioButtons......Page 300
Discussion......Page 301
Discussion......Page 305
Solution......Page 307
1. Create an XML file for title bar......Page 314
3. Change your layout files......Page 316
Solution......Page 317
Solution......Page 321
Source Download URL......Page 328
Discussion......Page 329
General Formatters......Page 330
Discussion......Page 333
Discussion......Page 341
Solution......Page 345
Discussion......Page 346
Problem......Page 347
Binary Download URL......Page 348
1. Create a LoadingScreen layout file......Page 350
3. Open LoadingScreenActivity from say your List from onListItemClick event......Page 351
Source Download URL......Page 352
Discussion......Page 355
Discussion......Page 357
Discussion......Page 359
Discussion......Page 362
Discussion......Page 365
Problem......Page 366
Discussion......Page 367
Solution......Page 368
Discussion......Page 369
Discussion......Page 370
Discussion......Page 371
Discussion......Page 374
Discussion......Page 381
6.42Β  Using SlidingDrawer to Overlap Other Components......Page 382
Discussion......Page 383
Problem......Page 386
Discussion......Page 387
Discussion......Page 391
Solution......Page 392
Discussion......Page 394
Solution......Page 398
Discussion......Page 404
Discussion......Page 405
Solution......Page 411
Discussion......Page 412
7.9Β  Orientation Changes : From ListView data values to Landscape Charting......Page 415
Solution......Page 416
Source Download URL......Page 424
Discussion......Page 426
Discussion......Page 427
Discussion......Page 430
Discussion......Page 433
Discussion......Page 436
Discussion......Page 439
Solution......Page 440
Discussion......Page 441
Discussion......Page 442
Source Download URL......Page 444
Discussion......Page 446
Discussion......Page 448
Discussion......Page 450
Solution......Page 456
Gotchas......Page 457
Discussion......Page 458
See Also......Page 460
9.7Β  Creating a SQLite database in an Android application.......Page 461
Discussion......Page 462
Discussion......Page 463
Solution......Page 464
The Code......Page 465
Discussion......Page 467
Discussion......Page 470
Parsing XML with the XmlPullParser......Page 472
Making it more strict......Page 474
Problem......Page 475
9.15Β  Adding a Contact......Page 476
Discussion......Page 478
Discussion......Page 480
9.17Β  Parsing JSON using JSONObject......Page 482
Discussion......Page 483
Binary Download URL......Page 484
Solution......Page 486
Discussion......Page 487
Final notes......Page 488
Discussion......Page 490
What happens if two receivers process outgoing calls?......Page 492
Discussion......Page 494
Discussion......Page 495
Discussion......Page 497
Source Download URL......Page 498
Solution......Page 499
Discussion......Page 500
Problem......Page 510
Using URL and URLConnection......Page 511
Using HTTPClient......Page 512
Discussion......Page 513
Source Download URL......Page 514
Solution......Page 515
Discussion......Page 519
Discussion......Page 521
Binary Download URL......Page 523
Discussion......Page 524
Discussion......Page 526
Solution......Page 527
Problem......Page 529
Solution......Page 530
Source Download URL......Page 534
Solution......Page 536
Discussion......Page 537
Solution......Page 544
3. Implement the click event......Page 545
Discussion......Page 547
Source Download URL......Page 548
Binary Download URL......Page 550
Solution......Page 552
Discussion......Page 553
Discussion......Page 554
Write The setMockLocation Method......Page 556
What's Happening?......Page 557
Discussion......Page 558
14.6Β  Getting ready for Google Maps development......Page 559
Create a new Android project which targets "Google APIs - 1.5 - API level 3"......Page 560
Adding the MapView element to your layout file......Page 562
Registering the Google Maps API key......Page 563
Necessary changes in the AndroidManifest.xml file......Page 564
Source Download URL......Page 565
Discussion......Page 567
Discussion......Page 568
Solution......Page 569
Discussion......Page 570
See Also......Page 572
Adding the ItemizedOverlay to your MapView......Page 575
Using MyItemizedOverlay in onCreate......Page 577
Discussion......Page 579
Solution......Page 580
Overview......Page 581
Overriding the ItemizedOverlay::draw() function......Page 582
MetarItem::draw() function......Page 583
Source Download URL......Page 585
Discussion......Page 586
TabLayout (main.xml)......Page 587
Layout for MapView (Maptabview.xml)......Page 589
MapTabView.java - Map Activity......Page 590
Solution......Page 591
Discussion......Page 592
Discussion......Page 594
Solution......Page 595
14.20Β  Using a scale on an OpenStreetMap......Page 598
Discussion......Page 601
14.22Β  Getting location updates with OpenStreetMaps......Page 603
Discussion......Page 606
Source Download URL......Page 607
Binary Download URL......Page 611
Discussion......Page 612
Discussion......Page 615
Discussion......Page 616
Discussion......Page 617
Discussion......Page 619
Discussion......Page 620
See Also......Page 621
Discussion......Page 622
Discussion......Page 625
Solution......Page 626
Discussion......Page 627
2 Create a class file to load list......Page 628
Source Download URL......Page 629
Discussion......Page 630
Discussion......Page 631
Discussion......Page 633
Discussion......Page 635
Solution......Page 636
Discussion......Page 638
Source Download URL......Page 639
Discussion......Page 640
Discussion......Page 642
Solution......Page 643
Discussion......Page 644
Pick a language (Python)......Page 645
18.4Β  Running Native Code with JNI on the NDK......Page 646
Discussion......Page 647
Discussion......Page 651
Discussion......Page 653
18.7Β  Sharing your scripts (ASE) using QR codes......Page 655
Discussion......Page 656
Discussion......Page 657
Ian's Basic Steps: Internationalization......Page 660
Discussion......Page 661
Is it really that simple?......Page 662
See Also......Page 663
Discussion......Page 666
Step 1......Page 667
Step 3......Page 668
Step 4......Page 669
Step 6......Page 670
Signing Up As an Android Developer......Page 671
20.4Β  Creating a Signing Certificate......Page 673
Discussion......Page 674
Generating a key pair (public and private keys) and a signing certificate......Page 675
Discussion......Page 676
Configuration File......Page 677
See Also......Page 678
Discussion......Page 679
See Also......Page 681
Solution......Page 682
2) Post Message......Page 683
Discussion......Page 684
22.1Β  Names......Page 686


πŸ“œ SIMILAR VOLUMES


Head First Android Development (Early Re
✍ Jonathan Simon πŸ“‚ Library πŸ“… 2011 πŸ› O'Reilly Media 🌐 English

Android devices are stealing market share from the iPhone with dramatic speed, and you have a killer app idea. Where to begin? Head First Android Development will help you get your first application up and running in no time with the Android SDK and Eclipse plug-in. Youll learn how to design for dev

Azure Cookbook (4th Early Release)
✍ Reza Salehi πŸ“‚ Library πŸ“… 2023 πŸ› O'Reilly Media, Inc. 🌐 English

How do you deal with the problems you face when using Azure? This practical guide provides over 75 recipes to help you to work with common Azure issues in everyday scenarios. That includes key tasks like setting up permissions for a storage account, working with Cosmos DB APIs, managing Azure role-b

Excel Cookbook (2nd Early Release)
✍ Dawn Griffiths πŸ“‚ Library πŸ“… 2023 πŸ› O'Reilly Media, Inc. 🌐 English

This easy-to-use book is the perfect resource for intermediate to advanced users of Excel. It's filled with tips, tricks, and techniques to help you master tools and features and become more productiveβ€”fast. Inside, you'll find complete recipes that you can use right away for more than a dozen topic

Embedded Android: Porting, Extending, an
✍ Karim Yaghmour πŸ“‚ Library πŸ“… 2011 πŸ› O'Reilly 🌐 English

Embedded Android is for Developers wanting to create embedded systems based on Android and for those wanting to port Android to new hardware, or creating a custom development environment. Hackers and moders will also find this an indispensible guide to how Android works.

Java Cookbook - Problems and Solutions f
✍ Ian F. Darwin πŸ“‚ Library πŸ“… 2020 πŸ› O’Reilly 🌐 English

Java continues to grow and evolve, and this Cookbook continues to evolve in tandem. This book helps to get you up to speed right away with hundreds of hands-on recipes across a broad range of Java topics. You’ll learn useful techniques for everything from string handling and functional programming t