October 31, 2014

iBeacons Everywhere

By

iBeacons were everywhere at Xamarin Evolve this year. From the Evolve Quest app, to the Darwin Lounge, to the presentation I gave with James, attendees got to experience using iBeacons as end users, learn about them in a lecture setting, and do hands on coding with them on both iOS and Android.

iBeacons at Evolve

Among the fun activities for people to do at Xamarin Evolve were the mini-hacks in the Darwin Lounge. Included in these was an Estimote iBeacon mini-hack that allowed attendees to create a simple app to experience iBeacons for themselves. The iBeacon mini-hack is available in the mini-hack repo on GitHub so you can try it yourself.

mini-hacks

The iBeacon mini-hack consists of a simple example that uses either Core Location on iOS to detect the proximity of an Estimote beacon, or the Estimote SDK Xamarin component on Android.

The code is different on each platform since these are different APIs, however conceptually it is very similar. For example, both platforms implement the concept of ranging, where the app will discover the proximity to a beacon.

On iOS, the CLLocationManager implements this in the DidRangeBeacons event:

// iOS uses CLLocationManager.DidRangeBeacons
locationManager.DidRangeBeacons += (object sender,
  CLRegionBeaconsRangedEventArgs e) => { ... }

whereas on Android it goes through the BeaconManager‘s Ranging event:

// Android uses BeaconManager.Ranging
beaconManager.Ranging += (object sender,
  BeaconManager.RangingEventArgs e) => { ... }

The mini-hack has some other goodness, too. In the iOS case, the walkthrough also shows you how to handle the new authorization and setup requirements for Core Location that were added in iOS 8.

I uploaded my completed solution for the mini-hack here.

Check out the mini-hack and see if you can come up with some novel use-cases for deploying iBeacons.

Happy ranging!

TwitterFacebookGoogle+LinkedInEmail
October 30, 2014

Create Your Own Scavenger Hunt with Evolve Quest

By

Xamarin Evolve 2014 attendees had an action packed five days, with activities ranging from mini-hacks in the Darwin Lounge and a plethora of amazing sessions, to seeing Whale Sharks at the Georgia Aquarium. At the center of Xamarin Evolve lived a brand new interactive scavenger hunt, the Xamarin Evolve Quest. Once the Xamarin Evolve Quest app was installed on their smart phones, questers were on their way to winning an exclusive Xamarin Evolve 2014 monkey. monkey2014

Hidden around Xamarin Evolve 2014 were iBeacons from Estimote that questers needed to find using clues from the Xamarin Evolve Quest app. Finishing the quests involved answering several Xamarin trivia questions and completing tasks, such as trying out Google Cardboard.

Evolve Quest

More that 400 attendees finished the Xamarin Evolve Quest and walked away with a limited-edition Xamarin Evolve 2014 monkey. With the success of the Xamarin Evolve Quest, we wanted to enable any Xamarin developer to get their hands on the source code to create their very own scavenger hunt, so get it from GitHub today!

TwitterFacebookGoogle+LinkedInEmail
October 29, 2014

Automate UI Testing Using Xamarin.UITest

By

Before publishing an app, either to an app store or via enterprise deployment, it’s important to test it for functionality. However, due to today’s device fragmentation, testing an app on every device configuration is nearly impossible. Thanks to automated UI testing, though, developers can write automated UI tests for mobile applications and run those tests to check for expected behavior.

Xamarin.UITest is an automated UI testing framework based on Calabash that allows developers to write and execute tests in C#. Moreover, it uses the popular NUnit testing framework to validate these tests.

Writing tests and executing them from Xamarin Studio is easy and can be done from Visual Studio, as well. To get started, just create a new ‘NUnit Library Project’ in Xamarin Studio.

Xamarin-UITest-Image1

To add test functionality, simply add a ‘Xamarin.UITest’ NuGet Package to this project.

Xamarin-UITest-Image2

Now, using TestFixtures and Test attributes, it becomes easier to write automated UI tests. For example: when a user enters a credit card number less than or greater than the desired number, the test should fail. Otherwise, it should pass given a valid credit card number.

