Junior — Middle
Can you list the main components and sections included in project manifests?
sobes.tech AI
Answer from AI
The project manifest in Android is an XML file called AndroidManifest.xml, which describes the main characteristics of the application. The main components and sections of the manifest:
- <manifest> — the root element, contains attributes such as
package. - <application> — describes the application itself, contains:
- <activity> — defines an app screen (activity).
- <service> — background services.
- <receiver> — broadcast message receivers (BroadcastReceiver).
- <provider> — content providers for data exchange.
- Application attributes, such as icon, theme.
- <uses-permission> — requested permissions (e.g., internet access).
- <uses-sdk> — minimum and target SDK versions.
- <intent-filter> — intent filters for components, defining which intents they can handle.
Example:
<manifest package="com.example.app" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<application android:icon="@mipmap/ic_launcher" android:label="MyApp">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Thus, the manifest describes the structure of the application, its components, permissions, and other important parameters.