Hi, You can run a *gRPC server inside an Android app*, exposing APIs like launching intents, accessing system services, or interacting with the Android framework. This allows *any gRPC-capable client* (Python, C++, Rust, etc.) to call the Android system *without using JNI.* *How It Works* 1. *Set up a gRPC server in Java/Kotlin* inside an Android Service. 2. *Expose Android API functionality* via gRPC endpoints. 3. *Handle incoming gRPC requests* and return results. 4. *Run the gRPC server as a Foreground Service* to ensure it stays alive. 5. *Connect from an external app or another stack* via a gRPC client.
On Monday, March 24, 2025 at 8:20:46 PM UTC+5:30 Dolanor Maergal 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/7b380a1f-f358-41dd-af21-84aff28b3ffcn%40googlegroups.com.