Home » Android » android – Is the Application instance always created before any Activities?

android – Is the Application instance always created before any Activities?

Posted by: admin June 15, 2020 Leave a comment

Questions:

In Android, you can provide your own implementation of the Application class by extending it and declaring the name in the Manifest.

My question is, will this implementation always be created before the initial Activity, or can Activities be launched before the Application instance has had time to be created?

How to&Answers:

will this implementation always be created before the initial Activity

Yes. It is one of the first objects instantiated in your process.

Answer:

Yes Application class is the first class which is inititated in any android application…

And thus if any class extends the application class that class will be initiated first.