Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Saving prefrences and accounts in Android app

I have an application which supports multiple accounts (max 8). These accounts are local to the app. Each account has the following parts

  • Name of Site
  • Site tel number
  • type of control
  • username
  • pass

Currently I plan to implement them by using shared preferences. I will define keys for all the elements of 8 groups and save/retrieve them using shared preferences. I would like to know is this a good approach or should I use another approach?

Thanks in advance

like image 488
dmSherazi Avatar asked Dec 02 '25 04:12

dmSherazi


1 Answers

It is better to use SQLite database for implementing your requirement. The main advantages of using this is
1. Can check username and password in easy way.
2. Can add more users in future.
SQLite Tutorial

like image 184
Sandy Avatar answered Dec 03 '25 18:12

Sandy