Tight coupling in using call back method
Instead of casting to MainActivity, you should be casting to IResultListener.

if (baseClass instanceof IResultListener)
            ((IResultListener) baseClass).onResultNotFound(tres);


That said, usually one registers a listener. So you'd have a List&lt;IResultListener&gt; somewhere, and then in this method you'd call a method fireEventResultFound(String result), which iterates over the list and calls onResultFound for each of them. This is called the Observer pattern (you can google that if you want to know more), and it decouples the reporting class from the observing class.

I also think you should move the parsing of hummings and musics, streams and custom_files to their own methods. That would greatly simplify this onResult method.



Also,

tres = tt.getString("acr_id");


Is this a possible bug? Everywhere else you're appending, but here you just overwrite the result.