Sonntag, 17. April 2011

Android apps with C#

Developing Android apps with C# and.NET technologies?

What sounds strange is now possible with Mono for Android 1.0 (short: Monodroid), recently published by Novell. With Monodroid you can develop applications for Android-Smamtphones with Visual Studio 2010. Mono 1.0 is thereby fully integrated in Visual Studio 2010.  The corresponding APIs for the Dalvik engine have been adjusted for C#, also the JIT compiler is fully usable. In addition, the use of F# and IronJS and partly also IronPython and Ironruby with Monodroid should be possible.

Windows Phone 7: Mango Update

From Windows Phone "Mango" Preview a good summary of the coming features for Windows Phone 7 with the “Mango” Update:

mangoAssuming they actually hit this schedule, Microsoft will release a major update to Windows Phone, internally called Windows Phone 7.5 (though that could change) and codenamed "Mango," sometime in the final quarter of 2011. Mango will be made available for free to all current Windows Phone handset owners, but my suspicion is that the best experience will be had on a second generation of new devices that include additional capabilities not found in today's phone. Microsoft first officially unveiled Mango earlier this year, but they provided a lot more information about this release this month at its MIX'11 conference. So I'd like to highlight what we know about Mango so far, with the understanding that things will no doubt change going forward. Indeed, there are many consumer- and business-oriented features coming in Mango that Microsoft has yet to discuss publicly.



New minimum hardware specifications

One of Windows Phone's most heralded changes from its Windows Mobile predecessor was that the new system would have a much more tightly controlled hardware specification, which Microsoft said would prevent a proliferation of divergent devices that would be very hard to update. I'll pause while you consider the ensuing irony--Microsoft has had nothing but trouble updating the first generation of nearly identical Windows Phones--but it's a good idea regardless.

Oddly, the first generation of Windows Phone hardware allowed for two so-called chassis specifications, the Chassis-1 that we all know and love (800 x 480 touch screen and so on) and then a separate Chassis-2 spec that has never materialized into an actual shipping piece of hardware; this one was to have supported smaller 480 x 320 screens with a hardware keyboard and it was, put simply, Microsoft's version of a Blackberry.

The Chassis-2 spec is dead, and there won't be any phones released with those specifications. Instead, Microsoft is rallying around an updated version of the Chassis-1 spec for Mango. And the specs have changed just a bit since the first generation:

Processor. Whereas the original specification called for 1 GHz or faster ARMv7 Cortex/Scorpion (Snapdragon) or better processor, the new spec calls for second generation Qualcomm ARMv7 (MSM8x55 or MSM7x30) processors, running at 800 MHz or higher. So 1 GHz is no longer the baseline. That's because a new generation of processors with lower clock speeds is both cheaper to make and powerful enough to handle Windows Phone OS, according to Microsoft. But this represents the platform's first foray into the non-luxury end of the market, paving the way for comparatively low-end Windows Phone handsets. (This is something Nokia demanded, but this work was in progress some time ago.)

GPU. As with the first generation devices, Mango-era phones will ship with a DirectX 9-capable graphics processing unit, or GPU. But the Adreno 205 is replacing the earlier Adreno 200 part.

Gyroscope. Mango will support a hardware gyroscope, a feature that was not part of the first generation Windows Phone spec. And in an interesting and related move, no non-supported sensors will be allowed.

What hasn't changed? Most of the spec, actually. All Windows Phones will still ship with capacitive multi-touch screens with 4 or more contact points. A-GPS, accelerometer, compass, light, and proximity sensors. A 5 megapixel or better camera. 256 MB of RAM or more and 8 GB of Flash storage or more. (Most handsets do ship with 512 MB of RAM, Microsoft says, though 8 GB is sadly the default storage capacity.) And three hardware buttons, arrayed in the same layout: Back, Start, and Search. Most dramatically, perhaps, 800 x 480 is the only supported screen resolution for Windows Phone now.

Updated software architecture

With the initial version of Windows Phone 7, the underlying operating system was simply called Windows Phone 7. Now, it's being renamed to Windows Phone OS to obfuscate the versioning (since Mango is version 7.5) and make the branding more obvious. (That is, you have a Windows Phone device running Windows Phone OS.)

Where Windows Phone 7 was based on Silverlight 3 and XNA 3, Mango is based on Silverlight 4 and XNA 4 and supports, for the first time, integration between the two. (In WP7, Silverlight was generally just used for apps and XNA was generally just used for games. Now developers can mix and match.) Silverlight 4 brings improved user interface controls and a Clipboard API for third party copy and paste support, as well as some needed performance improvements.

Windows Phone 7 included Windows Live ID, Xbox LIVE, and Bing integration, and Mango extends those with better location and notification services. And dramatically better support for Asian languages should improve Windows Phone's popularity in international markets.

Multitasking of third party apps

One of the big misconceptions about Windows Phone 7 today involves multitasking. That is, Windows Phone 7 does support full multitasking capabilities, albeit only for those apps that come bundled with the OS. In Mango, multitasking is being opened up for third party apps, and as with Apple before it, Microsoft has come up with a scheme that should work well while preserving battery life and not making the user experience more complex.

