Save data in a local database using Room | App data and files | Android Developers
Learn to persist data using the Room Library