Sorry if my question is silly since I new to aosp platform side.
I see there are two backend for developing Binder Service in aosp platform side in c++. (Ignore java for time being)
Example:
aidl_interface {
name: "example.service",
vendor_available: true,
srcs: ["interfaces/**/*.aidl"],
stability: "vintf",
backend: {
java: {
enabled: true,
platform_apis: true,
},
cpp: {
enabled: true,
},
ndk: {
enabled: true,
},
},
}
In the above example I see both cpp and ndk is enabled and at the end both are c++ interfaces but doing things in different way.
The question is when to use ndk and when to use cpp? Is there any relationship between ndk in aosp to Android Studio NDK sdk.
Is it not possible to communicate between service written in cpp and client using ndk.
The biggest confusion difference between NDK is Android Studio and ndk in aosp.