At the heart of this system is a new software construct called an agent, so multitasking efficiently may require some app rewriting. This agent is essentially a subset of an app's core logic, and it can run separately from the app's UI, and thus still be running in memory when the user switches to a different app.

And regardless of agents, Mango will support new fast app resume functionality because apps can stay in memory unless that memory is needed for other apps. So switching back and forth between apps should always be faster.

Background tasks

There are a couple of Mango features related to the multitasking infrastructure. The first is background task support.

For example, in Windows Phone 7, only the built-in Zune software provided background audio playback support. Now, third party audio apps-Pandora, Last.FM, whatever--can keep playing in the background too, and utilize the same pop-up notification UI for media control.

Second, Mango will support background transfers for apps that need to perform downloads.

Push notifications

Also related to multitasking is the ability of third party apps to create alarms and reminders. So apps perform background file transfers, for example, could optionally display a toast notification or tile update at the end of the transfer so the user is aware of what happened.


Windows Phone's live tiles are, perhaps, one of the platform's biggest differentiators. Instead of providing static icons, as on the iPhone, Windows Phone apps can provide big, expressive, and dynamic tiles that respond and react to notifications and other changes. In Mango, tiles are getting even more intelligent. Developers will be able to create multiple tiles for a single app, for example, and provide "in-app" tiles that are tied to a specific feature and not just to the app generally.

The example: A flight tracker app where you may want to pin one or more individual flights, each with its own notifications, right to your Home screen. Microsoft calls this feature "deep toast" because the original system notifications were called toast, because they appear like slices of toast out of a toaster.

Microsoft is also increasing the number of live tiles you can add to the Home screen from 15 to 30, and tiles can now flip to provide a secondary display on the "back" of the tile.

Internet Explorer 9

Windows Phone Mango will include a new version of the Internet Explorer 9 Mobile web browser that provides hardware acceleration and utilizes the renderer from the desktop version of IE 9. This should dramatically improve the browsing experience on Windows Phone, of course, and increase compatibility with existing sites. And if Microsoft's performance demos are to be believed, IE 9 Mobile will blow the mobile browsers on Android and iPhone out of the water.

Responding to user complaints, Microsoft has also streamlined the IE 9 user experience and now provides a combined app bar and address bar in landscape mode as well.


Where Windows Phone 7 included Facebook account integration out of the box, Mango adds Twitter account integration as well. (This feature was originally scheduled for the initial release of the platform, but Microsoft and Twitter had a falling out that has since been resolved.) As with Facebook, Twitter account information will be integrated into the People hub.

New Extras

In the initial version of Windows Phone 7, Microsoft provided third party app access to the Music + Videos and Pictures hubs, via a hard to find "ghetto" area called Extras (or Marquee). In Mango, these capabilities continue in enhanced form, and Microsoft is letting third party apps also tie into Bing via the new Search Extras functionality. This will be exposed in a similar to manner as the existing functionality (i.e. in a hard to find Extras area with Bing search results). And third parties can create Search Extras in just four result type areas: Movies, Places, Events, and Products.

Database services

One of the weird developer-oriented limitations in the original shipping version of Windows Phone 7 was the lack of any on-device database support. This is changing in Mango, of course, with the addition of the SQL Compact Embedded (CE) database, which developers will access solely through LINQ, a way of abstracting database access. Put simply, the use of LINQ means that Microsoft can optimize the low-level database as needed and, if required in the future, actually swap it out for a better-performing replacement.

Additionally, Microsoft is also allowing third party apps to seamlessly access the People (contacts) and Calendar data stores as well.

Sensor and camera access for third party apps

While developers could target the accelerometer in the initial version of Windows Phone, Mango adds developer access to two new sensors, the compass and the gyroscope. Additionally, there is a fourth "virtual" sensor called the Motion sensor that uses the other three physical sensors on the device to calculate movement (or two if your phone doesn't have a gyroscope).

Microsoft is also providing raw Camera access to developers so it's possible that third parties will create full-featured camera apps to replace the terrible (and settings adverse) version that comes stock with Windows Phone.

Networking features

Microsoft is adding various new networking features to Mango, including sockets support and Connect Manager control for third party apps. Sockets is arguably the big deal here: It will allow applications like Skype to appear on Windows Phone for the first time.

Developer tools improvements

With over 1500 new APIs coming in Mango, developers are going to want to get up to speed with this upcoming release as quickly as possible. And on that note, beta versions of the Mango-era developer tools will ship in mid-May, Microsoft says. And they're coming with a lot of new features, many of which, of course, target new Mango features. The emulator will now emulate some sensors, like the accelerometer and location sensor, for example, and will add other enhancements like full media support. Developers will be able to target multiple hardware devices when building apps, for easier testing, and an improved profiler is being added to the free version of the tools too, so developers can figure out why their apps run so slow.