Pro Android Apps Performance Optimization [electronic resource] /
Guihot, Herv.author.
Today's Android apps developers are often running into the need to refine, improve and optimize their apps performances. As more complex apps can be created, it is even more important for developers to deal with this critical issue.  Android allows developers to write apps using Java, C or a combination of both with the Android SDK and the Android NDK. Pro Android Apps Performance Optimization reveals how to fine-tune your Android apps, making them more stable and faster. In this book, you'll learn the following: How to optimize your Java code with the SDK, but also how to write and optimize native code using advanced features of the Android NDK such as using ARM single instruction multiple data (SIMD) instructions (in C or assembly) How to use multithreading in your application, how make best use of memory and how to maximize battery life How to use to some OpenGL optimizations and to Renderscript, a new feature in Android 3.0 (Honeycomb) and expanded in Android 4.0 (Ice Cream Sandwich). After reading and using this book, you'll be a better coder and your apps will be better-coded. Better-performing apps mean better reviews and eventually, more money for you as the app developer or your indie shop.
Title Page; Copyright Page; Contents at a Glance; Table of Contents; About the Author; About the Technical Reviewers; AcknowledgmentsI; Introduction; Chapter 1 Optimizing Java Code; How Android Executes Your Code; Optimizing Fibonacci; From Recursive To Iterative; BigInteger; Caching Results; android.util.LruCache; API Levels; Fragmentation; Data Structures; Responsiveness; Lazy initializations; StrictMode; SQLite; SQLite Statements; Transactions; Queries; Summary; Chapter 2 Getting Started With the NDK; What Is In the NDK?; Mixing Java and C/C++ Code; Declaring the Native Method
Implementing the JNI Glue LayerJava usesCreating the Makefiles; Implementing the Native Function; Compiling the Native Library; Loading the Native Library; Application.mk; Optimizing For (Almost) All Devices; Supporting All Devices; Android.mk; Performance Improvements With C/C++; More About JNI; Strings; Accessing Fields or Methods; Native Activity; Building the Missing Library; Alternative; Summary; Chapter 3 Advanced NDK; Assembly; Greatest Common Divisor; Color Conversion; Parallel Computation of Average; ARM Instructions; ARM NEON; CPU Features; C Extensions; Built-in Functions
Vector InstructionsTips; Inlining Functions; Unrolling Loops; Preloading Memory; LDM/STM Instead Of LDR/STD; Summary; Chapter 4 Using Memory Efficiently; A Word On Memory; Data Types; Comparing Values; Other Algorithms; Sorting Arrays; Defining Your Own Classes; Accessing Memory; The Cache's Line Size; Laying Out Your Data; Garbage Collection; Memory Leaks; References; Strong References; Soft, Weak, and Phantom References; Garbage Collection; APIs; Low Memory; Summary; Chapter 5 Multithreading and Synchronization; Threads; AsyncTask; Handlers and Loopers; Handlers; Loopers; Data Types
Synchronized, Volatile, Memory ModelConcurrency; Multicore; Modifying Algorithm For Multicore; Using Concurrent Cache; Activity Lifecycle; Passing Information; Remembering State; Summary; Chapter 6 Benchmarking And Profiling; Measuring Time; System.nanoTime(); Debug.threadCpuTimeNanos(); Tracing; Debug.startMethodTracing(); Using the Traceview Tool; Traceview in DDMS; Native Tracing; Generating Trace File For Traceview; Logging; Summary; Chapter 7 Maximizing Battery Life; Batteries; Measuring Battery Usage; Disabling Broadcast Receivers; Disabling and Enabling the Broadcast Receiver
NetworkingBackground Data; Data Transfer; Location; Unregistering a Listener; Frequency of Updates; Multiple Providers; Filtering Providers; Last Known Location; Sensors; Graphics; Alarms; Scheduling Alarms; WakeLocks; Preventing Issues; Summary; Chapter 8 Graphics; Optimizing Layouts; RelativeLayout; Merging Layouts; Reusing Layouts; View Stubs; Layout Tools; Hierarchy Viewer; layoutopt; OpenGL ES; Extensions; Texture Compression; Other Texture Compression Formats; Manifest; Mipmaps; Multiple APKs; Shaders; Scene Complexity; Culling; Render Mode; Power Consumption; Summary
Chater 9 RenderScript
Includes index.
Today's Android apps developers are often running into the need to refine, improve and optimize their apps performances. As more complex apps can be created, it is even more important for developers to deal with this critical issue.  Android allows developers to write apps using Java, C or a combination of both with the Android SDK and the Android NDK. Pro Android Apps Performance Optimization reveals how to fine-tune your Android apps, making them more stable and faster. In this book, you'll learn the following: How to optimize your Java code with the SDK, but also how to write and optimize native code using advanced features of the Android NDK such as using ARM single instruction multiple data (SIMD) instructions (in C or assembly) How to use multithreading in your application, how make best use of memory and how to maximize battery life How to use to some OpenGL optimizations and to Renderscript, a new feature in Android 3.0 (Honeycomb) and expanded in Android 4.0 (Ice Cream Sandwich). After reading and using this book, you'll be a better coder and your apps will be better-coded. Better-performing apps mean better reviews and eventually, more money for you as the app developer or your indie shop.
Android (Electronic resource)
Mobile computing.
Application software.
Mobile Computing.
Computer Applications.