No, it is not safe to store in strings.xml. Use instead SharedPreferences. For example:
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
and then save your client id and client secret as follows:
sharedPreferences.edit()
.putString("client_id", "your_client_id")
.putString("client_secret", "your_client_secret")
.apply();
To return the client ID and client secret from SharedPreferences:
String clientId = preferences.getString("client_id", "No ID");
String clientSecret = preferences.getString("client_secret", "No Secret");
source
share