I have a class in my app folder that I want to call from a library I have added and I am having difficulties..How do i go about it? I tried using interfaces but ended up with a java.lang.StackOverflowError from endless recursiveness..How can I implement this https://stackoverflow.com/a/7957291/3729302 ? I cant move the Util class out because it's needed in the main by alot of files
Class in main folder
public class Utils {
public Bundle getDatabase() {
//code ....
Bundle bundle = new Bundle();
bundle.putStringArrayList("arraylist", array);
bundle.putString(KEY_TITLE, "Gallery");
return bundle;
}
method in library folder...
....
public void upload() {
OkHttpClient client = new OkHttpClient();
Bundle bundle = Utils.getDatabase(); //error here