Home » Android » At what point does the system check for the Android Manifest?

At what point does the system check for the Android Manifest?

Posted by: admin May 14, 2020 Leave a comment

Questions:

Does the Android Manifest check for the available components to be used before an application starts running, or does the system check for the Android Manifest every time a new component is being instantiated? By components I mean activities, services, etc…
What is the process involved?

Also, can an application still go back and forth to check on the android manifest even after it is running to check on xml activity attributes such as the android:name, android:label, or even intent filters, for different purposes such as to see whether a component to be used has already been defined?

How to&Answers:

Well to say it in a simple way-

Manifest contains permission like- “SD card read/write permission”. So, while installing an app if you don’t have a SD card than your won’t get installed.

Again manifest contains “minimum SDK version”- which checks what OS version you have in your mobile, if your mobile OS version is less than the minimum version defined in manifest than the app won’t install in your mobile.

In the manifest you have a list of all the activities and services too. So, without adding these in the manifest- your activities/services wont work.

So, these sort of checking and permissions are in manifest – the information the system must have before it can run any of the app’s code.

Hope i have been able to keep it short and simple 😀

Answer:

The manifest is a part of the app – it gets packaged with the app in its installation APK.

The manifest tells the system what APIs the application will use. When the app is installed, the system tells the user what sets of potentially sensitive APIs the application will use (as listed int he manifest) and if the user allows the app to be installed the system then assumes that the use of those APIs is permitted.

The OS will not permit the app to use other sensitive APIs that the app did not declare in the manifest.

Answer:

Android Manifest file contains important information like the Java package name of the application, permissions, descriptions about activities,services… The system must have these information before running the app code.By this reason, the system doesn´t check the Android Manifest in runtime.

More here:
Android Manifest – Android Developer