May 2022
Intermediate to advanced
688 pages
20h 12m
English
In this section, you are going to override lifecycle functions to eavesdrop on MainActivity’s lifecycle. Each implementation will simply log a message informing you that the function has been called. This will help you see how MainActivity’s state changes at runtime in relation to what the user is doing.
In Android, the android.util.Log class sends log messages to a shared system-level log. Log has several functions for logging messages. The one that you will use most often in this book is d(…), which stands for “debug.” (There are many levels of logging; you can learn more about them in the section called For the More Curious: Log Levels near the end of this chapter.) ...
Read now
Unlock full access