Android provides many storage API of storing data of an application. One of storage API way is called Internal Storage. Internal allow you to write and read in any data into file.
In order to use Internal Storage you have to use two class and two methods FileOutputStream class, openFileOutput() and FileInputStream class openFileInput() to the file that contains the values of preferences, and use context class mode.