Programming Android : [Java programming for the new generation of mobile devices 🔍
Meike, G. Blake;Dornin, Laird;Mednieks, Zigurd R.;Nakamura, Masumi O'Reilly Media, Incorporated, 2nd ed, 2012
英语 [en] · PDF · 15.9MB · 2012 · 📘 非小说类图书 · 🚀/lgli/upload · Save
描述
What does it take to build well-engineered Android applications? Explore Android's core building blocks and APIs in depth with this authoritative guide, and learn how to create compelling apps that work on a full range of Android devices. You'll work with proven approaches to app design and implementation including application frameworks that you can use as a starting point for your own projects. Delve into sensors, native development, 3D graphics, and many other topics, and discover how to build apps on the platform of your choice. If you're an intermediate to advanced programmer, you'll learn how to make great Android apps. Learn how to use the Android SDK with the Eclipse IDE Apply advanced Java concepts regardless of your experience with the language Create an Android user interface that's captivating and easy to navigate Use the Fragment API for tablet user interfaces Make your application compatible with Honeycomb and earlier versions Understand Android's unique database design issues and the role of SQLite Use sensors and gestures to expand your app's input beyond just tapping and scrolling Explore Android APIs for multimedia, location, communication, NFC, and other applications
备用文件名
lgli/P:\kat_magz\50 Assorted Books Collection Set-45\Programming Android.pdf
备选标题
Programming Android, First Edition
备选标题
Программирование под Android
备选作者
Mednieks, Zigurd, Dornin, Laird, Meike, G. Blake, Nakamura, Masumi
备选作者
Zigurd Mednieks, Laird Dornin, G. Blake Meike, and Masumi Nakamura
备选作者
Zigurd R Mednieks; Laird Dornin; G. Blake Meike; Masumi Nakamura
备选作者
Зигард Медникс [и др.]; [пер. с англ. О. Сивченко]
备选作者
by Zigurd Mednieks ... [et al.]
备选作者
Медникс, Зигард
备用出版商
Питер
备用版本
Серия "Бестселлеры O'Reilly", Москва [и др.], Russia, 2012
备用版本
1st ed., Sebastopol, Calif, California, 2011
备用版本
United States, United States of America
备用版本
O'Reilly Media, Sebastopol, CA, 2011
备用版本
1. ed, Beijing u.a, 2011
元数据中的注释
producers:
Antenna House PDF Output Library 2.6.0 (Linux)
元数据中的注释
类型: 图书
元数据中的注释
出版日期: 2011.07
元数据中的注释
Includes index.
"Java programming for the new generation of mobile devices"--Cover.
元数据中的注释
Пер.: Programming Android Beijing : O'Reilly, 2011 cop. 978-1449389697
元数据中的注释
РГБ
元数据中的注释
Russian State Library [rgb] MARC:
=001 006730728
=005 20140210143443.0
=008 140131s2012\\\\ru\\\\\\\\\\\\000\0\rus\d
=017 \\ $a 14-1183 $b RuMoRKP
=020 \\ $a 978-5-459-01115-9
=040 \\ $a RuMoRGB $b rus $e rcr
=041 0\ $a rus $h eng
=084 \\ $a З884.16-56-05,0 $2 rubbk
=084 \\ $a З973.233-018.2,0 $2 rubbk
=245 00 $a Программирование под Android $h [Текст] $c Зигард Медникс [и др.] ; [пер. с англ. О. Сивченко]
=260 \\ $a Москва [и др.] $b Питер $c 2012
=300 \\ $a 496 с. $b ил. $c 23 см
=336 \\ $a текст (text) $b txt $2 rdacontent
=337 \\ $a неопосредованный (unmediated) $b n $2 rdamedia
=338 \\ $a том (volume) $b nc $2 rdacarrier
=490 0\ $a Серия "Бестселлеры O'Reilly"
=534 \\ $p Пер.: $t Programming Android $c Beijing : O'Reilly, 2011 cop. $z 978-1449389697
=650 \7 $a Радиоэлектроника -- Электрическая связь -- Радиосвязь -- Радиотелефонная связь. Сотовая связь. Мобильная связь -- Радиотелефоны. Сотовые телефоны -- Автоматизация $2 rubbk
=650 \7 $a Вычислительная техника -- Вычислительные машины электронные цифровые -- Автоматическая обработка информации -- Программирование -- Операционные системы. Пакеты прикладных программ $2 rubbk
=650 \7 $a ANDROID, операционная система $x Программирование $0 RU\NLR\AUTH\661580521 $2 nlr_sh
=700 1\ $a Медникс, Зигард
=852 \\ $a РГБ $b FB $j 2 14-7/65 $x 90
=852 \\ $a РГБ $b FB $j 2 14-7/66 $x 90
备用描述
Table of Contents 5
Preface 15
How This Book Is Organized 15
Conventions Used in This Book 16
Using Code Examples 16
Safari® Books Online 17
How to Contact Us 17
Acknowledgments 18
Part I. Tools and Basics 21
Chapter 1. Installing the Android SDK and Prerequisites 23
Installing the Android SDK and Prerequisites 23
The Java Development Kit (JDK) 24
The Eclipse Integrated Development Environment (IDE) 25
The Android SDK 27
Adding Build Targets to the SDK 28
The Android Developer Tools (ADT) Plug-in for Eclipse 29
Using the Install New Software Wizard to download and install the ADT plug-in 30
Configuring the ADT plug-in 32
Test Drive: Confirm That Your Installation Works 32
Making an Android Project 32
Making an Android Virtual Device (AVD) 36
Running a Program on an AVD 39
Running a Program on an Android Device 40
Troubleshooting SDK Problems: No Build Targets 41
Components of the SDK 41
The Android Debug Bridge (adb) 41
The Dalvik Debug Monitor Server (DDMS) 41
Components of the ADT Eclipse Plug-in 43
The Android Layout Editor 44
The Android Manifest Editor 44
XML editors for other Android XML files 44
Building Android apps 44
Running and debugging Android apps 45
The DDMS 45
Android Virtual Devices 45
QEMU 45
The SDK and AVD Manager 46
Other SDK Tools 46
Hierarchy Viewer 46
Layoutopt 46
Monkey 46
sqlite3 46
keytool 47
Zipalign 47
Draw 9-patch 47
android 47
Keeping Up-to-Date 47
Keeping the Android SDK Up-to-Date 48
Keeping Eclipse and the ADT Plug-in Up-to-Date 48
Keeping the JDK Up-to-Date 49
Example Code 50
SDK Example Code 50
Example Code from This Book 50
On Reading Code 51
Chapter 2. Java for Android 53
Android Is Reshaping Client-Side Java 53
The Java Type System 54
Primitive Types 54
Objects and Classes 55
Object Creation 55
The Object Class and Its Methods 57
Objects, Inheritance, and Polymorphism 59
Final and Static Declarations 61
Abstract Classes 65
Interfaces 66
Exceptions 68
The Java Collections Framework 71
Collection interface types 72
Collection implementation types 73
Java generics 74
Garbage Collection 75
Scope 75
Java Packages 76
Access Modifiers and Encapsulation 77
Idioms of Java Programming 79
Type Safety in Java 79
Encapsulation 80
Getters and setters 80
Using Anonymous Classes 82
Modular Programming in Java 84
Basic Multithreaded Concurrent Programming in Java 87
Synchronization and Thread Safety 88
Thread Control with wait() and notify() Methods 91
Synchronization and Data Structures 92
Chapter 3. The Ingredients of an Android Application 95
Traditional Programming Models Compared to Android 95
Activities, Intents, and Tasks 97
Other Android Components 99
Service 99
Content Providers 100
Using a content provider 101
Content providers and the Internet 102
BroadcastReceiver 103
Component Life Cycles 103
The Activity Life Cycle 103
On Porting Software to Android 105
Static Application Resources and Context 106
Organizing Java Source 107
Resources 108
Application Manifests 110
Initialization Parameters in AndroidManifest.xml 111
Packaging an Android Application: The .apk File 114
The Android Application Runtime Environment 114
The Dalvik VM 115
Zygote: Forking a New Process 115
Sandboxing: Processes and Users 115
The Android Libraries 116
Extending Android 118
The Android Application Template 118
Overrides and Callbacks 119
Polymorphism and Composition 121
Extending Android Classes 122
Concurrency in Android 124
AsyncTask and the UI Thread 125
Threads in an Android Process 136
Serialization 138
Java Serialization 139
Parcelable 140
Classes That Support Serialization 144
Serialization and the Application Life Cycle 145
Chapter 4. Getting Your Application into Users’ Hands 147
Application Signing 147
Public Key Encryption and Cryptographic Signing 147
How Signatures Protect Software Users, Publishers, and Secure Communications 149
Self-signed certificates for Android software 149
Signing an Application 150
Debug certificates 150
Creating a self-signed certificate 151
Don’t lose it! 152
Using a self-signed certificate to sign an application 153
Placing an Application for Distribution in the Android Market 155
Becoming an Official Android Developer 155
Uploading Applications in the Market 156
Getting Paid 158
Alternative Distribution 159
Verizon Applications for Android 159
How to submit to the Verizon Apps store for Android 160
Technical tips for Verizon Android development 160
Related links 161
Amazon Applications for Android 161
Google Maps API Keys 163
Specifying API-Level Compatibility 164
Compatibility with Many Kinds of Screens 164
Testing for Screen Size Compatibility 165
Resource Qualifiers and Screen Sizes 165
Chapter 5. Eclipse for Android Software Development 167
Eclipse Concepts and Terminology 168
Plug-ins 168
Workspaces 169
Java Environments 170
Eclipse’s Java Runtime Environment 170
The Java compiler 170
The application runtime 170
Projects 171
Builders and Artifacts 171
Extensions 171
Associations 173
Eclipse Views and Perspectives 173
The Package Explorer View 174
The Task List View 174
The Outline View 175
The Problems View 175
Java Coding in Eclipse 176
Editing Java Code and Code Completion 176
Refactoring 176
Eclipse and Android 178
Preventing Bugs and Keeping Your Code Clean 178
Static Analyzers 178
FindBugs 179
Applying Static Analysis to Android Code 183
Limitations of Static Analysis 186
Eclipse Idiosyncrasies and Alternatives 186
Part II. About the Android Framework 189
Chapter 6. Building a View 191
Android GUI Architecture 191
The Model 191
The View 192
The Controller 193
Putting It Together 193
Assembling a Graphical Interface 195
Wiring Up the Controller 200
Listening to the Model 202
Listening for Touch Events 207
Multiple Pointers and Gestures 210
Listening for Key Events 212
Choosing an Event Handler 213
Advanced Wiring: Focus and Threading 215
The Menu and the Action Bar 219
View Debugging and Optimization 222
Chapter 7. Fragments and Multiplatform Support 225
Creating a Fragment 226
Fragment Life Cycle 229
The Fragment Manager 230
Fragment Transactions 231
The Support Package 236
Fragments and Layout 237
Chapter 8. Drawing 2D and 3D Graphics 245
Rolling Your Own Widgets 245
Layout 246
Measurement 248
Arrangement 250
Canvas Drawing 251
Drawing text 255
Matrix transformations 256
Drawables 262
Bitmaps 267
Bling 268
Shadows, Gradients, Filters, and Hardware Acceleration 271
Animation 273
Transition animation 273
Background animation 276
Surface view animation 278
OpenGL Graphics 278
Chapter 9. Handling and Persisting Data 283
Relational Database Overview 283
SQLite 284
The SQL Language 284
SQL Data Definition Commands 285
SQLite types 286
Database constraints 287
SQL Data Manipulation Commands 288
Additional Database Concepts 290
Database Transactions 291
Example Database Manipulation Using sqlite3 291
SQL and the Database-Centric Data Model for Android Applications 295
The Android Database Classes 296
Database Design for Android Applications 297
Basic Structure of the SimpleVideoDbHelper Class 297
Using the Database API: MJAndroid 300
Android and Social Networking 300
The Source Folder (src) 302
Loading and Starting the Application 303
Database Queries and Reading Data from the Database 303
Using the query method 307
Modifying the Database 307
Inserting data into the database 307
Using the insert method 308
Using the execSQL method 308
Updating data already in the database 310
Using the update method 310
Using the execSQL method 310
Deleting data in the database 311
Using the delete method 311
Using the execSQL method 312
Part III. A Skeleton Application for Android 313
Chapter 10. A Framework for a Well-Behaved Application 315
Visualizing Life Cycles 316
Visualizing the Activity Life Cycle 316
Memory recovery and life cycles 322
Life cycle methods of the Activity class 324
Saving and restoring instance state 324
Configuration changes and the activity life cycle 325
Minor life cycle methods of the Activity class 327
Visualizing the Fragment Life Cycle 328
The Activity Class and Well-Behaved Applications 331
The Activity Life Cycle and the User Experience 331
Life Cycle Methods of the Application Class 332
Chapter 11. Building a User Interface 335
Top-Level Design 336
Fragment, Activity, and Scalable Design 337
Visual Editing of User Interfaces 339
Starting with a Blank Slate 339
Laying Out the Fragments 343
Lay Out Fragments Using the Visual Editor 344
Multiple Layouts 345
Folding and Unfolding a Scalable UI 346
Decisions about Screen Size and Resolution 346
Delegating to Fragment Classes 350
Making Activity, Fragment, Action Bar, and Multiple Layouts Work Together 353
Action Bar 353
Tabs and Fragments 353
The Other Activity 356
Chapter 12. Using Content Providers 361
Understanding Content Providers 362
Implementing a Content Provider 363
Browsing Video with Finch 364
The simple video database 365
Structure of the simple version of the code 365
Defining a Provider Public API 365
Defining the CONTENT_URI 366
Creating the Column Names 368
Declaring Column Specification Strings 368
Writing and Integrating a Content Provider 370
Common Content Provider Tasks 370
Extending ContentProvider 370
File Management and Binary Data 372
Android MVC and Content Observation 374
A Complete Content Provider: The SimpleFinchVideoContentProvider Code 375
The SimpleFinchVideoContentProvider Class and Instance Variables 375
Implementing the onCreate Method 377
Implementing the getType Method 378
Implementing the Provider API 378
The query method 378
The insert method 380
The update method 381
The delete method 382
Determining How Often to Notify Observers 383
Declaring Your Content Provider 383
Chapter 13. A Content Provider as a Facade for a RESTful Web Service 385
Developing RESTful Android Applications 386
A “Network MVC” 387
Summary of Benefits 389
Code Example: Dynamically Listing and Caching YouTube Video Content 390
Structure of the Source Code for the Finch YouTube Video Example 391
Stepping Through the Search Application 392
Step 1: Our UI Collects User Input 393
Step 2: Our Controller Listens for Events 393
Step 3: The Controller Queries the Content Provider with a managedQuery on the Content Provider/Model 394
Step 4: Implementing the RESTful Request 394
Constants and Initialization 395
Creating the Database 395
A Networked Query Method 395
RESTfulContentProvider: A REST helper 398
UriRequestTask 401
YouTubeHandler 403
insert and ResponseHandlers 408
File Management: Storing Thumbnails 410
Part IV. Advanced Topics 413
Chapter 14. Search 415
Search Interface 415
Search Basics 415
Search logic 415
Index-based search logic 416
Database-backed search logic 417
Searchable configuration 419
Searchable activity 420
Search Dialog 422
Search Widget 423
Query Suggestions 424
Recent Query Suggestions 424
Custom Query Suggestions 425
Chapter 15. Location and Mapping 431
Location-Based Services 432
Mapping 433
The Google Maps Activity 433
The MapView and MapActivity 434
Working with MapViews 435
MapView and MyLocationOverlay Initialization 435
Pausing and Resuming a MapActivity 438
Controlling the Map with Menu Buttons 439
Controlling the Map with the Keypad 441
Location Without Maps 442
The Manifest and Layout Files 442
Connecting to a Location Provider and Getting Location Updates 443
Updating the Emulated Location 446
Using geo to update location 447
Using DDMS to update location 447
StreetView 450
Chapter 16. Multimedia 453
Audio and Video 453
Playing Audio and Video 454
Audio Playback 455
MediaPlayer audio playback 455
AudioTrack audio playback 456
Video Playback 457
Recording Audio and Video 458
Audio Recording 459
MediaRecorder audio recording 459
Intent audio recording 461
AudioRecorder audio recording 461
Video Recording 462
MediaRecorder video recording 463
Intent video recording 463
Stored Media Content 463
Chapter 17. Sensors, NFC, Speech, Gestures, and Accessibility 465
Sensors 465
Position 467
Accelerometer 468
Gyroscope 468
Rotation vector 468
Linear acceleration 469
Gravity 469
Other Sensors 469
Near Field Communication (NFC) 470
Reading a Tag 471
Writing to a Tag 477
P2P Mode and Beam 479
API levels 10−13 479
Beam: API level 14+ 480
Gesture Input 481
Accessibility 483
Chapter 18. Communication, Identity, Sync, and Social Media 487
Account Contacts 487
Authentication and Synchronization 490
Authentication 491
Synchronization 498
Bluetooth 505
The Bluetooth Protocol Stack 505
Bluetooth-specific protocols and adopted protocols 506
BlueZ: The Linux Bluetooth Implementation 507
Using Bluetooth in Android Applications 507
Bluetooth and related I/O classes 508
The DeviceListActivity class 520
The BtConsoleActivity class 520
Chapter 19. The Android Native Development Kit (NDK) 521
Native Methods and JNI Calls 522
Conventions in Native Method Calls 522
Conventions on the Java Side 523
The Android NDK 524
Setting Up the NDK Environment 524
Editing C/C++ Code in Eclipse 524
Compiling with the NDK 525
JNI, NDK, and SDK: A Sample App 526
Native Libraries and Headers Provided by the NDK 527
Building Your Own Custom Library Modules 529
Native Activities 532
Index 539
备用描述
What does it take to build well-engineered Android applications? Explore Android's core building blocks and APIs in depth with this authoritative guide, and learn how to create compelling apps that work on a full range of Android devices. You'll work with proven approaches to app design and implementation—including application frameworks that you can use as a starting point for your own projects.Delve into sensors, native development, 3D graphics, and many other topics, and discover how to build apps on the platform of your choice. If you're an intermediate to advanced programmer, you'll learn how to make great Android apps.Learn how to use the Android SDK with the Eclipse IDEApply advanced Java concepts regardless of your experience with the languageCreate an Android user interface that's captivating and easy to navigateUse the Fragment API for tablet user interfacesMake your application compatible with Honeycomb and earlier versionsUnderstand Android's unique database design issues and the role of SQLiteUse sensors and gestures to expand your app's input beyond just tapping and scrollingExplore Android APIs for multimedia, location, communication, NFC, and other applications
开源日期
2022-03-08
更多信息……

🚀 快速下载

成为会员以支持书籍、论文等的长期保存。为了感谢您对我们的支持,您将获得高速下载权益。❤️

🐢 低速下载

由可信的合作方提供。 更多信息请参见常见问题解答。 (可能需要验证浏览器——无限次下载!)

所有选项下载的文件都相同,应该可以安全使用。即使这样,从互联网下载文件时始终要小心。例如,确保您的设备更新及时。
  • 对于大文件,我们建议使用下载管理器以防止中断。
    推荐的下载管理器:Motrix
  • 您将需要一个电子书或 PDF 阅读器来打开文件,具体取决于文件格式。
    推荐的电子书阅读器:Anna的档案在线查看器ReadEraCalibre
  • 使用在线工具进行格式转换。
    推荐的转换工具:CloudConvertPrintFriendly
  • 您可以将 PDF 和 EPUB 文件发送到您的 Kindle 或 Kobo 电子阅读器。
    推荐的工具:亚马逊的“发送到 Kindle”djazz 的“发送到 Kobo/Kindle”
  • 支持作者和图书馆
    ✍️ 如果您喜欢这个并且能够负担得起,请考虑购买原版,或直接支持作者。
    📚 如果您当地的图书馆有这本书,请考虑在那里免费借阅。