Fun Facts and Vitals
Processes and Threads
Memory and Battery
Seamlessness
Performance Tips
100

One possible cause of ANRs (Application not responding).

What is Network or disk operations on the main thread? Could also be:

Timeouts, IPCs, Deadlocks, private/hidden APIs, null pointers, private/hidden APIs, wake locks

100

The thread that takes and executes blocks of work from a thread-safe work queue until its app is terminated.

What is the main thread?

100

This process has two goals: find data objects in a program that cannot be accessed in the future; and reclaim the resources used by those objects.

What is garbage collection?

100

Since there are layout changes and differences based on screen size. Avoid using this type of position and instead use relative layouts.

What is hard-coded?

100

Avoid using floating point, it's 2x slower than integer on Android devices. Use this instead.

What is double?

200

Aggregated data for Android device logs various metrics, such as app startup time, battery usage, and render time.

What is the Android vitals dashboard?

200

The amount of time it takes before the user is presented with an Application not responding (ANR) dialog.

What is 5 seconds?

200

The error that your app receives when it has reached the heap capacity and tries to allocate more memory.

What is OutOfMemoryError?

200

To avoid interrupting the foreground process, use this class to signal the user that an event has taken place, such as by displaying an icon in the status bar.

What is the Notification class?

200

This keyword makes the code faster since it will access a primitive type value directly instead of a field lookup.


What is final?

300

Can be used to write to logs/force app to crash to debug, but should not be used in the app release.

What is StrictMode?

300

If set too high, your thread may cause your app to drop frames. If set too low, you can make your async tasks slower than they need to be.


What is thread priority?

300

Android’s memory heap is this: there are different buckets of allocations that it tracks, based on the expected life and size of an object being allocated (young, older, and permanent).

What is generational?

300

When designing your UIs, you should try and avoid creating your own as much as possible. You should use this instead so that you're starting from the same UI base as all the other applications.

What is a theme?

300

If you don't access an object's fields, make the method this instead.

What is static?

400

The average number of times a user unlocks their smartphone in a day.

What is 110?

400

Threads that last after an activity is destroyed.

What are persisting threads?
400

You can find memory problems with your app using this component in Android Studio.

What is memory profiler?

400

Android applications that accept or edit input (like writing a review) should override this method and save their state in some appropriate fashion.

What is onSaveInstanceState()?

onPause() also acceptable
400

Doing this means more garbage collection, which leads to higher battery drain.

What is object creation?

also acceptable: memory allocation


500

The average number of apps a US/UK smartphone owner uses per month.

What is 24?

500

This class manages the creation of a group of threads, sets their priorities, and manages how work is distributed among those threads. As workload increases or decreases, the class spins up or destroys more threads to adjust to the workload.

What is ThreadPoolExecutor?

500

This is the name of the design principle with the following three questions to optimize battery life.

  • Reduce: Are there redundant operations your app can cut out?
  • Defer: Does an app need to perform an action right away?
  • Coalesce: Can work be batched, instead of putting the device into an active state many times?

What is Lazy First?

500

Create this to expose your data to other applications via a clean, well-thought-out, and maintainable API. Using this is like inserting a Java language interface to split up two tightly-coupled pieces of code.

What is ContentProvider?

500

This type of loop is just as fast, if not faster than a traditional counted for loop.

What is enhanced?

for-each also accepted

M
e
n
u