3 ms·
That's not really what's going on. Those "native" APIs you mention in most cases just call back to Java APIs under the hood. For better or worse, most of what A
by izacus 3y ago
That's not really what's going on. Those "native" APIs you mention in most cases just call back to Java APIs under the hood. For better or worse, most of what Android is is written in Java. There's no hidden "C++" layer of Android to access.
- okanat 3y agoIn theory it is possible to write raw Binder calls to various Android services, skipping JNI in many places. However, it is basically rewriting the entire OS API and structure from scratch.
- defer 3y agoYou can generate binder wrappers from aidl, that would work. This is fairly common when doing platform work (for those like me who work on the operating system rather than on apps). However, this would be a terrible idea because usually the android api is stable at the Java wrappers (I.e. ActivityManager), not at the aidl level, which would make this very fragile for app development across a multitude of devices and platform versions.
- izacus 3y agoSure, and some NDK APIs do exactly that. But you're still just using IPC to call into services written in Java, just using a different approach.
- kllrnohj 3y ago> Those "native" APIs you mention in most cases just call back to Java APIs under the hood Some do, but most don't.