I am developing a project for Android, I use Delphi and at the same time I want to use libraries written in Java. Specifically, I'm interested in the TJAudioRecord class. I manage to call methods of classes defined in the Java library, but I can't figure out how to intercept events. How to describe in your code in Delphi and how to register listeners implementing interfaces described in these libraries? In Java, the listener I need looks like this:
public OnRecordPositionUpdateListener mListener = new OnRecordPositionUpdateListener() { public void onPeriodicNotification(AudioRecord recorder) { // мой код } public void onMarkerReached(AudioRecord recorder) { // мой код } }; How to write the title of the corresponding listener and his methods on Delphi and how to register such a listener so that he can receive events?