Android Binder Example

I am looking for a simple example of IPC middleware in C / C ++. I recently started reading about the basics of Android Binder ( http://bharathi.posterous.com/android-binder ) and went through the code in the Android source. Most of the use of a binder is in C ++. Can someone explain why C ++ is used instead of C?

+4
source share
2 answers

Give up on http://github.com/mcr/Android-HelloWorldService (if you use later versions of android, you may have to exchange some of them from #include <utils/something> to #include <binder/something> ) .

You can also download the Android source code and look in the framework / base / camera / tests / CameraServiceTest / CameraServiceTest.cpp

Hurrah!

+4
source

I managed to build my own application and work with the source code of Android 2.3. To do this, I had to make two changes: the first is changing the file link path from to and secondly to include libbinder in the libhelloworldservice make file.

Thanks for this simple example illustrating the use of a binder.

+1
source

All Articles