Sobes.tech
Junior — Middle

In which case can a specific component be omitted from the application manifest file?

sobes.tech AI

Answer from AI

In the Android manifest, you may omit declaring a component (such as an Activity, Service, BroadcastReceiver) if it does not need to be registered with the system directly or is not used explicitly.

For example:

  • If the component is created and managed programmatically, and does not need to be accessible from outside.
  • If a library is used that registers components itself via the manifest or dynamically.
  • If the component is not needed to launch the app or should not be visible to the system (e.g., an internal class).

However, if the component needs to be accessible to the system (for example, an Activity for launching, a Service for background work, a BroadcastReceiver for receiving events), it must be declared in the manifest.

In which case can a specific component be omitted… - sobes.tech