[mono-android] How to add .java file class to my mono on android c# project ?
jonp at xamarin.com
Tue Feb 14 21:50:29 UTC 2012
To add a .java file to your project, add it to your project (right-click your Project > Add > Add Files..., select files, OK), then select the .java file in the Project panel and set its build action to AndroidJavaSource.
Once you've done that, you can use JNIEnv to instantiate the Java class and invoke methods on it. See the SanityTests sample for an example:
More information about the Monodroid