Save preferences and accounts in Android applications
I have an app that supports multiple accounts (up to 8). These accounts are local to the application. Each account has the following sections
- Site name
- Website phone number
- Control type
- User name
Currently I plan to implement them by using shared preferences. I’ll define keys for all elements of the 8 groups and save/retrieve them using the sharing preferences. I wonder if this is a good method or should I use another method?
Thanks in advance
It’s best to use a SQLite database to implement your needs. The main advantages of using it are
1. You can easily view the username and password.
2. You can add more users later.