I was asked where to write the order to run the android
program. Is it Main Activity
or Manifest
? .
We start in main activity and run accordingly .
Someone said it is manifest where we right the order of running of the program. what is the correct answer?.
Android Manifest is a summary of your android application. It has the information like which is the least android version compatible, what are the permissions it is using,what are the java files used and is the rotation of device possible etc.
On the other hand, Main activity is a java file which has the code to run the application. Like what will happen when the activity is created ( oncreate), what will happen when the application is destroyed or removed from memory (onDestroy).
The application can't work alone with just the java and XML files.
Like(a little bit off topic): When you make/draw a map, you have to give a key to your symbols or the reader will be confused. Similarly you have to give the manifest along with the java files or Android will be confused and the application will crash. The order doesn't matter on the working of the program as it is handled by the java file.