How your classes are connect through Xamarin to native

KiritoKirito NLMember

For my study I need to show how a class is connected through Xamarin entirely through to the native base. Is there anyone that maybe has a class diagram or could make one that represents this? Cause I cant seem to find an example anywhere in the documentation on short notice

It just has to be a simple example. For example MyActivity->xamarin.activity(or whatever)->android sdk activity

Posts

  • MartRoosmaaMartRoosmaa EEMember, Beta

    I'm not very good at diagrams, but maybe this will help a bit.

    From the C# side Xamarin.Android uses JNI to call into the Java world. So basically the whole Android namespace in C# is a bunch of proxy classes that handle calling the actual Java methods through JNI correctly.

    In order to let Java world communicate back with the C# world (ie when you override Activity.OnCreate method) Xamarin tools generate ACWs. Thay are basically Java proxies which overrides various methods in the Java side and direct the code execution back into the C# world.

    There are also a lot of other magic things going on (like exception translation between the two world), which I probably don't know too well myself either :)

    Ah, right, there is one diagram at the architecture page that might be of use.

Sign In or Register to comment.