I plan on having a bunch of URLs specified in strings.xml, eg:
<string name="a1_url">https://en.wikipedia.org</string>
I would like to be able to open a URL (eg string name "a1_url") from an activity, but can't figure out how to reference the string name in Uri.parse. This current code works fine when you hardcode the URL:
Intent i2=new Intent(Intent.ACTION_VIEW, Uri.parse("https://en.wikipedia.org"));
startActivity(i2);
My overall goal is to have many URLs as strings and the app will choose one for you at random, eg a1_url or a233_url.
string.xmlwithgetString()method ofContext. developer.android.com/reference/android/content/…