Efficient Android Threading. Asynchronous Processing Techniques for Android Applications
- Autor:
- Anders Goransson
- Ocena:
- Bądź pierwszym, który oceni tę książkę
- Stron:
- 280
- Dostępne formaty:
-
ePubMobi
Opis ebooka: Efficient Android Threading. Asynchronous Processing Techniques for Android Applications
Multithreading is essential if you want to create an Android app with a great user experience, but how do you know which techniques can help solve your problem? This practical book describes many asynchronous mechanisms available in the Android SDK, and provides guidelines for selecting the ones most appropriate for the app you’re building.
Author Anders Goransson demonstrates the advantages and disadvantages of each technique, with sample code and detailed explanations for using it efficiently. The first part of the book describes the building blocks of asynchronous processing, and the second part covers Android libraries and constructs for developing fast, responsive, and well-structured apps.
- Understand multithreading basics in Java and on the Android platform
- Learn how threads communicate within and between processes
- Use strategies to reduce the risk of memory leaks
- Manage the lifecycle of a basic thread
- Run tasks sequentially in the background with HandlerThread
- Use Java’s Executor Framework to control or cancel threads
- Handle background task execution with AsyncTask and IntentService
- Access content providers with AsyncQueryHandler
- Use loaders to update the UI with new data
Wybrane bestsellery
-
Android UI development with Jetpack Compose will help you understand the core concepts of Android’s declarative UI toolkit in a practical manner. The chapters are designed in a way to familiarize you with the latest ways of building modern Android applications with ease.
Android UI Development with Jetpack Compose. Bring declarative and native UI to life quickly and easily on Android using Jetpack Compose and Kotlin - Second Edition Android UI Development with Jetpack Compose. Bring declarative and native UI to life quickly and easily on Android using Jetpack Compose and Kotlin - Second Edition
-
Jesteś początkującym programistą, poszukujesz swojej ścieżki i zastanawiasz się właśnie nad tym, czy nie skierować uwagi w stronę aplikacji mobilnych? To książka dla Ciebie. Zawarty w niej materiał jest odpowiedni dla osoby dysponującej podstawami któregoś z języków programowania i bazowym doświa...(44.85 zł najniższa cena z 30 dni)
41.40 zł
69.00 zł(-40%) -
W tej książce znajdziesz fascynującą historię Androida, opowiedzianą przez jej bohaterów. Dowiesz się, skąd się wziął pomysł na system operacyjny dla urządzeń mobilnych, kim byli ludzie, którzy zaczęli nad nim pracę, jak powstawał zespół i jakie trudności trzeba było pokonać, aby móc rzucić wyzwa...
Androidy. Zespół, który stworzył system operacyjny Android Androidy. Zespół, który stworzył system operacyjny Android
(38.94 zł najniższa cena z 30 dni)35.94 zł
59.90 zł(-40%) -
Stwórz Grę Mobilną JavaScript React Native ES6+ React – aktualizacja 2023 Witaj w poradniku wydawnictwa poswojsku.pl, dzięki któremu wspólnie zaprogramujemy grę mobilną Falling Jumping Shapes. Stworzymy projekt od pomysłu przez grafikę, aż do kompleksowego zaprogramo...
-
Learn the essentials of working with Flutter and Dart to build full stack applications that meet the needs of a cloud-driven world. Together, the Flutter open source UI software development kit and the Dart programming language for client development provide a unified solution to building applica...(203.15 zł najniższa cena z 30 dni)
203.15 zł
239.00 zł(-15%) -
Atomowy Kotlin to książka dla wszystkich, którzy chcą nauczyć się Kotlina stosunkowo młodego, ale bardzo popularnego i pożądanego na rynku pracy języka programowania. Nieważne, czy jesteś początkującym, czy doświadczonym programistą, dzięki tej publikacji Kotlin nie będzie miał dla Ciebie żadny...(97.30 zł najniższa cena z 30 dni)
93.12 zł
139.00 zł(-33%) -
Witaj w poradniku wydawnictwa poswojsku.pl, dzięki któremu wspólnie zaprogramujemy grę mobilną Falling Jumping Shapes. Stworzymy projekt od pomysłu przez grafikę, aż do kompleksowego zaprogramowania w najwspanialszym języku programowania: JavaScript. Aby jednak to osiągnąć, najpierw...
Stwórz Grę Aplikacje Mobilne ES6+ JavaScript React Native - Hooks Stwórz Grę Aplikacje Mobilne ES6+ JavaScript React Native - Hooks
-
This book demonstrates a roadmap to making important decisions in Android app development. Clean Android Architecture shows you how to structure your app in different layers to make it clean and introduces the available technologies used for integration. This practical guide will help you underst...
Clean Android Architecture. Take a layered approach to writing clean, testable, and decoupled Android applications Clean Android Architecture. Take a layered approach to writing clean, testable, and decoupled Android applications
-
With Jetpack's libraries, tools, and guidance, developers can easily write high-quality apps. This book covers detailed explanations of essential concepts to help you get started with building, designing, and testing robust Android apps for various use cases using the most popular Jetpack librari...
Kickstart Modern Android Development with Jetpack and Kotlin. Enhance your applications by integrating Jetpack and applying modern app architectural concepts Kickstart Modern Android Development with Jetpack and Kotlin. Enhance your applications by integrating Jetpack and applying modern app architectural concepts
-
Dziś nawet małe dziecko wie, że w umiejętności programowania tkwi moc. Moc kreowania wirtualnego świata, moc wpływania na własną przyszłość, moc współpracy z maszynami, które coraz silniej wkraczają w nasze życie. W przyszłości umiejętności programistyczne zapewnią dzisiejszym dzieciom - tym mały...
App Inventor. Kurs video. Stwórz grę mobilną bez kodowania App Inventor. Kurs video. Stwórz grę mobilną bez kodowania
(49.05 zł najniższa cena z 30 dni)39.90 zł
109.00 zł(-63%)
Kup polskie wydanie:
Android. Aplikacje wielowątkowe. Techniki przetwarzania
- Autor:
- Anders Göransson
14,90 zł
49,00 zł
(24.50 zł najniższa cena z 30 dni)
Ebooka "Efficient Android Threading. Asynchronous Processing Techniques for Android Applications" przeczytasz na:
-
czytnikach Inkbook, Kindle, Pocketbook, Onyx Boox i innych
-
systemach Windows, MacOS i innych
-
systemach Windows, Android, iOS, HarmonyOS
-
na dowolnych urządzeniach i aplikacjach obsługujących formaty: PDF, EPub, Mobi
Masz pytania? Zajrzyj do zakładki Pomoc »
Audiobooka "Efficient Android Threading. Asynchronous Processing Techniques for Android Applications" posłuchasz:
-
w aplikacji Ebookpoint na Android, iOS, HarmonyOs
-
na systemach Windows, MacOS i innych
-
na dowolnych urządzeniach i aplikacjach obsługujących format MP3 (pliki spakowane w ZIP)
Masz pytania? Zajrzyj do zakładki Pomoc »
Kurs Video "Efficient Android Threading. Asynchronous Processing Techniques for Android Applications" zobaczysz:
-
w aplikacjach Ebookpoint i Videopoint na Android, iOS, HarmonyOs
-
na systemach Windows, MacOS i innych z dostępem do najnowszej wersji Twojej przeglądarki internetowej
Szczegóły ebooka
- ISBN Ebooka:
- 978-14-493-6409-0, 9781449364090
- Data wydania ebooka:
- 2014-05-22 Data wydania ebooka często jest dniem wprowadzenia tytułu do sprzedaży i może nie być równoznaczna z datą wydania książki papierowej. Dodatkowe informacje możesz znaleźć w darmowym fragmencie. Jeśli masz wątpliwości skontaktuj się z nami sklep@ebookpoint.pl.
- Język publikacji:
- angielski
- Rozmiar pliku ePub:
- 4.2MB
- Rozmiar pliku Mobi:
- 4.2MB
Spis treści ebooka
- Efficient Android Threading
- Dedication
- Preface
- Audience
- Contents of This Book
- Conventions Used in this Book
- Using Code Examples
- Safari Books Online
- How to Contact Us
- Acknowledgements
- 1. Android Components and the Need for Multiprocessing
- Android Software Stack
- Application Architecture
- Application
- Components
- Activity
- Service
- ContentProvider
- BroadcastReceiver
- Application Execution
- Linux Process
- Lifecycle
- Application start
- Application termination
- Structuring Applications for Performance
- Creating Responsive Applications Through Threads
- Summary
- I. Fundamentals
- 2. Multithreading in Java
- Thread Basics
- Execution
- Single-Threaded Application
- Multithreaded Application
- Increased resource consumption
- Increased complexity
- Data inconsistency
- Thread Basics
- Thread Safety
- Intrinsic Lock and Java Monitor
- Synchronize Access to Shared Resources
- Using the intrinsic lock
- Using explicit locking mechanisms
- Example: Consumer and Producer
- 2. Multithreading in Java
- Task Execution Strategies
- Concurrent Execution Design
- Summary
- 3. Threads on Android
- Android Application Threads
- UI Thread
- Binder Threads
- Background Threads
- Android Application Threads
- The Linux Process and Threads
- Scheduling
- Priority
- Control groups
- Scheduling
- Summary
- 4. Thread Communication
- Pipes
- Basic Pipe Use
- Example: Text Processing on a Worker Thread
- Pipes
- Shared Memory
- Signaling
- BlockingQueue
- Android Message Passing
- Example: Basic Message Passing
- Classes Used in Message Passing
- MessageQueue
- MessageQueue.IdleHandler
- Example: Using IdleHandler to terminate an unused thread
- Message
- Initialized
- Pending
- Dispatched
- Recycled
- Looper
- Looper termination
- The UI thread Looper
- Handler
- Setup
- Message creation
- Message insertion
- Example: Two-way message passing
- Message processing
- Removing Messages from the Queue
- Observing the Message Queue
- Taking a snapshot of the current message queue
- Tracing the message queue processing
- Communicating with the UI Thread
- Summary
- 5. Interprocess Communication
- Android RPC
- Binder
- Android RPC
- AIDL
- Synchronous RPC
- Asynchronous RPC
- Message Passing Using the Binder
- One-Way Communication
- Two-Way Communication
- Summary
- 6. Memory Management
- Garbage Collection
- Thread-Related Memory Leaks
- Thread Execution
- Inner classes
- Static inner classes
- The lifecycle mismatch
- Thread Execution
- Thread Communication
- Sending a data message
- Posting a task message
- Avoiding Memory Leaks
- Use Static Inner Classes
- Use Weak References
- Stop Worker Thread Execution
- Retain Worker Threads
- Clean Up the Message Queue
- Summary
- II. Asynchronous Techniques
- 7. Managing the Lifecycle of a Basic Thread
- Basics
- Lifecycle
- Interruptions
- Uncaught Exceptions
- Basics
- Thread Management
- Definition and Start
- Anonymous inner class
- Public thread
- Static inner class thread definition
- Summary of options for thread definition
- Definition and Start
- Retention
- Retaining a thread in an Activity
- Retaining a thread in a Fragment
- 7. Managing the Lifecycle of a Basic Thread
- Summary
- 8. HandlerThread: A High-Level Queueing Mechanism
- Fundamentals
- Lifecycle
- Use Cases
- Repeated Task Execution
- Related Tasks
- Example: Data persistence with SharedPreferences
- Task Chaining
- Example: Chained network calls
- Conditional Task Insertion
- Summary
- 9. Control over Thread Execution Through the Executor Framework
- Executor
- Thread Pools
- Predefined Thread Pools
- Custom Thread Pools
- ThreadPoolExecutor configuration
- Designing a Thread Pool
- Sizing
- Dynamics
- Bounded or unbounded task queue
- Thread configuration
- Extending ThreadPoolExecutor
- Lifecycle
- Shutting Down the Thread Pool
- Thread Pool Uses Cases and Pitfalls
- Favoring thread creation over queuing
- Handling preloaded task queues
- The danger of zero core threads
- Task Management
- Task Representation
- Submitting Tasks
- Individual submission
- invokeAll
- invokeAny
- Rejecting Tasks
- ExecutorCompletionService
- Summary
- 10. Tying a Background Task to the UI Thread with AsyncTask
- Fundamentals
- Creation and Start
- Cancellation
- States
- Example: Limiting an AsyncTask execution to one at the time
- Fundamentals
- Implementing the AsyncTask
- Example: Downloading Images
- Background Task Execution
- Application Global Execution
- Execution Across Platform Versions
- Custom Execution
- Example: Nonglobal sequential execution
- AsyncTask Alternatives
- When an AsyncTask Is Trivially Implemented
- Background Tasks That Need a Looper
- Local Service
- Using execute(Runnable)
- Summary
- 11. Services
- Why Use a Service for Asynchronous Execution?
- Local, Remote, and Global Services
- Creation and Execution
- Lifecycle
- Started Service
- Implementing onStartCommand
- Options for Restarting
- User-Controlled Service
- Example: Bluetooth connection
- Task-Controlled Service
- Example: Concurrent download
- Bound Service
- Local Binding
- Choosing an Asynchronous Technique
- Summary
- 12. IntentService
- Fundamentals
- Good Ways to Use an IntentService
- Sequentially Ordered Tasks
- Example: Web service communication
- Sequentially Ordered Tasks
- Asynchronous Execution in BroadcastReceiver
- Example: Periodical long operations
- IntentService Versus Service
- Summary
- 13. Access ContentProviders with AsyncQueryHandler
- Brief Introduction to ContentProvider
- Justification for Background Processing of a ContentProvider
- Using the AsyncQueryHandler
- Example: Expanding Contact List
- Understanding the AsyncQueryHandler
- Limitations
- Summary
- 14. Automatic Background Execution with Loaders
- Loader Framework
- LoaderManager
- initLoader vs restartLoader
- LoaderManager
- LoaderCallbacks
- AsyncTaskLoader
- Loader Framework
- Painless Data Loading with CursorLoader
- Using the CursorLoader
- Example: Contact list
- Adding CRUD Support
- Example: Use CursorLoader with AsyncQueryHandler
- Implementing Custom Loaders
- Loader Lifecycle
- Background Loading
- Example: Simple custom loader
- Content Management
- Delivering Cached Results
- Example: Custom File Loader
- Handling Multiple Loaders
- Summary
- 15. Summary: Selecting an Asynchronous Technique
- Keep It Simple
- Thread and Resource Management
- Message Communication for Responsiveness
- Avoid Unexpected Task Termination
- Easy Access to ContentProviders
- A. Bibliography
- Books
- Articles
- Presentations
- Index
- Colophon
- Copyright
O'Reilly Media - inne książki
-
JavaScript gives web developers great power to create rich interactive browser experiences, and much of that power is provided by the browser itself. Modern web APIs enable web-based applications to come to life like never before, supporting actions that once required browser plug-ins. Some are s...(177.65 zł najniższa cena z 30 dni)
186.15 zł
219.00 zł(-15%) -
How will software development and operations have to change to meet the sustainability and green needs of the planet? And what does that imply for development organizations? In this eye-opening book, sustainable software advocates Anne Currie, Sarah Hsu, and Sara Bergman provide a unique overview...(160.65 zł najniższa cena z 30 dni)
169.14 zł
199.00 zł(-15%) -
OpenTelemetry is a revolution in observability data. Instead of running multiple uncoordinated pipelines, OpenTelemetry provides users with a single integrated stream of data, providing multiple sources of high-quality telemetry data: tracing, metrics, logs, RUM, eBPF, and more. This practical gu...(143.65 zł najniższa cena z 30 dni)
143.65 zł
169.00 zł(-15%) -
Interested in developing embedded systems? Since they don't tolerate inefficiency, these systems require a disciplined approach to programming. This easy-to-read guide helps you cultivate good development practices based on classic software design patterns and new patterns unique to embedded prog...(152.15 zł najniższa cena z 30 dni)
160.65 zł
189.00 zł(-15%) -
If you use Linux in your day-to-day work, then Linux Pocket Guide is the perfect on-the-job reference. This thoroughly updated 20th anniversary edition explains more than 200 Linux commands, including new commands for file handling, package management, version control, file format conversions, an...(92.65 zł najniższa cena z 30 dni)
92.65 zł
109.00 zł(-15%) -
Gain the valuable skills and techniques you need to accelerate the delivery of machine learning solutions. With this practical guide, data scientists, ML engineers, and their leaders will learn how to bridge the gap between data science and Lean product delivery in a practical and simple way. Dav...(237.15 zł najniższa cena z 30 dni)
245.65 zł
289.00 zł(-15%) -
This practical book provides a detailed explanation of the zero trust security model. Zero trust is a security paradigm shift that eliminates the concept of traditional perimeter-based security and requires you to "always assume breach" and "never trust but always verify." The updated edition off...(203.15 zł najniższa cena z 30 dni)
203.15 zł
239.00 zł(-15%) -
Decentralized finance (DeFi) is a rapidly growing field in fintech, having grown from $700 million to $100 billion over the past three years alone. But the lack of reliable information makes this area both risky and murky. In this practical book, experienced securities attorney Alexandra Damsker ...(194.65 zł najniższa cena z 30 dni)
203.15 zł
239.00 zł(-15%) -
Whether you're a startup founder trying to disrupt an industry or an entrepreneur trying to provoke change from within, your biggest challenge is creating a product people actually want. Lean Analytics steers you in the right direction.This book shows you how to validate your initial idea, find t...(126.65 zł najniższa cena z 30 dni)
126.65 zł
149.00 zł(-15%) -
When it comes to building user interfaces on the web, React enables web developers to unlock a new world of possibilities. This practical book helps you take a deep dive into fundamental concepts of this JavaScript library, including JSX syntax and advanced patterns, the virtual DOM, React reconc...(194.65 zł najniższa cena z 30 dni)
203.15 zł
239.00 zł(-15%)
Dzieki opcji "Druk na żądanie" do sprzedaży wracają tytuły Grupy Helion, które cieszyły sie dużym zainteresowaniem, a których nakład został wyprzedany.
Dla naszych Czytelników wydrukowaliśmy dodatkową pulę egzemplarzy w technice druku cyfrowego.
Co powinieneś wiedzieć o usłudze "Druk na żądanie":
- usługa obejmuje tylko widoczną poniżej listę tytułów, którą na bieżąco aktualizujemy;
- cena książki może być wyższa od początkowej ceny detalicznej, co jest spowodowane kosztami druku cyfrowego (wyższymi niż koszty tradycyjnego druku offsetowego). Obowiązująca cena jest zawsze podawana na stronie WWW książki;
- zawartość książki wraz z dodatkami (płyta CD, DVD) odpowiada jej pierwotnemu wydaniu i jest w pełni komplementarna;
- usługa nie obejmuje książek w kolorze.
Masz pytanie o konkretny tytuł? Napisz do nas: sklep[at]helion.pl.
Książka, którą chcesz zamówić pochodzi z końcówki nakładu. Oznacza to, że mogą się pojawić drobne defekty (otarcia, rysy, zagięcia).
Co powinieneś wiedzieć o usłudze "Końcówka nakładu":
- usługa obejmuje tylko książki oznaczone tagiem "Końcówka nakładu";
- wady o których mowa powyżej nie podlegają reklamacji;
Masz pytanie o konkretny tytuł? Napisz do nas: sklep[at]helion.pl.
Książka drukowana
Oceny i opinie klientów: Efficient Android Threading. Asynchronous Processing Techniques for Android Applications Anders Goransson (0) Weryfikacja opinii następuję na podstawie historii zamówień na koncie Użytkownika umieszczającego opinię. Użytkownik mógł otrzymać punkty za opublikowanie opinii uprawniające do uzyskania rabatu w ramach Programu Punktowego.