I'm writing my first Android app and I came to a moment when I need to store users and other data. What is a good practice of doing it? To my surprise I wasn't able to find one good solid manual online. Can you share your experience please?
3 Answers
- Use MySQL database.
- Use PHP script to store data.
- Use Android Volley or Http request to perform storing the data.

- 1,183
- 1
- 25
- 46
-
Thank you, I will check it! – Tuesday Four AM Mar 06 '17 at 16:18
It depends on where you will want to access this data from at a later time. For example you might want your app to allow User Preferences to be synchronized between multiple devices. You might want the settings to stay with only that device... you need to make that decision first before choosing from the below options.
Please read this Android documentation first before going further.
Some options (not exhaustive):
Store locally on the device.
a. Write to a file. Serializable files are great for storing data structures from memory for easy re-use.
b. Use a local DB service one option, official Android SQL documentation,
c. Store Key-Value sets
Store on a server for access from more than 1 device.
a. SQL servers run by your company
b. Google Drive
These options are just the beginning. You need to refine your question with a bit more background information (purpose of your app, how users will interact with it, etc) before you will get a detailed answer.

- 1
- 1

- 161
- 9
-
Thank you! I need my app to be synchronized with the database at every load (info about provided services and other users). So it must me server solution and Ive found several options to build a database online. What I need now is a good way of connecting my app and the database (read and write). – Tuesday Four AM Mar 06 '17 at 16:17
I highly reccomend using an existing cloud database solution instead of creating your own web server solution.
Check out Firebase Realtime Database. I think you'll find that it will provide a clean and simple solution.
https://firebase.google.com/docs/database/
https://firebase.google.com/features/
(Btw, Firebase is a Google product, so you'll get really good support and documentation.)

- 3,916
- 2
- 27
- 45
-
Glad to help. Please mark an answer as accepted so that future users will know what you've chosen. Thanks! – Shmuel Mar 07 '17 at 16:48