On Oct 12, 2011, at 10:01 AM, Jeremy Johnson wrote:
> So, if I elected to just build a 'normal' Mono for Android app and wanted to 
> leverage a third-party graphing component such as aiCharts, I'd need to roll 
> my own interop with JNI as documented here: 

Maybe. :-)

It depends on the needs of your app. If you just need to share data between 
Java & C#, you could instead use a ContentProvider. If you don't need to share 
data, you could just have Context.startActivity() to transition from Java to C# 
or use Context.StartActivity() to transition from C# to Java. etc., etc.

Things are flexible. (Perhaps not as flexible as I'd personally like, but 
fairly flexible...)

There's also JNI, as you note. Calling C# from Java is decidedly less friendly, 
unless your C# code happens to implement an interface or extend a type present 
in android.jar, in which case it's trivial...

> And additionally, I'm assuming I wouldn't be able to use the charting 
> component in .AXML files, but rather would have to instantiate programically.

You can use them from .axml files, as .jar files are compiled into the 
resulting classes.dex within the .apk. This is similar in principal to the 
Google Maps sample, which hosts the (Java) Google Maps activity and uses 
Context.StartActivity() to launch it from C#:

        https://github.com/xamarin/monodroid-samples/tree/master/GoogleMaps

 - Jon

_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to