Create the Interface
Working with LPFCP Java library is very similar to working with common Kotin/Java things — you also create an Interface, then implement it in some Class, create an instance of that class and then having the Interface you can call methods of the Class object.
So let's start with creating the Interface. That Interface must be the same for both client and server side. For example, let's create a simple Interface for calculator app, which can add and substract integers:
interface Calculator {
fun add(a: Int, b: Int): Int
fun subtract(a: Int, b: Int): Int
}public interface Calculator {
int add(int a, int b);
int subtract(int a, int b);
}Last updated