0%

Book Description

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.

What you'll learn

  • How to optimize your applications in Java

  • How to optimize your applications using the NDK

  • How to best use memory to maximize performance

  • How to maximize battery life

  • How and when to use multi-threading

  • How to benchmark and profile your code

  • How to optimize OpenGL code and use Renderscript

Who this book is for

Android developers already familiar with Java and Android SDK, who want to go one step further and learn how to maximize performance.

Table of Contents

  1. Title
  2. Contents at a Glance
  3. Contents
  4. About the Author
  5. About the Technical Reviewers
  6. Acknowledgments
  7. Introduction
  8. Chapter 1: Optimizing Java Code
    1. How Android Executes Your Code
    2. Optimizing Fibonacci
    3. Caching Results
    4. API Levels
    5. Data Structures
    6. Responsiveness
    7. SQLite
    8. Summary
  9. Chapter 2: Getting Started With the NDK
    1. What Is In the NDK?
    2. Mixing Java and C/C++ Code
    3. Application.mk
    4. Android.mk
    5. Performance Improvements With C/C++
    6. Native Activity
    7. Summary
  10. Chapter 3: Advanced NDK
    1. Assembly
    2. C Extensions
    3. Tips
    4. Summary
  11. Chapter 4: Using Memory Efficiently
    1. A Word On Memory
    2. Data Types
    3. Accessing Memory
    4. Laying Out Your Data
    5. Garbage Collection
    6. APIs
    7. Low Memory
    8. Summary
  12. Chapter 5: Multithreading and Synchronization
    1. Threads
    2. AsyncTask
    3. Handlers and Loopers
    4. Data Types
    5. Concurrency
    6. Multicore
    7. Activity Lifecycle
    8. Summary
  13. Chapter 6: Benchmarking And Profiling
    1. Measuring Time
    2. Tracing
    3. Logging
    4. Summary
  14. Chapter 7: Maximizing Battery Life
    1. Batteries
    2. Disabling Broadcast Receivers
    3. Networking
    4. Location
    5. Sensors
    6. Graphics
    7. Alarms
    8. WakeLocks
    9. Summary
  15. Chapter 8: Graphics
    1. Optimizing Layouts
    2. Layout Tools
    3. OpenGL ES
    4. Summary
  16. Chapter 9: RenderScript
    1. Overview
    2. Hello World
    3. Hello Rendering
    4. Adding Variables to Script
    5. HelloCompute
    6. Native RenderScript APIs
    7. RenderScript vs. NDK
    8. Summary
  17. Index
18.190.156.212