This this a experiment to see different forms of IPC (inter-process communication) for native apps not exposed to the Android Binder SDK class. The current 3 forms are Unix Domain Sockets, NDK Shared Memory, and NDK AHardwareBuffer. This app has a server app that is one of 4 colors and a client app that changes the color. My blog post with more details
Pure Unix Domain demo (generates full screen color on server end)![]() |
![]() |
Disclaimer: The code was a quick prototype, for a friend as a proof of concept. Also have not profiled and not sure if there is better way of doing IPC in native Android app, if so please share since a Google search shows very little on topic
- Good o'l C style Unix Domain Sockets
- Same idea if ever sent TCP/UDP Sockets before
- Works for any version of Android
- Using the shared memory API <android/sharedmem.h>
- Android 8.0 (API 26) needed to run
- Using the native hardware buffer API <android/hardware_buffer.h>
- Android 8.0 (API 26) needed to run
- Each folder has a Client and Server folder each containing an Android Studio project.
- Open both and install on device.
- Open server app first (currently working on more robust example)
- Open client app and pick color
- Either switch back to server app to see change of color or open LogCat and view the print out