I was learning how to connect to the internet by readiing a book, and in the first line of the example given was the following:
String myFeed = getString(R.string.my_feed);
I’m still learning how to connect to the internet but I could not understand what does R.string.my_feed means, and the author has not given any clue how my_feed is defined.
Now my question is, how to define my_feed? Should I create a folder named string and inside it write the website I want to have access to or what?
There is an XML file reserved for defining custom strings, it is in
res/values/strings.xml. Ifstrings.xmldoesn’t exist, create it with the following content:Then you can access it using