The iPhone and Android are dominant in the marketplace. The two platforms currently have 85% of the smartphone marketplace and are continuing to grow that marketshare. Developers are being tasked with targeting these two platforms. In this session, we’ll take a high level look at how we can use c# and .NET knowledge to share code between iOS and and Android. We’ll look at linked files, using the Xamarin Mobile API, the challenges of running across platforms and frameworks, as well as other features of Visual Studio, Monotouch, MonoDevelop, and Mono for Android that allows us to write as much code that can run on both platforms.
Wednesday, November 6, 2013
Friday, October 11, 2013
Async & Await in C# with Xamarin
One of the great things about the .NET Framework is that Microsoft has worked long and hard to improve many features. Since the initial release of .NET 1.0, there has been support for threading via .NET threads as well as an application-level threadpool. This provided a great starting point when compared to Visual Basic 6 and classic ASP programming. The release of.NET 4 brought significant improvements in the area of threading, asynchronous operations and parallel operations. While the improvements made working with asynchronous operations easier, new problems were introduced, since many of these operations work based on callbacks. For example:
- How should a developer handle error checking?
- The program flow tends to be non-linear. Fixing bugs can be problematic.
- It is hard for a developer to get an understanding of what is happening within an application.
This article will look at how Xamarin has implemented the .NET 4.5/C# 5 support into their Xamarin.iOS and Xamarin.Android productions. There are three general areas that I'll focus on:
- A general look at the asynchronous support in Xamarin's mobile products. This includes async, await, and the implications that this has for cross-platform code.
- The new HttpClient class that is provided in .NET 4.5/Mono 3.2.
- Xamarin's extensions for asynchronous operations for Android and iOS.
FYI: Be aware that sometimes the OpenWeatherMap API breaks, for no reason. I found this out after I shipped the article in.
Thursday, October 10, 2013
What's new in Xamarin and iOS7 - webinar
I recently did an online webinar regarding the new iOS7 and Xamarin. In it, I covered the basics of what is new in iOS7 along with what is new in Xamarin's developer platform. Please take some time and view this webinar. The items that were covered include:
- What's new in iOS7.
- The XCode Design Surface.
- An example showing new iOS7 View Animations.
- What's new with Xamarin and async, await, and HttpClient.
- A demo of Razor Templating.
- The Xamarin.iOS Plugin for Visual Studio.
Monday, September 16, 2013
Building a UI in Xamarin.iOS
No matter your feelings toward Apple, there's no denying the marketplace likes the iPhone and iPad family of products. You can't ignore them, and because you're reading this column, I thought it would be interesting to look at the options you have for creating a UI with Xamarin.iOS. There are two options I'll look at in-depth:
- Using the XCode design surface integration with Xamarin Studio.
- Programmatically creating controls.
Thursday, August 29, 2013
Shrinking an image in iOS with Xamarin.iOS and C#
Images taken with the camera are rather large in the iPhone. How do you shrink them down? I need to shrink them because I am going to send them to a web service and I want to spend as little time as possible in the upload process. While I am not sure that this is the best code, it seems to be working for me. I want to put this out for sharing and if you have a suggestion on how to make it better, please let me know.
UIImage img = UIImage.FromFile (fileName);
var width = img.Size.Width;
var height = img.Size.Height;
var newWidth = defaultImageWidth;
var newHeigth = height * newWidth / width; // I always hope I get this scaling thing right. #crossedfingers
UIGraphics.BeginImageContext (new SizeF (newWidth, newHeigth));
img.Draw (new RectangleF (0, 0, newWidth, newHeigth));
img = UIGraphics.GetImageFromCurrentImageContext();
UIGraphics.EndImageContext ();
var width = img.Size.Width;
var height = img.Size.Height;
var newWidth = defaultImageWidth;
var newHeigth = height * newWidth / width; // I always hope I get this scaling thing right. #crossedfingers
UIGraphics.BeginImageContext (new SizeF (newWidth, newHeigth));
img.Draw (new RectangleF (0, 0, newWidth, newHeigth));
img = UIGraphics.GetImageFromCurrentImageContext();
UIGraphics.EndImageContext ();
HTML5 Threading with Web Workers and Data Storage with IndexedDB - MSDN Article
In a previous article, I looked at the HTML5
Note: The APIs for HTML5 vary slightly across different versions of browsers and different implementations. Because HTML5 is still in the recommendation phase at the W3C, you should think of it as a draft at this point. Because these APIs may change before they become a final standard, I cover only the version of HTML5 implemented in Internet Explorer 10. Every opportunity will be made to test the code across other browsers to verify that it works.
Url: http://msdn.microsoft.com/en-us/magazine/dn423698.as
Wednesday, August 28, 2013
Video and History support in HTML5 with Internet Explorer 10 - Article on MSDN
Who hasn’t started looking at the mobile Web and HTML5—features like the viewport, new HTML5 controls, geolocation and many others that are part of smartphones, tablets and advanced browsers? With these features, developers have started to provide users with fairly common, new input controls; jQuery Mobile features; location and mapping; and much more. In this article, I describe two features that you might not be familiar with: the
Url: http://msdn.microsoft.com/en-us/magazine/dn423697.aspx
Subscribe to:
Posts (Atom)