For just message-passing, I think it'd work basically as expected.

The only concern I'd have is if you ever need to retain specialized Android
objects across RPCs. Many Android objects are special and are only
serializable over Binder. gRPC Java does have Binder support, which allows
passing these between processes. While gRPC C Core used to have Binder
support, it was removed due to lack of maintainers and usage. So there's
not an implementation to transfer these to non-Java.

If you end up having to deal with those specialized objects, you'll need
the Java process to hang on to them for the non-Java process or design the
RPCs such that the object doesn't need to persist across RPCs.

On Mon, Mar 24, 2025 at 7:50 AM Dolanor Maergal <dola...@gmail.com> wrote:

> Hi,
>
> I'd like to run a gRPC server on android to access some part of the
> Android API from another stack (not java or kotlin). Potentially, that
> server should be able to run some intent and get their result.
> Has anyone done that?
>
> before
> App -> (JNI using android NDK) -> Android SDK
>
> after
> App -> (gRPC client request) -> gRPC Server (in Java) -> Android SDK
>
> Why?
> JNI + NDK is cumbersome, error prone and hard to debug. Having a simple
> Request/Response from the App gRPC client would be an improvement in DX.
>
> In my use case, latency is not that big a problem. But if somebody already
> did something like that and had bad experience, I'm all ears.
>
> --
> You received this message because you are subscribed to the Google Groups "
> grpc.io" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to grpc-io+unsubscr...@googlegroups.com.
> To view this discussion visit
> https://groups.google.com/d/msgid/grpc-io/3be965f4-ac62-42f5-8877-9158923d105cn%40googlegroups.com
> <https://groups.google.com/d/msgid/grpc-io/3be965f4-ac62-42f5-8877-9158923d105cn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/grpc-io/CA%2B4M1oOxzcA5VtDvOE9G9v6PtLcFgws%2B70xVEeePmTCMSybFyg%40mail.gmail.com.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to