Actually, I’ll myself think of the current to such an option: In the XML file (for example, in /res/values/string.xml) I create a string resource, for example <string name="URL_ADDRESS">https://www.google.ru</string> And then in the code, as needed, they are extracted

 String URL_ADDRESS; ....................... public void onCreate() { super.onCreate(); URL_ADDRESS = getResources().getString(R.string.URL_ADDRESS); 

But if in the appendix of such links it’s permissible 20-30, will it be correct and is it right to do that at all?

Closed due to the fact that it was off-topic by the participants Vladyslav Matviienko , Andrew Bystrov , Vladimir Glinskikh , torokhkun , Streletz 17 Nov '15 at 7:40 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • " Questionnaires are forbidden on Stack Overflow in Russian . To get an answer, rephrase your question so that it can be given an unambiguously correct answer." - Vladyslav Matviienko, Andrew Bystrov, Vladimir Glinskikh, torokhkun, Streletz
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • one
    There is no standard for this. You can store them as constants, or as string resources (as they are now). Your question doesn’t make any sense at all - everyone does it the way it is more convenient for him - Vladyslav Matviienko

1 answer 1

There is more a question and the specifics of your application, and generally accepted methods of storing data in Android. From my experience, something is very rarely stored directly in a file. Because there are much more convenient and flexible ways, as a rule. This is SharedPreferences or database. It is difficult to make a final conclusion from your concise question, but it seems to me that the database is more suitable for you than anything else. SharedPreferences are often used to store some settings, or other compact data, of a database - for large data arrays. And then - you decide.