Search code examples
androidtextviewandroid-edittext

How to make an app save the content of an EditText/TextView?


I want to save some information about users' accounts in an EditText/TextView inside the app. For example I want my app to save in the EditText/TextView the content "Admin" for admin users and "User" for simple users. But I do not want to access the database every time the user opens the app. How can I save the content of the EditText/TextView even if the user decides to exit the app? The users will not see the EditText/TextView. It will just help me avoid some reads in the database.


Solution

  • Just save it local / cache the data on the users device.

    https://developer.android.com/training/data-storage/app-specific