AndroidViewModel class is a subclass of
ViewModel and similar to them, they are designed to store and manage UI-related data are responsible to prepare & provide data for UI and automatically allow data to survive configuration change.
The only difference with
AndroidViewModel is it comes with the application context, which is helpful if you require context to get a system service or have a similar requirement.
In this lesson, we will see how to use
AndroidViewModel to show a list of "Saved WiFi networks" using the
WiFiManager system service which requires context.