Preview 8

 

This preview has a new shared runtime. To ensure you are using it, you will need to delete the old shared runtime from your emulator/device:

Settings -> Applications -> Manage Applications -> MonoDroid Runtime -> Uninstall

The new runtime will be deployed to the device the next time an application is deployed.

 

Warning: Samsung shipped a broken kernel with Android 2.1, which is not able to support JIT compilation. If you possess a Galaxy-class device with Android 2.1, you will get unexpected results, this is caused by a kernel bug that breaks cache coherency, rendering any engine doing JIT compilation useless.

Bug Fixes / Enhancements

Joint Mono/Java GC

This is one of the last major features required to ship MonoDroid. Before this preview, cycles caused by Mono objects holding Java objects and Java objects holding Mono objects kept all these objects alive. With this release we have developed a joint garbage collection system that will properly dispose unreferenced objects and avoid keeping objects in memory due to cycles.

Beginning with this preview, objects with corresponding java objects should now be garbage collected when they are no longer held by other java objects. We also are more aggressively releasing jni local refs to avoid many of the table overflows failures people have experienced in previous previews.

Java.Lang.Class Methods

The Java.Lang.Class.Cast() and Java.Lang.Class.NewInstance() methods are now exposed.

Mono Initialization

In Preview 7, Mono initialization was performed within Application.OnCreate(). It turns out that this wasn't early enough, as ContentProviders listed within AndroidManifest.xml are created beforeApplication.OnCreate() is invoked.

Mono is now initialized via a dedicated ContentProvider with a very high initOrder to ensure it's invoked first. This allows ContentProviders to be supported.

Breaking Changes

JavaInputStream

The wrapper type that supported passing System.IO.Streams as Java.IO.InputStreams has been renamed to Android.Runtime.InputStreamAdapter, and we have added a corresponding OutputStreamAdapter, as well as Invokers to support returning java streams as System.IO.Streams. In the next preview, these will be utilized to expose all stream API in the binding as System.IO.Streams.

TelephonyManager.Listen

The TelephonyManager.Listen() events parameter is now an enumeration type.

Bug Fixes

  • 654535 - RemoveUnknownFiles task fails when compiling some AndroidAsset files.
  • 654527 - IOE When Inheriting From JavaDictionary<K, V>.
  • 654522 - Application dies with ContentProvider in AndroidManifest.xml.
  • 655342 - Only check for default constructors for types within AndroidManifest.xml; add a default constructor to Android.App.IntentService.

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.