Hi. Yes, finally I got a result and I post here a working project, just to fix the details (if necessary: for me it was). It is still open the question about the structure of the Java code. As a matter of fact I am not thinking to use Java lists instead of B4X ones or use Java for simple operations that can be done with B4X. This is nonsense, forgive me. I am talking of complex code, which is hard to translate in B4X and, moreover, it is "self-contained" in a class. In my initial post, I just wrote an example: my function is included in a class "xxx". Therefore my question was relative to the structure of the Java code, not composed of single functions, callable from B4X. but included in a class. Unluckily nobody observed this fact. Nevertheless, thanks to TILogistic I did a good step ahead. Thanks again.