Answer the question
In order to leave comments, you need to log in
How to implement application data storage?
I'm trying to learn Android by creating applications. So here are some simple ideas to get you started.
For example: Applications with recipes , Applications with different facts , etc. The principle is clear, just a list with pictures and text. Not just 10 pictures and 10 recipes. And to have a more or less large-scale application. With large quantity.
The question is how to store all this text? Directly in the string.xml file or is there some special way?
And if I want to make changes or add new recipes, how do I do it?
Answer the question
In order to leave comments, you need to log in
I think it depends on the end goal. If you just do it for an example, then store the names, descriptions, etc. of recipes in local storage (SQLite). If you plan to make it a full-fledged working application as a result, then it is more logical to raise a server from the database, which will give recipes to the client (mobile application). Indeed, otherwise, in order to display each new recipe, you will need to roll out a new update, and this is such a solution. In general, I would recommend that you use firebase as a backend - the free plan will cover all your needs.
That is, in firebase you create a collection of recipes with a name, description, and so on.
In a mobile application, you make an http request and get this collection. In addition, with such an implementation, it will be possible to make the function of adding a recipe by the user, after which this recipe will be available to all users of the application. If you store recipes in local storage, then adding a new recipe will only be on the device of the user who added it, the rest will not see it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question