Not being patient enough for the Mono for Android book I started going through the Android programming constructs and translate them to the Mono infrastructure. Seems like most the time the good folks at Xamarin and I think along similar lines so progress has been relatively pain free but on the AIDL issue I'm stuck. Was AIDL implemented? If so, how can I use it? If not, what is the recommended way to use IPC?
2 Answers
AIDLs are finally supported. To use them add aidl files into your project and set Build Action to AndroidInterfaceDefinition. Xamarin.Android will generate cs files, that are compiled together with your source code, so you can use aidl interfaces in your c# code. VS2012 still marks them as unknown/errors in code, but in the end, code is compiled and working.

- 1,104
- 8
- 27
AIDL is, lamentably, something that isn't readily supported at this time. It is only supported via Java Interop Support; that is, you'd need to:
- Write your
.aidl
files. - Compile the
.aidl
files into.java
files (possibly as a pre-build step?). - Include the generated
.java
files into your build by adding them to the project and setting their build action to AndroidJavaSource.
Of course, for parcel
s you'll need to implement them...in Java, and for services you'll likewise need to write some Java code.
The documentation on Java Native Interop Support may be useful as well.
In all, not very elegant. Not difficult, but not elegant either.
Consequently, the recommended way to do IPC is to use Intents, BroadcastReceivers, and ContentProviders (depending on the needs of your IPC), and avoiding the use of parcels; use Strings and other builtin types instead.

- 13,512
- 5
- 45
- 60
-
1This is no longer the case, xamarin now supports aidl files, see @MichalDobrodenka 's answer – Entreco Oct 28 '14 at 12:50