Forum Xamarin Xamarin.Android

Use C# assembly from Java code?

We have a need to use a C# assembly in a standard (ie, Java) Android app. Can Xamarin generate JNI bindings for the C# classes? (The Xamarin Studio's New Solution wizard doesn't offer anything obviously apposite, nor do a few quick Google searches,, but that doesn't necessarily mean anything.)


  • TomOpgenorthTomOpgenorth CAXamarin Team Xamurai

    Sorry, this isn't a supported feature. Can you package the C# stuff into it's own Service and deploy that as an APK? Then you could use Intents to communicate between the two apps. i.e. the Java app fires off an intent with the parameters which the C# service will handle.

  • JonShemitzJonShemitz USMember

    Thanks, that may be a viable architecture. The C# assembly 'just' talks to a Leap Motion controller; sending every hand position report (as a string) over IPC doesn't seem like it would overwhelm a device. Hand/screen coordination may be an issue, but we'll experiment.

Sign In or Register to comment.