Meier, R: Professional Android
(Sprache: Englisch)
The comprehensive developer guide to the latest Android features and capabilitiesProfessional Android, 4th Edition shows developers how to leverage the latest features of Android to create robust and compelling mobile apps. This hands-on approach provides...
Leider schon ausverkauft
versandkostenfrei
Buch
49.90 €
- Lastschrift, Kreditkarte, Paypal, Rechnung
- Kostenlose Rücksendung
Produktdetails
Produktinformationen zu „Meier, R: Professional Android “
Klappentext zu „Meier, R: Professional Android “
The comprehensive developer guide to the latest Android features and capabilitiesProfessional Android, 4th Edition shows developers how to leverage the latest features of Android to create robust and compelling mobile apps. This hands-on approach provides in-depth coverage through a series of projects, each introducing a new Android platform feature and highlighting the techniques and best practices that exploit its utmost functionality. The exercises begin simply, and gradually build into advanced Android development. Clear, concise examples show you how to quickly construct real-world mobile applications.This book is your guide to smart, efficient, effective Android development.* Learn the best practices that get more out of Android* Understand the anatomy, lifecycle, and UI metaphor of Android apps* Design for all mobile platforms, including tablets* Utilize both the Android framework and Google Play services
Inhaltsverzeichnis zu „Meier, R: Professional Android “
INTRODUCTION xxxiCHAPTER 1: HELLO, ANDROID 1Android Application Development 1A Little Background 2The Not-So-Distant Past 3Living in the Future 3The Android Ecosystem 3Pre-installed Android Applications 4Android SDK Features 5What Does Android Run On? 6Why Develop for Mobile? 6Why Develop for Android? 7Introducing the Development Framework 7What Comes in the Box 8Understanding the Android Software Stack 8The Android Run Time 10Android Application Architecture 11Android Libraries 12CHAPTER 2: GETTING STARTED 13Getting Started Developing Android Apps 14Developing for Android 15What You Need to Begin 15Creating Your First Android Application 20Getting Started Writing Android Apps Using Kotlin 35Using the Android Support Library Package 36Developing for Mobile and Embedded Devices 39Hardware-Imposed Design Considerations 39Considering the User's Environment 43Developing for Android 44Android Development Tools 48Android Studio 49The Android Virtual Device Manager 51The Android Emulator 51Android Profiler 52The Android Debug Bridge 54APK Analyzer 54The Lint Tool 55Monkey, Monkey Runner, and Espresso UI Testing 55Gradle 56CHAPTER 3: APPLICATIONS AND ACTIVITIES AND FRAGMENTS, OH MY! 57Applications, Activities, and Fragments 58The Components of an Android Application 58The Android Application Life Cycle, Priority, and Process States 59Introducing the Android Application Class 61A Closer Look at Android Activities 61Creating Activities 62Using the AppCompatActivity 63The Activity Life Cycle 64Responding to Memory Pressure 71Introducing Fragments 73Creating New Fragments 73The Fragment Life Cycle 74Introducing the Fragment Manager 79Adding Fragments to Activities 79Communicating Between Fragments and Activities 85Fragments without User Interfaces 86Building an Earthquake Viewer Application 87CHAPTER 4: DEFINING THE ANDROID MANIFEST AND GRADLE BUILD FILES, AND EXTERNALIZING RESOURCES 95The Manifest, Build Files, and Resources 96Introducing the Android Manifest 96Configuring the
... mehr
Gradle Build 101Gradle Settings File 101Project Gradle Build File 102Module Gradle Build Files 102Externalizing Resources 107Creating Resources 108Using Resources 119Creating Resources for Different Languages and Hardware 122Runtime Configuration Changes 126CHAPTER 5: BUILDING USER INTERFACES 129Fundamental Android Design 130Density-Independent Design 130Android User Interface Fundamentals 131Assigning User Interfaces to Activities 132Introducing Layouts 132Defining Layouts 134Using Layouts to Create Device-Independent User Interfaces 136Optimizing Layouts 139The Android Widget Toolbox 143Working with Lists and Grids 144Recycler View and Layout Managers 145Introducing Adapters 146Returning to the Earthquake Viewer Application 149Introducing Data Binding 150Enabling Data Binding 151Variables in Data Binding 152Data Binding for the Earthquake Viewer Application 153Creating New Views 155Modifying Existing Views 155Creating Compound Controls 159Creating Simple Compound Controls as a Layout 161Creating Custom Views 162Using Custom Controls 176CHAPTER 6: INTENTS AND BROADCAST RECEIVERS 177Using Intents and Broadcast Receivers 178Using Intents to Launch Activities 178Explicitly Starting New Activities 179Implicit Intents and Late Runtime Binding 179Determining If an Intent Will Resolve 180Returning Results from Activities 181Using Platform-Native Actions to Launch Activities 184Creating Intent Filters to Receive Implicit Intents 186Defining an Intent Filter 186Using Intent Filters for Plug-Ins and Extensibility 194Introducing Linkify 198Native Linkify Link Types 198Creating Custom Link Strings 199Using the Match Filter 200Using the Transform Filter 200Using Intents to Broadcast Events 200Broadcasting Events with Intents 201Listening for Intent Broadcasts with Broadcast Receivers 202Registering Broadcast Receivers in Code 203Registering Broadcast Receivers in Your Application Manifest 204Managing Manifest Receivers at Run Time 204Monitoring Device State Changes through Broadcast Intents 205Introducing the Local Broadcast Manager 207Introducing Pending Intents 208CHAPTER 7: USING INTERNET RESOURCES 211Connecting to the Internet 211Connecting, Downloading, and Parsing Internet Resources 212Why Build a Native Internet App? 212Connecting to an Internet Resource 213Performing Network Operations on Background Threads Using View Models, Live Data, and Asynchronous Tasks 214Parsing XML Using the XML Pull Parser 219Connecting the Earthquake Viewer to the Internet 220Parsing JSON Using the JSON Parser 228Using the Download Manager 233Downloading Files 233Customizing Download Manager Notifications 235Specifying a Download Location 237Canceling and Removing Downloads 238Querying the Download Manager 238Best Practices for Downloading Data without Draining the Battery 241An Introduction to Internet Services and Cloud Computing 242CHAPTER 8: FILES, SAVING STATE, AND USER PREFERENCES 245Saving Files, States, and Preferences 246Saving and Restoring Activity and Fragment InstanceState Using the Lifecycle Handlers 246Retaining Instance State with Headless Fragments and View Models 248View Models and Live Data 248Headless Fragments 251Creating and Saving Shared Preferences 252Retrieving Shared Preferences 253Introducing On Shared Preference Change Listeners 254Configuring Auto Backup of Application Files and Shared Preferences 254Building a Preference UI 256Using the Preference Support Library 256Defining a Preference Screen Layout in XML 257Introducing the Preference Fragment 260Creating a Settings Activity for the Earthquake Monitor 261Including Static Files as Resources 267Working with the Filesystem 267File-Management Tools 267Creating Files on Application-Specifi c Internal Storage 268Creating Files on Application-Specifi c External Storage 268Accessing Public Directories Using Scoped Directory Access 270Sharing Files Using File Provider 274Creating a File Provider 274Sharing a File Using a File Provider 275Receiving a File from a File Provider 275Accessing Files from Other Applications Using the Storage Access Framework 275Requesting Temporary Access to Files 276Requesting Persistent Access to Files 277Requesting Access to Directories 277Creating New Files 278Using URI-Based Permissions 278CHAPTER 9: CREATING AND USING DATABASES 281Introducing Structured Data Storage in Android 282Storing Data Using the Room Persistence Library 282Adding the Room Persistence Library 283Defining a Room Database 284Persisting Complex Objects Using Type Convertors 286Defining Room Database Interactions Using Data Access Objects 288Performing Room Database Interactions 291Monitoring Query Result Changes with Live Data 292Persisting Earthquakes to a Database with Room 294Working with SQLite Databases 298Input Validation and SQL Injection 299Cursors and Content Values 299Defining a Database Contract 300Introducing the SQLiteOpenHelper 300Opening Databases with the SQLite Open Helper 302Opening and Creating Databases without the SQLite Open Helper 303Adding, Updating, and Deleting Rows 303Querying a Database 305Extracting Values from a Cursor 307Introducing the Firebase Realtime Database 308Adding Firebase to Your App 309Defining a Firebase Database and Defining Access Rules 311Adding, Modifying, Deleting, and Querying Data from a Firebase Realtime Database 313CHAPTER 10: CONTENT PROVIDERS AND SEARCH 317Introducing Content Providers 318Why Should I Use Content Providers? 318Creating Content Providers 319Creating the Content Provider's Database 320Registering Content Providers 321Publishing Your Content Provider's URI Address 321Implementing Content Provider Queries 322Content Provider Transactions 325Sharing Files Using a Content Provider 327Adding Permission Requirements to Content Providers 328Accessing Content Providers with Content Resolvers 330Querying Content Providers 330Cancelling Queries 333Querying for Content Asynchronously with a Cursor Loader 333Adding, Deleting, and Updating Content 336Accessing Files Stored in Content Providers 338Accessing Permission-Restricted Content Providers 339Using Native Android Content Providers 341Accessing the Call Log 341Using the Media Store Content Provider 342Using the Contacts Content Provider 344Using the Calendar Content Provider 351Adding Search to Your Application 354Defining Your Search Metadata 354Creating a Search Results Activity 355Searching a Content Provider 357Using the Search View Widget 360Providing Search Suggestions Using a Content Provider 362CHAPTER 11: WORKING IN THE BACKGROUND 377Working in the Background 378Using Background Threads 379Using Asynchronous Tasks to Run Tasks Asynchronously 379Manual Thread Creation Using Handler Threads 383Scheduling Background Jobs 385Creating a Job Service for the Job Scheduler 386Scheduling Jobs with the Job Scheduler 388Scheduling Jobs with the Firebase Job Dispatcher 391Scheduling Work with the Work Manager 393An Earthquake-Monitoring Job Service Example 396Using Notifications to Notify Users 401Introducing the Notification Manager 401Working with Notification Channels 402Creating Notifications 403Setting a Notification's Priority 407Adding Notification Actions 411Adding Direct Reply Actions 412Grouping Multiple Notifications 413Adding Notifications to the Earthquake Monitor 414Using Firebase Cloud Messaging 417Triggering Notifications Remotely with Firebase Notifications 418Receiving Data with Firebase Cloud Messaging 421Using Alarms 422Creating, Setting, and Canceling Alarms 423Setting an Alarm Clock 424Introducing Services 424Using Bound Services 425Creating a Started Service 427CHAPTER 12: IMPLEMENTING THE ANDROIDDESIGN PHILOSOPHY 433Introducing the Android Design Philosophy 434Designing for Every Screen 434Resolution Independence 435Supporting and Optimizing for Different Screen Sizes 436Creating Scalable Graphics Assets 439Introducing Material Design 445Thinking in Terms of Paper and Ink 446Using Color and Keylines as Guides 447Continuity through Motion 449Material Design UI Elements 452The App Bar 452Applying Material Design to the Earthquake Monitor 455Using Cards to Display Content 456Floating Action Buttons 460CHAPTER 13: IMPLEMENTING A MODERN ANDROID USER EXPERIENCE 463The Modern Android UI 464Creating Consistent, Modern User InterfacesUsing AppCompat 464Creating and Applying Themes Using AppCompat 465Creating Theme Overlays for Specific Views 466Adding a Menu and Actions to the App Bar 467Defining a Menu Resource 467Adding a Menu to an Activity 468Adding a Menu to a Fragment 469Updating Menu Items Dynamically 469Handling Menu Selections 470Adding Action Views and Action Providers 470Going Beyond the Default App Bar 472Replacing Your App Bar with a Toolbar 472Advanced Scrolling Techniques for the Toolbar 473Incorporating Menus without the App Bar 476Improving the Earthquake Monitor's App Bar 477App Navigation Patterns 479Navigating with Tabs 479Implementing a Bottom Navigation Bar 482Using a Navigation Drawer 485Combining Navigation Patterns 491Adding Tabs to the Earthquake Monitor 492Choosing the Right Level of Interruption 496Initiating a Dialog 497Let's Make a Toast 498Inline Interruptions with Snackbars 499CHAPTER 14: ADVANCED CUSTOMIZATION OF YOUR USER INTERFACE 501Expanding the User Experience 502Supporting Accessibility 502Supporting Navigation without a Touch Screen 502Providing a Textual Description of Each View 503Introducing Android Text-to-Speech 503Using Speech Recognition 505Using Speech Recognition for Voice Input 506Using Speech Recognition for Search 507Controlling Device Vibration 508Going Full Screen 508Working with Property Animations 510Enhancing Your Views 513Advanced Canvas Drawing 514Creating Interactive Controls 530Composite Drawable Resources 536Transformative Drawables 536Layer Drawables 537State List Drawables 537Level List Drawables 538Copy, Paste, and the Clipboard 539Copying Data to the Clipboard 539Pasting Clipboard Data 539CHAPTER 15: LOCATION, CONTEXTUAL AWARENESS,AND MAPPING 541Adding Location, Maps, and Contextual Awareness to YourApplications 542Introducing Google Play Services 542Adding Google Play Services to Your Application 543Determining the Availability of Google Play Services 545Finding Device Location Using Google Location Services 546Using the Emulator to Test Location-Based Functionality 548Finding the Last Known Location 549"Where Am I" Example 551Requesting Location Change Updates 555Changing Device Location Settings 560Updating the Location in the "Where Am I" Example 563Best Practices When Using Location 566Setting and Managing Geofences 567Using the Legacy Platform Location-Based Services 571Selecting a Location Provider 572Finding the Last Known Location 574Requesting Location Change Updates 575Best Practice for Using the Legacy Location-Based Services 577Using the Geocoder 580Reverse Geocoding 581Forward Geocoding 582Geocoding Where Am I 583Creating Map-Based Activities 585Getting Your Maps API Key 586Creating a Map-Based Activity 586Configuring Google Maps 589Changing the Camera Position with Camera Updates 590Mapping Where Am I 592Displaying the Current Location with the My Location Layer 596Displaying Interactive Map Markers 596Adding Shapes to Google Maps 599Adding Image Overlays to Google Maps 602Adding Markers and Shapes to Where Am I 602Mapping the Earthquake Example 605Adding Contextual Awareness 609Connecting to the Google Play Services API Client and Obtaining API Keys 610Using Awareness Snapshots 612Setting and Monitoring Awareness Fences 613Awareness Best Practices 617CHAPTER 16: HARDWARE SENSORS 619Introducing Android Sensors 620Using the Sensor Manager 620Understanding the Android Sensors 621Discovering and Identifying Sensors 623Determining Sensor Capabilities 625Wakeup and Non-Wakeup Sensors 627Monitoring Sensor Results 627Interpreting Sensor Values 632Testing Sensors with the Android Virtual Device and Emulator 635Best Practices for Working with Sensors 637Monitoring a Device's Movement and Orientation 637Determining the Natural Orientation of a Device 638Introducing Accelerometers 639Detecting Acceleration Changes 640Creating a Gravitational Force Meter 642Determining a Device's Orientation 645Creating a Compass and Artificial Horizon 650Using the Environmental Sensors 654Using the Barometer Sensor 654Creating a Weather Station 655Using Body Sensors 659User Activity Recognition 662CHAPTER 17: AUDIO, VIDEO, AND USING THE CAMERA 665Playing Audio and Video, and Using the Camera 666Playing Audio and Video 666Introducing the Media Player 667Using Media Player for Video Playback 669Using ExoPlayer for Video Playback 672Requesting and Managing Audio Focus 674Pausing Playback When the Output Changes 676Responding to the Volume Controls 677Working with a Media Session 678Using the Media Router and Cast Application Framework 682Background Audio Playback 686Building an Audio Playback Service 686Using a Media Browser to Connect Your Activity to aMedia Browser Service 688Life Cycle of a Media Browser Service 690Playing Audio as a Foreground Service 691Creating Media Style Notifications 693Using the Media Recorder to Record Audio 695Using the Camera for Taking Pictures 697Using Intents to Take Pictures 697Controlling the Camera Directly 699Reading and Writing JPEG EXIF Image Details 706Recording Video 706Using Intents to Record Video 707Using the Media Recorder to Record Video 707Adding Media to the Media Store 710Inserting Media Using the Media Scanner 710Inserting Media Manually 711CHAPTER 18: COMMUNICATING WITH BLUETOOTH,NFC, AND WI-FI PEER-TO-PEER 713Networking and Peer-to-Peer Communication 713Transferring Data Using Bluetooth 714Managing the Local Bluetooth Device Adapter 714Being Discoverable and Remote Device Discovery 716Bluetooth Communications 720Bluetooth Profiles 725Bluetooth Low Energy 726Transferring Data Using Wi-Fi Peer-to-Peer 728Initializing the Wi-Fi Peer-to-Peer Framework 729Discovering Peers 731Connecting with Peers 732Transferring Data between Peers 733Using Near Field Communication 735Reading NFC Tags 735Using the Foreground Dispatch System 736Using Android Beam 738Creating Android Beam Messages 739Assigning the Android Beam Payload 740Receiving Android Beam Messages 742CHAPTER 19: INVADING THE HOME SCREEN 743Customizing the Home Screen 743Introducing Home Screen Widgets 744Defining the Widget Layout 745Defining Your Widget Size and Other Metadata 746Implementing Your Widget 748Updating the Widget UI Using the App Widget Manager and Remote Views 749Forcing Refreshes of Your Widget Data and UI 753Creating and Using a Widget Configuration Activity 756Creating an Earthquake Widget 757Introducing Collection View Widgets 763Creating Collection View Widget Layouts 764Updating Collection View Items with a Remote Views Factory 765Updating Collection View Items with a Remote Views Service 767Populating Collection View Widgets Using a Remote Views Service 768Adding Interactivity to the Items within a Collection View Widget 769Refreshing Your Collection View Widgets 770Creating an Earthquake Collection View Widget 770Creating Live Wallpaper 777Creating a Live Wallpaper Definition Resource 778Creating a Wallpaper Service Engine 778Creating a Wallpaper Service 780Creating App Shortcuts 781Static Shortcuts 783Dynamic Shortcuts 784Tracking App Shortcut Use 785CHAPTER 20: ADVANCED ANDROID DEVELOPMENT 787Advanced Android 788Paranoid Android 788Linux Kernel Security 788Re-introducing Permissions 789Storing Keys in the Android Keystore 792Using the Fingerprint Sensor 792Dealing with Different Hardware and Software Availability 793Specifying Required Hardware 794Confirming Hardware Availability 795Building Backward-Compatible Applications 795Optimizing UI Performance with Strict Mode 797Telephony and SMS 798Telephony 799Sending and Receiving SMS Messages 806CHAPTER 21: RELEASING, DISTRIBUTING, AND MONITORING APPLICATIONS 825Preparing for Release 826Preparing Release Support Material 826Preparing Your Code for a Release Build 827Updating Application Metadata in Your Application Manifest 828Reviewing Application Installation Restrictions 828Application Versioning 830Signing Production Builds of Your Application 830Creating a Keystore and Signing Key with Android Studio 832Obtaining API Keys Based on Your Private Release Key 833Building and Signing a Production Release 834Distributing Your Application on the Google Play Store 835Introducing the Google Play Store 835Getting Started with the Google Play Store 836Creating an Application on the Google Play Store 837Publishing Your Application 845Monitoring Your Application in Production 848An Introduction to Monetizing Applications 853Application Marketing, Promotion, and Distribution Strategies 854Application Launch Strategies 854Internationalization 855Using Firebase to Monitor Your Application 856Adding Firebase to Your Application 856Using Firebase Analytics 857Firebase Performance Monitoring 860INDEX 863
... weniger
Autoren-Porträt von Reto Meier, Ian Lake
About the authorsReto Meier has been helping Android developers create the best applications possible for their users since the initial Android release in 2007. Reto is an experienced software developer with more than 20 years of experience in application design and development. He has spent 10 years as a Developer Advocate, contributing countless articles, online training, conference talks, and YouTube videos to the developer community.Ian Lake has approached Android development from multiple angles over the course of the last 8 years. Ian has worked professionally on high profile Android apps as an application developer, provided outreach to the development community as a Developer Advocate, and has contributed to improving the Android framework APIs themselves as part of the Android Framework team.
Bibliographische Angaben
- Autoren: Reto Meier , Ian Lake
- 4. Auflage, XXXVI, 887 Seiten, Maße: 18,9 x 23,6 cm, Kartoniert (TB), Englisch
- Verlag: John Wiley & Sons
- ISBN-10: 1118949528
- ISBN-13: 9781118949528
- Erscheinungsdatum: 04.12.2018
Sprache:
Englisch
Kommentar zu "Meier, R: Professional Android"
Schreiben Sie einen Kommentar zu "Meier, R: Professional Android".
Kommentar verfassen