Junior — Middle
Can you list the key components usually specified in AndroidManifest.xml?
sobes.tech AI
Answer from AI
The following key components are usually specified in AndroidManifest.xml:
- <application> — description of the application, its icon, theme, components.
- <activity> — screens of the application, their settings, and intents.
- <service> — background services.
- <receiver> — broadcast message receivers (BroadcastReceiver).
- <provider> — content providers for data exchange.
- <intent-filter> — intent filters for components.
- <uses-permission> — permissions required by the application.
- <uses-sdk> — minimum and target SDK versions.
Example:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.app">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name">
<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>