Challenge: Exploring the Profiler

The profiler tool window creates detailed reports for how your application is using an Android device’s resources, such as CPU and memory. It is useful when assessing and tuning the performance of your app.

To view the profiler tool window, run your app on a connected Android device or emulator and select ViewTool WindowsProfiler from the menu bar. Once the profiler is open, you can see a timeline with sections for CPU, memory, network, and energy.

Click into a section to see more details about your app’s usage of that resource. On the CPU view, make sure to hit the Record button to capture more information about CPU usage. Once you have performed any interactions with your app that you would ...

Get Android Programming: The Big Nerd Ranch Guide, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.