Difficulty: Introductory | Prerequisites: None
This set of notes covers three foundational topics that span biology and mobile development: DNA (the molecule carrying genetic instructions), Android Architecture (the four-layer stack that powers Android devices), and ANR (the "Application Not Responding" dialog Android shows when an app freezes). These are introductory definitions likely to appear on a broad foundations exam.
DNA (deoxyribonucleic acid)
The molecule that carries the genetic instructions for life, responsible for inheritance and coding for proteins. Think of it as the instruction manual stored in every cell that tells the body how to build and maintain itself.
Android Architecture
The layered software stack that makes up the Android operating system, composed of four key components: the Linux Kernel, Libraries, the Android Framework and Android Applications. In simple terms, it is the four-storey building that sits between the hardware and the apps you tap on.
ANR (Application Not Responding)
An Android system dialog that appears when an application's main thread is blocked for too long, specifically when there is no response to an input event within 5 seconds or a broadcast receiver does not finish executing within 10 seconds. Think of it as Android's way of telling the user "this app has frozen, do you want to close it?"
Linux Kernel
The lowest layer of the Android stack, managing hardware drivers, memory, power, process scheduling and security. It is the same kernel that runs Linux servers, adapted for mobile hardware.
Broadcast receiver
An Android component that listens for and responds to system-wide broadcast announcements (low battery, screen off, incoming SMS). If it takes longer than 10 seconds to process, Android triggers an ANR.
DNA is a double-helix molecule found in the nucleus of nearly every cell. It is built from four nucleotide bases: adenine (A), thymine (T), guanine (G) and cytosine (C). These bases pair in a fixed way (A with T, G with C), and the specific sequence of base pairs encodes genetic information.
DNA's two primary functions are:
Inheritance – DNA is copied and passed from parent to offspring during reproduction, carrying the genetic blueprint of the organism.
Protein coding – sections of DNA called genes contain the instructions for building proteins, which carry out most of the work in cells (enzymes, structural proteins, signalling molecules).
The process from DNA to protein follows the "central dogma" of molecular biology: DNA is transcribed into messenger RNA (mRNA), which is then translated into a protein by ribosomes.
Real-world application: DNA fingerprinting is used in forensic science to identify individuals from biological samples, and in medicine, understanding DNA mutations helps explain inherited diseases and guides gene therapy research.
[embed: node/3084513b-6887]
Android is built as a layered stack. Each layer provides services to the one above it and relies on the one below.
Linux Kernel (bottom layer) – handles hardware drivers, memory management, power management, process scheduling and security. It is the foundation everything else runs on.
Libraries – a set of native C/C++ libraries (SQLite for databases, OpenGL for graphics, WebKit for web rendering, SSL for encryption) plus the Android Runtime, which runs application code using either the Dalvik virtual machine (older devices) or ART (Android Runtime, newer devices).
Android Framework – the Java-based API layer that application developers interact with. It includes the Activity Manager (manages the app lifecycle), Content Providers (data sharing between apps), the View System (UI elements) and the Notification Manager.
Android Applications (top layer) – the apps the user sees and interacts with, both pre-installed (browser, contacts, camera) and third-party downloads.
Real-world application: When you tap an icon on your phone, the Application layer tells the Framework to start an Activity, which uses Libraries to draw the interface, all of which runs on processes managed by the Linux Kernel.
An ANR is Android's mechanism for detecting and handling unresponsive applications. The system monitors the main thread (also called the UI thread) and triggers an ANR dialog under two conditions:
Input dispatch timeout – the app does not respond to an input event (tap, key press) within 5 seconds.
Broadcast receiver timeout – a broadcast receiver's onReceive() method does not finish executing within 10 seconds.
When either threshold is crossed, Android presents the user with a dialog offering the choice to wait or force-close the app.
The root cause is almost always long-running work on the main thread: network calls, heavy database queries, complex computations or file I/O. The standard prevention strategy is to move expensive operations off the main thread using background threads, AsyncTask (deprecated but still seen in older code), coroutines (Kotlin) or WorkManager.
Real-world application: If you have ever seen the "[App] isn't responding" pop-up on an Android phone, that is an ANR. Developers avoid it by keeping the main thread free for UI updates and handling everything else in the background.
Students often think DNA and RNA are the same molecule. They are not. DNA is double-stranded and uses thymine; RNA is single-stranded and uses uracil instead of thymine.
Students sometimes describe the Android Architecture as having three layers, forgetting that Libraries and the Android Framework are separate layers. The correct count from the source material is four: Linux Kernel, Libraries, Android Framework, Android Applications.
Students frequently assume ANR is caused by the app crashing. An ANR is not a crash. A crash (force close) happens when unhandled exceptions occur. An ANR happens when the app is still running but the main thread is blocked and unresponsive.
Students sometimes believe that the 5-second and 10-second ANR thresholds apply to the same situation. They do not: 5 seconds is for input events, 10 seconds is for broadcast receivers.
Expect a question asking you to name the four components of Android Architecture in order, from the lowest layer to the highest.
ANR questions typically ask for the two conditions and their specific time thresholds (5 seconds for input events, 10 seconds for broadcast receivers). Memorise both numbers.
DNA questions at this level are likely to ask for a definition and the two primary functions (inheritance and protein coding). Know the base-pairing rule (A-T, G-C) as well.
A question may ask you to distinguish between an ANR and an app crash. Be ready with a clear one-sentence distinction.
Fill in the blank: DNA stands for ______ acid. (deoxyribonucleic)
True or false: Android Architecture has three layers. (False, it has four.)
Fill in the blank: An ANR is triggered when an app does not respond to an input event within ______ seconds. (5)
True or false: In DNA, adenine pairs with cytosine. (False, adenine pairs with thymine.)
Fill in the blank: A broadcast receiver must finish executing within ______ seconds or Android triggers an ANR. (10)
Q: What is DNA and what are its two primary functions?
A: DNA (deoxyribonucleic acid) is the molecule that carries the genetic instructions for life. Its two primary functions are inheritance (passing genetic information from parent to offspring) and protein coding (providing the instructions for building proteins).
Q: Name the four components of Android Architecture from the lowest layer to the highest.
A: Linux Kernel, Libraries (including the Android Runtime), Android Framework, Android Applications.
Q: Under what two conditions does Android display an ANR dialog?
A: When the app does not respond to an input event within 5 seconds, or when a broadcast receiver does not finish executing within 10 seconds.
Q: What is the standard approach for preventing ANR errors in Android development?
A: Move long-running operations (network calls, database queries, file I/O) off the main thread using background threads, coroutines or WorkManager.
Q: In DNA, which nucleotide bases pair together?
A: Adenine pairs with thymine (A-T), and guanine pairs with cytosine (G-C).
DNA connects to molecular biology, genetics, biotechnology and bioinformatics. Understanding DNA at this introductory level sets up later study of gene expression, mutations, CRISPR and genomic data analysis.
Android Architecture connects to operating systems, software engineering and mobile development. The layered-stack concept reappears in web development (frontend, backend, database) and networking (the OSI model).
ANR connects to concurrency and threading, which are core topics in operating systems and software engineering. The principle of keeping the UI thread responsive applies to any platform with a graphical interface, not just Android.
DNA, deoxyribonucleic acid, double helix, nucleotide, base pairing, adenine, thymine, guanine, cytosine, gene, protein coding, inheritance, central dogma, mRNA, transcription, translation, ribosome, Android Architecture, Linux Kernel, Android Framework, Android Runtime, ART, Dalvik, Activity Manager, Content Provider, View System, libraries, mobile OS, software stack, ANR, Application Not Responding, main thread, UI thread, broadcast receiver, input dispatch timeout, concurrency, threading, AsyncTask, WorkManager, coroutines