Role of app.kt in an Android project


#1

I read some Android app source code on Github and see most of them has activities class, but some have an app.kt file, what is its role? Thank a lot. I’m an amateur.


#2

The question is Android specific and has nothing to do with kotlin itself.

The application class is not necessary required for an android projekt. Often library initialization like e.g. push notifications happen in the that class. Here is the official android documentation for the application class: https://developer.android.com/reference/android/app/Application


#3

Thank you, bro.