[Test]
public void CreditCardNumber_ToShort_DisplayErrorMessage()
{
  _app.EnterText(EditTextView, new string('9', 15));
  _app.Tap(ValidateButton);
  // Assert
  AppResult[] result = _app.Query(ShortErrorMessage);
  Assert.IsTrue(result.Any(), "The error message is not being displayed.");
}
[Test]
public void CreditCardNumber_TooLong_DisplayErrorMessage()
{
  _app.EnterText(EditTextView, new string('9', 17));
  _app.Tap(ValidateButton);
  // Assert
  AppResult[] result = _app.Query(LongErrorMessage);
  Assert.IsTrue(result.Any(), "The error message is not being displayed.");
}
[Test]
public void CreditCardNumber_CorrectSize_DisplaySuccessScreen()
{
  _app.EnterText(EditTextView, new string('9', 16));
  _app.Tap(ValidateButton);
  _app.WaitForElement(SuccessScreenNavBar, "Valid Credit Card Screen did not appear",
    TimeSpan.FromSeconds(5));
  // Assert - Make sure that the message is on the screen
  AppResult[] results = _app.Query(SuccessMessageLabel);
  Assert.IsTrue(results.Any(), "The success message was not displayed on the screen");
}

Once, these steps are completed, the tests can be executed from ‘Run Unit Tests’ or can be submitted to Xamarin Test Cloud to execute on thousands of different devices.

A step-by-step guide and mini-hack from Evolve 2014 is available here.

For more information about Xamarin.UITest visit: http://developer.xamarin.com/guides/testcloud/uitest/intro-to-uitest/

Enjoy your UI testing!

Discuss this blog post in the Xamarin Forums

TwitterFacebookGoogle+LinkedInEmail
October 28, 2014

Join Us for a Xamarin Fall European Roadshow

By

Earlier this year, we embarked on a Xamarin European Road Show where we talked to thousands of developers about creating beautiful, native mobile apps in C# with Visual Studio and Xamarin.

Xamarin Evangelist James Montemagno with attendees at the Xamarin Summer 2014 European Roadshow

Due to popular demand, we are doing it again! During the month of November, we will be in Europe with stops in The Netherlands, France, Denmark, UK, Germany, Italy, and Sweden. Join us to explore the latest Xamarin Platform Previews, Xamarin Test Cloud, and Xamarin Insights.

Don’t miss the opportunity to meet the Xamarin team, connect with other developers, show off your apps, and talk all things mobile. Register now for an event near you today:

We look forward to seeing you in Europe!

TwitterFacebookGoogle+LinkedInEmail
October 27, 2014

Join Xamarin at TechEd Europe 2014

By

The Xamarin team is excited to once again be attending TechEd Europe, this year in Barcelona, Spain.

TechEd Europe 2014 Logo

