AndroidManifest.xml एक आवश्यक configuration फ़ाइल है जो किसी app के components, permissions और metadata को Android system को घोषित करती है। हर Android app में एक होती है, और OS app की संरचना और आवश्यकताओं को समझने के लिए इसे पढ़ता है।
manifest क्या घोषित करता है
The AndroidManifest.xml tells the Android system about the app:
→ COMPONENTS — declares activities, services, broadcast receivers, content providers
(components must be declared here to be usable)
→ PERMISSIONS — what the app needs (internet, camera, location, etc.)
→ app METADATA — package name, app icon, label, theme, min/target SDK versions
→ INTENT FILTERS — what intents components can respond to (e.g. the launcher activity)
→ hardware/software FEATURES required; other configuration
उदाहरण संरचना
<manifest package="com.example.myapp">
<!-- PERMISSIONS the app needs -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<application android:icon="@mipmap/ic_launcher" android:label="My App" ...>
<!-- declare an ACTIVITY; the intent-filter marks it as the LAUNCHER (entry point) -->
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name=".MyService" /> <!-- declare a service -->
</application>
</manifest>
मुख्य भूमिकाएँ
✓ COMPONENTS must be declared here or the system won't know about them (won't run)
✓ PERMISSIONS declared here; dangerous ones also need RUNTIME requests (see permissions)
✓ The LAUNCHER intent-filter marks the app's entry-point activity
✓ Defines min/target SDK (compatibility), app metadata, and configuration
यह क्यों महत्वपूर्ण है
AndroidManifest.xml को समझना आधारभूत है क्योंकि यह हर Android app में एक आवश्यक फ़ाइल है जो app की संरचना को system को घोषित करती है, इसलिए यह अनिवार्य रूप से जानने योग्य ज्ञान है।
manifest वह तरीका है जिससे Android app के बारे में सीखता है: यह components घोषित करता है (activities, services, broadcast receivers, content providers — जिन्हें यहाँ घोषित करना ही होगा वरना system उनके बारे में नहीं जानेगा और वे चलेंगे नहीं, एक मौलिक आवश्यकता), app को आवश्यक permissions (internet, camera, location, आदि), app metadata (package name, icon, label, theme, और सबसे महत्वपूर्ण compatibility के लिए min/target SDK versions), और intent filters (launcher filter सहित जो app की entry-point activity को चिह्नित करता है)।
इन भूमिकाओं को समझना किसी भी Android development के लिए आवश्यक है: आप अपने द्वारा बनाए हर component को manifest में घोषित करते हैं, अपनी app को आवश्यक permissions का अनुरोध करते हैं, और वहाँ app metadata configure करते हैं।
manifest हर app के मौलिक पहलुओं में शामिल है — components घोषित करना (जिनके बिना वे काम नहीं करते), permissions (जिनके बिना features विफल होते हैं), और entry point (जिसके बिना app ठीक से launch नहीं होगी)।
इसलिए इसे समझना किसी भी Android app बनाने के लिए आवश्यक व्यावहारिक ज्ञान है, क्योंकि जब भी आप components, permissions जोड़ेंगे या configuration बदलेंगे तो आप इसे edit करेंगे।
चूँकि AndroidManifest.xml एक आवश्यक, हमेशा मौजूद फ़ाइल है जो app के components, permissions और metadata को system को घोषित करती है (और components को वहाँ घोषित करना ही होगा कि वे काम करें), और चूँकि इसे समझना किसी भी Android app बनाने के लिए आवश्यक है, इसलिए AndroidManifest.xml को समझना ज़रूरी, आधारभूत Android ज्ञान है — एक core configuration फ़ाइल जिसके साथ हर Android developer काम करता है, components घोषित करने, permissions manage करने और app configure करने के लिए आवश्यक, और Android apps कैसे संरचित होती हैं और system द्वारा समझी जाती हैं इसके लिए मौलिक।
