I am new to android development. So I have a question about activities. On Google developer, they say you have to make a class which is inheriting from the class Activity. So far so good. Now I am thinking an Activity is a class, which leads to my major problem. So when activity is a class how can it invoke all the live cycle methods. In Java, I learnt there must be an object of a class to invoke methods and actions. So when activity is not an object but a class, how is this possible.
Kindest regards Jan
When a user starts your app the android operating system will instantiate an object based on your class which must be a subclass of Activity.
The operating system will use that object and call the lifecycle hooks (e.g. onCreate, onResume, ...) which you implented in your activity subclass when one of the related lifecycle events happens.