android - Why does we mention activities in manifest -


we specify current activity , start activity intent , call through method startservice(). why need mention activity in manifest again..??

indexing (what can app do?)
can answer @ least part of why activities. manifest declare intentfilter how system understands application does. i.e. should activity illegible choice when user trying take picture? choose file? share piece of text? in addition intentfilter tells launcher application have activity included in applications drawer.

configuring (what main activity?)
there several configuration options can set on activities have done in manifest i.e. singletop. without declaration in manifest there no place declare these configurations.

time saving (where can system find service?)
manifest file used system know kind of components application have. without registering activities/services/receivers/content providers system have scan , parse whole apk every time wants use specific component find it. slow, that's why there androidmanifest.xml, small file, , can parsed fast find required component.

sources: why activities/services need explicitly added android manifest? why acitivies have registered in manifest file

each android application build include file called androidmanifest.xml placed in root of project hierarchy. why important? because lets define structure , metadata of android application , components.

http://simpledeveloper.com/android-application-manifest-file/


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -