there is no lib for gprc in b4a.
Again: What Api EXACTLY are you trying to access???? <--- !!!
You probably can call this api using okhttputils2.
Of course I can call API with okhttputils,
https://mvnrepository.com/artifact/io.grpc/grpc-okhttp
but the protocol inside is not as easy as it seems (data are 7bit long and is used a compression algorithm).
I have my own gRPC server with my own greeters. A call can be this (in Java):
try {
HelloRequest message = HelloRequest.newBuilder().setName(mMessage).build();
HelloReply reply = stub.sayHello(message);
reply = stub.sayHelloAgain(message);
} catch (Exception e) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
pw.flush();
return "Failed... : " + System.lineSeparator() + sw;
}
This is the Proto definition:
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
// Sends another greeting
rpc SayHelloAgain (HelloRequest) returns (HelloReply) {}
}
// The request message containing the user's name.
message HelloRequest {
string name = 1;
}
// The response message containing the greetings
message HelloReply {
string message = 1;
}
I realized there's no library in B4A, but Android has. I asked if someone have already translated the java libraries (even partially, I can improve and publish all the code).
I don't know how to start and include/call such libraries...
@DonManfred , in your FireBase library (
https://www.b4x.com/android/forum/threads/firebase-cloud-firestore.105067/#content) you already use such libraries...
Thank you