This is an example of how to create bindings for a .jar file using a Java Binding Project in Xamarin.Android. This example creates a binding for osmdroid - an alternative to Google Maps based on the OpenStreetMap.
There are two projects:
OsmDroid.csproj
is the solution that holds the Java Binding Project for theosmdroid.jar
. The is project is kept in the directoryOsmDroid
.OsmDroidTest.csproj
is a Xamarin.Android application that gives a quick example of using the new binding. The code for this project is kept in the directoryOsmDroidTest
. Because of a bug in Xamarin.Android, the bindingOsmDroid
is built as a DLL and then copied to thelib
folder. This DLL is then referenced byOsmDroidTest
, and not the project fileOsmDroidBinding.csproj
.
The lib folder holds the two reference .jar
files that are necessary to bind OSMDroid.