[Mono-bugs] [Bug 661858] Allow the use of Jar files to be used in MonoDroid

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jan 14 12:21:14 EST 2011



Jonathan Pryor <jpryor at novell.com> changed:

           What    |Removed                     |Added
                 CC|                            |jpryor at novell.com

--- Comment #1 from Jonathan Pryor <jpryor at novell.com> 2011-01-14 17:21:13 UTC ---
How are we defining "use"...?

If you want to create object instances, invoke methods, etc. from C# for
anything other than android.jar, that isn't supported at this time.  We will be
adding support for interacting with .jar files after 1.0.

Alternatively, you could use Android.Runtime.JNIEnv to "manually" create
instances and invoke members, though this won't permit inheritance/etc.

Alternatively, you can write .java source and include set the Build Action to
AndroidJavaSource; this will cause monodroid to build your .java files into the
apk, and then you could use JNIEnv to create your custom class.

What I'm not sure about (as I haven't tested) is to actually deal with the
jar.  Presumably you would need a <uses-library/> in AndroidManifest.xml:


but how are custom .jar files handled?  I haven't investigated this, so I don't
know how this would interact with MonoDroid.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list