You can find us at the Xamarin booth (#31) throughout the conference from October 28th – October 31st. We welcome you to stop by with your technical questions and to learn more about the awesome announcements made at Xamarin Evolve 2014, including Xamarin Platform Previews, Xamarin Insights, and updates to Xamarin Test Cloud.

In addition to chatting with us at the booth, we also invite you to check out James Montemagno’s talks on Wednesday, Thursday, and Friday:

  • Wednesday, October 29th, 12-1:15 pmDEV-B217 Go Mobile with C#, Visual Studio, and Xamarin: Learn how to leverage your existing Microsoft .NET and C# skills to create iOS and Android mobile apps in Visual Studio with Xamarin. You’ll get the tools to see how much existing C# code can go mobile to iOS and Android, plus determine the architecture necessary to support maximum code sharing and reuse, as well as guidance and best practices for handling fragmentation across and within each device platform.
  • Thursday, October 30th, 6:30-8:00 pmAsk the Experts Session, Table 43 Mobile App Development: James and Principal Program Manager Lead Ryan Salva from Microsoft will be available to answer your questions during this Ask the Experts Session on Thursday.
  • Friday, October 31st, 10:15-11:30 amDEV-B306 Building Multi-Device Applications with Xamarin and Cordova with Office 365 APIs: Ryan Short, Technical Evangelist at Microsoft, will join James during this session on how to use the Microsoft Office 365 APIs in your mobile apps. During the session, you’ll see sample apps running, understand the scenarios where you would use Office 365 APIs in mobile device applications, and learn how to get started with the Office 365 APIs.

We look forward to seeing you in Barcelona!

Can’t make it to TechEd Europe 2014? We’ve got you covered with a Xamarin Fall European Roadshow starting in November. Look for details on the blog tomorrow to register and join us!

TwitterFacebookGoogle+LinkedInEmail
October 24, 2014

Xamarin Evolve 2014 Xammy Award Winners

By

This year we hosted the inaugural Xammy Awards, recognizing top apps on the global stage of Xamarin Evolve. The competition was fierce, with 11 amazing apps in 4 categories. After much deliberation, our panel of judges selected a winner from each category and our worldwide community voted on a “Developers’ Choice” winner, who were announced on stage at Xamarin Evolve 2014.

Xamarin SVP of Sales and Customer Success, Stephanie Schatz, on stage at Xamarin Evolve 2014 to present the Xammy Awards.

This year’s winners were:

We’d like to congratulate our winners, as well as the other outstanding nominees, once again for the impressive apps that they have built. We invite you to view the videos of this year’s winners and nominees for a closer look at some of the incredible apps being built with Xamarin.

TwitterFacebookGoogle+LinkedInEmail
October 21, 2014

Xamarin Evolve 2014 Session Recordings Now Available

By

At Xamarin Evolve 2014, we were excited to be joined by industry experts and Xamarin engineers delivering sessions on diverse mobile developer topics ranging from the latest in native mobile technologies, to enterprise development, to gaming and more. We are now pleased to make these great Xamarin Evolve 2014 conference sessions available on evolve.xamarin.com for your viewing pleasure.

Xamarin CTO Miguel de Icaza gives a session at Xamarin Evolve 2014

Head over to the Xamarin Evolve 2014 site now to kick back and enjoy the topics you find most interesting. With so many sessions, there’s plenty to choose from and something for everybody.

Enjoy!

TwitterFacebookGoogle+LinkedInEmail

App Spotlight: OBD Fusion Car Diagnostics Video

By

Evolve 2014 was an eye-opening event. It was an amazing opportunity to see some of the innovative mobile apps people are creating with the Xamarin platform. We’ll be featuring several of these over the coming weeks. Today we’re highlighting an automotive diagnostic app called OBD Fusion.

Matt O’Connor from OCTech, and creator of OBD Fusion, shared his app that wirelessly reads onboard vehicle diagnostics from a car. The app enables car enthusiasts to create their own dashboards and access much of the same diagnostic information a master mechanic would use with specialized automotive equipment to diagnose and tune an automobile. With OBD Fusion, users can calculate fuel economy, graph data, and also test emissions in real-time.

To really appreciate how this works, we got a car and took a drive around Atlanta. Watch it in full-screen to see it in action.

What really impresses me is how polished OBD Fusion is and how cleanly it presents useful information to the user. With sensor data coming in at up to 100 times a second, the app works flawlessly, utilizing multi-threading to process a large amount of data and update the dashboards and graphs in real-time – something only a native app can effectively do.

Matt originally created his app in C# as a desktop application. Utilizing Xamarin, he was able to convert it to iOS and Android with over 90% code-reuse, and by using app templates he’s created native smartphone and tablet user experiences. In addition to the automobile’s sensor data, he’s also integrated sensors on the mobile device, including the GPS and accelerometer to measure position and vehicle acceleration.

Congratulations to Matt for creating an outstanding app!

Learn More

OBD Fusion is available in the iTunes and Google Play app stores.

To get started developing with the Xamarin platform, check out our developer documentation, or get live online training with Xamarin University.

TwitterFacebookGoogle+LinkedInEmail
October 20, 2014

Xamarin.Forms Book Preview Edition Available Now

By

The Petzold engine has been churning through the Xamarin.Forms API, and we’re pleased to announce that the first preview edition of Creating Mobile Apps with Xamarin.Forms is now available. It was distributed in print to all Xamarin Evolve 2014 attendees last week and is now available as a free download in a number of formats:

Creating-Mobile-Apps-with-Xamarin-Forms

The six chapters available in the preview edition cover the history of Xamarin.Forms, solution structure, the basics of the view system and building your first Xamarin.Forms app. The extensive samples are also available for download from GitHub.

Charles also presented two talks at Evolve: XAML for Xamarin.Forms and Xamarin.Forms is Cooler Than You Think, both of which will be available shortly as videos of the sessions are published at evolve.xamarin.com.

Evolve-Xamarin-Forms-talk

Work continues on both Xamarin.Forms and the book!

TwitterFacebookGoogle+LinkedInEmail
October 16, 2014

Xamarin Evolve 2014 Re-Cap and Videos

By

We had an incredible time at Xamarin Evolve 2014, and we hope that you did too!  It was amazing to have 1,200 mobile developers all in one place to learn and celebrate mobile development.  And we hope that those of you who joined from 99 countries to watch the live stream found the sessions educational and inspiring.

Miguel de Icaza on stage during the Xamarin Evolve 2014 Keynote

If you missed the Keynote, or if you just want to re-live the excitement of the incredible announcements made there, the Evolve 2014 Keynote video is now available.

Watch Evolve 2014 Keynote

The Big Announcements

Our mission is to make it fast, easy and fun to deliver incredible mobile apps, and with these Xamarin Evolve 2014 announcements, we are bringing to you the world’s best solution to build, test and monitor your mobile apps:

  • Xamarin Insights: In the Keynote, we announced the release of Xamarin Insights, a real-time monitoring service that helps
  • Xamarin CEO Nat Friedman on stage during the Xamarin Evolve 2014 Keynoteyou improve your apps by tracking crashes and exceptions, and by providing insights into what is happening with your live users.

  • Xamarin Platform Previews: We announced 3 very exciting platform previews that we are making available immediately.
    • Xamarin Android Player: We tackled the single greatest pain point in Android development - the outdated, clunky, slow experience provided by the standard Android emulator. Our new Xamarin Android Player gives your apps the shortest startup time and best possible performance through hardware-virtualization and hardware-accelerated graphics.
    • Xamarin CTO Miguel de Icaza on stage at the Xamarin Evolve 2014 Keynote

    • Sketches: Sketches is a lightweight environment to explore the immediate effects of the code you write. Sketches are ideal to learn new APIs, prototype ideas, and quickly iterate on designs. When you are happy with your code in a Sketch, you can easily copy it into your app. You can also take snippets from your open solution and study them in this isolated live coding environment, making Sketches an incredibly powerful tool for debugging.
    • Profiler: The Xamarin Profiler helps you dissect, analyze, and polish your C# mobile applications. The profiler collects information about the managed side of your Xamarin iOS and Android applications and helps you to figure out where to spend the most time making improvements. You can use it to find memory leaks, resolve performance bottlenecks, and add polish to your applications before getting them out the door.

    Xamarin CEO Nat Friedman on stage at Xamarin Evolve 2014

  • Xamarin Test Cloud Updates: We announced some exciting new features for Xamarin Test Cloud:
    • Xamarin.UITest: Our new automated UI testing framework that harnesses the power of the C# language to create beautiful, readable, first-class test code with all the power of the .NET framework.
    • Improved Capture Tools: Screen recording in Xamarin Test Cloud enables developers to see video playback of an app running through its test cases, capturing the full testing flow, including animations.
    • Test Execution Enhancements: One of the most exciting announcements for Xamarin Test Cloud is hyper-parallel test execution. Currently, when you submit a test run to 10 unique devices, those tests happen at the same time across the devices, but the individual tests run one after the other. Hyper-parallel test execution takes this to the next level by splitting a test suite into chunks and executing the chunks in parallel on equivalent devices. We have seen this drop execution time from around 2.5 hours to just 12 minutes for our own tests.
  • IBM and Xamarin Partnership: Enterprise apps must have a consumer-grade front-end, an enterprise-grade back-end, and a comprehensive mobile software development lifecycle. In order to support the developers in our community building enterprise apps, we’ve partnered with IBM on two initial integrations, available now:
    • IBM MobileFirst SDK for Xamarin: pre-built software library that Xamarin and IBM developers can embed in their mobile apps to connect, secure and manage the apps using IBM Worklight, a part of the IBM MobileFirst portfolio.
    • IBM MobileFirst Add-Ons for Xamarin Studio and Visual Studio: Extensions that enable developers to configure and access the IBM Worklight server from a single environment.
  • Xamarin.Forms Components Ecosystem: Six major .NET component vendors have transformed over 140 existing charts, graphs, gauges, and grids into Xamarin.Forms-compatible, cross-platform mobile controls. Our component vendor partners have created beautiful UI controls that enable mobile developers to create native user experiences that meet the increasing demands of mobile enterprise apps, while saving countless hours developing these views for multiple platforms.

The rest of the conference session videos will be rolled out over the next few weeks, so stay tuned for more great Xamarin Evolve 2014 content!

TwitterFacebookGoogle+LinkedInEmail