How do you access the values in the res/values/string.xml resource file from the Android Activity class?
res/values/string.xml
Activity class
If you have the context of Activity, go with:
getString(R.string.app_name);
If you don't have the context, try below, you can get the context from activity using Constructor.
Constructor
mContext.getString(R.string.app_name);