My application uses a number of API keys and URLs that I can't allow users to see. I've been putting them directly in the code, sometimes embedded in the method that uses them and sometimes in a class called MyVals that stores commonly used strings and numbers.
e.g.:
public class MyVals {
private LGVals(){}
public static final String DB_URL = "https://mydb.dbprovider.org/";
public static final String DB_Key = "klJF*(oh8iyhkkde";
public static final String TableKey_UserList = "o9w6owifhayf98fnwihj";
}
Is this safe? Does it make a difference if I'm creating my APK with Proguard? What's the best practice for this?