I am creating an android application where I need to use the IP of my server in many different activities to access PHP files. Every time I connect to a new network, I manually change all the IPS in ALL activities.
My question is, can I declare a String resource in my Values-->Strings.xml, and just change it there, so that all modifications are done at once?
I know that we can access a string resource in an xml file using " @string/my_string_var", where my_string_var is the variable name for my actual string.
Can I use a string resource in any of my activities, like this:
final String IP = @string/final_ip;