public class AndroidViewModel extends ViewModel

Application context aware ViewModel.

Subclasses must have a constructor which accepts Application as the only parameter.

Summary

Public constructors

Public methods

Extension functions

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026-02-25 UTC.