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
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?
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?
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?
Avoid using floating point, it's 2x slower than integer on Android devices. Use this instead.
What is double?
Aggregated data for Android device logs various metrics, such as app startup time, battery usage, and render time.
What is the Android vitals dashboard?
The amount of time it takes before the user is presented with an Application not responding (ANR) dialog.
What is 5 seconds?
The error that your app receives when it has reached the heap capacity and tries to allocate more memory.
What is OutOfMemoryError?
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?
This keyword makes the code faster since it will access a primitive type value directly instead of a field lookup.
What is final?
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?
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?
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?
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?
If you don't access an object's fields, make the method this instead.
What is static?
The average number of times a user unlocks their smartphone in a day.
What is 110?
Threads that last after an activity is destroyed.
You can find memory problems with your app using this component in Android Studio.
What is memory profiler?
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 acceptableDoing this means more garbage collection, which leads to higher battery drain.
also acceptable: memory allocation
The average number of apps a US/UK smartphone owner uses per month.
What is 24?
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?
This is the name of the design principle with the following three questions to optimize battery life.
What is Lazy First?
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?
This type of loop is just as fast, if not faster than a traditional counted for loop.
What is enhanced?
for-each also accepted