I am using an API within my app. I currently manage the API key from a java interface
public interface APIContract { //The API KEY MUST NOT BE PUBLISH. I
You can add the key to the gradle.properties file or pass it as an argument