Android high performance programming build fast and efficient Android apps that run as reliably as clockwork in a multi-device world

Build fast and efficient Android apps that run as reliably as clockwork in a multi-device world About This Book Wide coverage of various topics that help in developing optimal applications Explore the concepts of Advanced Native Coding in depth A must-have for professional-standard Android developer...

Descripción completa

Detalles Bibliográficos
Otros Autores: Mañas, Enrique López, author (author), Grancini, Diego, author
Formato: Libro electrónico
Idioma:Inglés
Publicado: Birmingham : Packt Publishing 2016.
Edición:1st edition
Colección:Community experience distilled.
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009630317006719
Tabla de Contenidos:
  • Cover
  • Copyright
  • Credits
  • About the Authors
  • About the Reviewer
  • www.PacktPub.com
  • Table of Contents
  • Preface
  • Chapter 1: Introduction: Why High Performance?
  • Why does the performance of an application mean so much to so many?
  • Manual testing and automatic testing
  • ANR and delays in software
  • What triggers ANRs and how can I avoid them?
  • Android architecture
  • Dalvik Virtual Machine
  • Memory management
  • Energy consumption
  • Java language
  • Native Development Kit or how to develop with native code when needed
  • Three limits in application responsiveness
  • Business value of software quality
  • Summary
  • Chapter 2: Efficient Debugging
  • Android Debug Bridge
  • Dalvik Debug Monitor Server
  • Capturing and analyzing thread information
  • Heap analysis and visualization
  • Allocation tracker
  • Network usage
  • Emulator Control
  • System status
  • Debugging the UI
  • Profiling with Hierarchy Viewer
  • Systrace
  • Android device debug options
  • Android Instant Run
  • GPU profiler
  • Running a trace
  • ClassyShark
  • Getting started
  • Summary
  • Chapter 3: Building Layouts
  • Walkthrough
  • Rendering performance
  • Screen tearing and VSYNC
  • Hardware acceleration
  • Overdraw
  • Multi-window mode
  • Overview
  • Configuration
  • Management
  • Drag and drop
  • Performance impact
  • Best practices
  • Provided layout overview
  • Hierarchical layout management
  • Reusing layouts
  • ViewStub
  • AdapterViews and view recycling
  • The ViewHolder pattern
  • Custom views and layouts
  • Screen zoom
  • Debugging tools
  • The Design view
  • Hierarchy Viewer
  • Tree View
  • View properties
  • Tree overview
  • Layout View
  • On device tools
  • Debugging GPU overdraw
  • Profile GPU rendering
  • Systrace
  • Summary
  • Chapter 4: Memory
  • Walkthrough
  • How memory works
  • Garbage collection
  • Shared memory
  • Runtime.
  • Android N JIT compiler
  • Memory leak
  • Memory churn
  • References
  • Memory-side projects
  • Project Svelte and Android N
  • Best practices
  • Data types
  • Autoboxing
  • Sparse array family
  • ArrayMap
  • Syntax
  • Collections
  • Enumerations
  • Constants
  • Object management
  • Strings
  • String concatenation
  • Local variables
  • Arrays versus collections
  • Streams
  • Memory patterns
  • The object pool pattern
  • The FlyWeight pattern
  • Android component leaks
  • Activities
  • Services
  • Processes
  • The memory API
  • Main components and memory management
  • Debugging tools
  • LogCat
  • Dalvik
  • ART
  • The ActivityManager API
  • StrictMode
  • Dumpsys
  • Meminfo
  • ProcStats
  • Summary
  • Chapter 5: Multithreading
  • Walkthrough
  • Threading basics
  • Multicore CPUs
  • Threads
  • Multithreaded applications
  • Thread safety
  • Android multithreading environment
  • Processes
  • Android application thread
  • The UI thread
  • Worker threads
  • The binder thread
  • Android thread messaging
  • Best practices
  • Threads
  • HandlerThread
  • When to use
  • AsyncTask
  • Methods
  • Generics parameters
  • States management
  • Executor
  • When to use
  • Loaders
  • LoaderManager
  • LoaderCallbacks&lt
  • D&gt
  • Provided loaders
  • When to use
  • Services
  • Life cycle
  • Started Service
  • Bound Service
  • IntentService
  • Inter-process communication
  • Remote Procedure Call
  • AIDL
  • Messenger
  • Advanced techniques
  • BroadcastReceiver asynchronous techniques
  • ContentProvider asynchronous techniques
  • Repeating tasks
  • Debugging tools
  • StrictMode
  • Summary
  • Chapter 6: Networking
  • Walkthrough
  • Protocols
  • Methods
  • Headers
  • Timeout
  • Content
  • Compression
  • Response code
  • Connection types
  • Best practices
  • Latency gauging
  • Batching connections
  • Prefetching
  • Queuing connections
  • Caching responses
  • Cache control.
  • Last-Modified
  • If-Modified-Since
  • Exponential back-off
  • Polling versus pushing
  • Provided APIs
  • SyncManager
  • Android N changes
  • Data Saver
  • Background optimization
  • GcmNetworkManager
  • Debugging tools
  • Android N Networking ADB tool
  • Fiddler
  • Wireshark
  • Application Resource Optimizer
  • Network attenuation
  • Speed and delay emulation
  • Fiddler
  • Network Link Conditioner
  • Network Attenuator
  • Summary
  • Chapter 7: Security
  • WhatsApp - the eternal showcase of "no-gos
  • Going deeper into the code
  • Capturing an APK file
  • Pulling a file from the device
  • Capturing an APK using Wireshark
  • Using external websites
  • Autopsy of an APK file
  • Code injection
  • Opcodes
  • Injecting new code
  • Signing and rebuilding the application
  • Protecting our application
  • Insecure storage
  • SharedPreferences
  • InternalStorage
  • ExternalStorage
  • Deleting files
  • Using external or internal storage
  • Databases
  • Performance in databases
  • SQL injections
  • ORM frameworks
  • OrmLite
  • SugarORM
  • GreenDAO
  • Realm
  • Network
  • Encrypted communication
  • Sniffing
  • Summary
  • Chapter 8: Optimizing Battery Consumption
  • Analysis
  • Monitoring battery level and charging status
  • How to identify changes in the charging status
  • Determining and reacting to changes in the battery level
  • Doze feature and App Standby
  • Understanding Doze
  • Avoiding useless network requests
  • Dealing with BroadcastReceivers on demand
  • Networking
  • Summary
  • Chapter 9: Native Coding in Android
  • Getting started - setting up NDK in our system
  • JNI
  • Initial concepts
  • Creating our first HelloWorld-JNI
  • Creating a native activity with Android NDK
  • Debugging NDK
  • Android.mk
  • More variables in NDK
  • TARGET_PLATFORM
  • TARGET_ARCH
  • TARGET_ABI
  • NDK macros
  • Application.mk
  • Including existing libraries.
  • Exporting header files
  • Summary
  • Chapter 10: Performance Tips
  • Bitmaps
  • Loading
  • Processing
  • Caching
  • Displaying
  • Managing memory
  • Image optimization
  • Resolution
  • Compression
  • Serialization
  • JSON improvements
  • JSON alternatives
  • Protocol buffers
  • Flat buffers
  • Local serialization
  • Code improvements
  • Getters and setters
  • Inner classes
  • Java 8 in Android N
  • Setup
  • Features
  • Default interface methods
  • Static interface methods
  • Lambda expression
  • Repeating annotations
  • Jack toolchain
  • APK optimizations
  • Removing unused code
  • Removing unused resources
  • Summary
  • Index.