Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

android

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?

like image 254
Felipe Calderon Avatar asked Jul 28 '15 04:07

Felipe Calderon


2 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 :-D

like image 146
Shaon Hasan Avatar answered Jan 03 '23 12:01

Shaon Hasan


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.

like image 27
Michael Burr Avatar answered Jan 03 '23 11:01

Michael Burr