One of the challenges on Android is that UI state needs to be saved and restored when configuration changes like screen rotations happen. Android ViewModels were introduced to make this process as…