What are Android Callable Wrappers (ACWs)?

Technology CommunityCategory: XamarinWhat are Android Callable Wrappers (ACWs)?
VietMX Staff asked 3 years ago

Android Callable Wrappers (ACWs) are required whenever the Android runtime invokes managed code. These wrappers are required because there is no way to register classes with ART (the Android runtime) at runtime.Android Callable Wrappers thus make up for the lack of runtime type registration support.

Every time Android code needs to execute a virtual or interface method that is overridden or implemented in managed code, Xamarin.Android must provide a Java proxy so that this method is dispatched to the appropriate managed type. These Java proxy types are Java code that has the “same” base class and Java interface list as the managed type, implementing the same constructors and declaring any overridden base class and interface methods.

Android callable wrappers are generated by the monodroid.exe program during the build process.