Purpose and Key Elements of AndroidManifest.xml

Tests if you know the manifest is the app's contract with the Android OS. A good answer defines its role and lists key elements like activities, permissions, and the launcher intent. A red flag is calling it just a generic 'config file'.
What's really being asked
This question tests your understanding of the fundamental contract between your application and the Android operating system. The interviewer wants to see if you know that the manifest is not just a configuration file, but a required declaration of your app's identity, components, and requirements that the OS parses before running any of your code. It's a check on foundational knowledge of app structure and security.
The full answer
A strong answer describes the manifest as the app's 'passport' to the Android system and then outlines four key areas. First, the root <manifest> element, which declares the app's unique package name used by the OS and Google Play. Second, the <application> element, which contains app-level properties like the icon, label, and theme. Third, the component declarations: <activity>, <service>, <receiver>, and <provider>. You must mention that at least one activity needs an intent filter for the MAIN action and LAUNCHER category to serve as the app's entry point. Fourth, system requirements and permissions, such as <uses-permission> to request access to protected APIs (like INTERNET or CAMERA) and <uses-feature> to declare necessary hardware, which Google Play uses for filtering.
The mistakes people make
A weak answer is vague, describing it as just 'a config file' without explaining its role as a contract with the OS. A major red flag is forgetting to state that all app components (activities, services, etc.) must be declared in the manifest; the OS will not recognize and cannot start undeclared components, leading to a runtime crash. Another mistake is confusing <uses-permission> (requesting a permission for your app) with <permission> (defining a new, custom permission for other apps to request).
What usually comes next
Expect questions that dive deeper into specific manifest elements. For example: 'What is the android:exported attribute and why is it a critical security setting?', 'Describe the three parts of an <intent-filter> (action, category, data).', or 'How has permission handling changed since runtime permissions were introduced in Android 6.0, and how does that affect the manifest?'.
A concrete example
A minimal manifest has a root <manifest> tag with a package="com.example.myapp" attribute. Inside, an <application> tag holds the app's icon and label. Within the application, an <activity> tag for MainActivity contains an <intent-filter> with an action of android.intent.action.MAIN and a category of android.intent.category.LAUNCHER, making it the app's entry point. Finally, a <uses-permission> tag with android:name="android.permission.INTERNET" requests network access.
Interview question
If a developer creates a new Activity but forgets to declare it in AndroidManifest.xml, what happens when the app tries to start that Activity?
- a.The Activity will fail to launch, and the application will crash.Correct
- b.The Activity will silently fail to launch, but the application will continue running.
- c.The application will fail to compile.
- d.The OS will automatically register the Activity, and it will launch successfully.
Why? this is the answer
The manifest is a contract with the Android OS; if a component is not declared, the OS is unaware of it. Attempting to start an undeclared Activity will cause a runtime crash, not a compilation error.
Just read this? Test yourself on what you have been reading.
Read the original → developer.android.com
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on android — each one lists the topics its interview covers.
See open roles