July 28, 2015

Amazon Web Services Mobile SDKs for Xamarin Now Available

By

Amazon Web Services LogoToday, we’re excited to share the launch of the Amazon Web Services (AWS) Mobile SDKs for Xamarin. With these new SDKs, developers can easily connect their high-performance, native Xamarin apps to Amazon’s powerful array of AWS cloud services.

AWS SDK for Xamarin logoAWS platform services provide several powerful solutions, including: identity management through Amazon Cognito Identity, Amazon Cognito Sync, Amazon Simple Storage Service cloud storage, Amazon DynamoDB’s fully managed database, Amazon Mobile Analytics, and Amazon Simple Notification Service for mobile push notifications.

The AWS Mobile SDKs for Xamarin allow you to use a shared C# codebase to connect your native Xamarin iOS and Android apps to any of these AWS services. For example, you can use Amazon Cognito Cloud Sync to synchronize app states between devices for a seamless, cross-device experience and use Amazon S3’s cloud storage for easy access to critical documents and content.

Integrating the AWS Mobile SDKs for Xamarin into your mobile apps is simple.

Getting Started

This example will show you how to get started with Amazon Cognito Cloud Sync:
AWS Cognito SDK

In your app, you will need to initialize a CognitoSyncManager and open a dataset using the Identity Pool ID and Region Endpoint of the pool you just created:

public Dataset GetDataset ()
{
	// Login and open/create the dataset
	var credentials = new CognitoAWSCredentials ("identity-pool-id", RegionEndpoint.USEast1);
	// Optional: Add credential login to associate data to a user
	// credentials.AddLogin ("graph.facebook.com", "FB_AUTH_TOKEN");
	var syncManager = new CognitoSyncManager (credentials,
new AmazonCognitoSyncConfig { RemoteEndpoint = RegionEndpoint.USEast1 });
	var dataset = syncManager.OpenOrCreateDataset ("TODO_LIST");
	return dataset;
}

If you would like your dataset associated to a particular user, enabling the user to share the same data across devices and platforms, you will need to set up an identity provider. Cognito supports Facebook, Google+, Twitter, Amazon, OpenID, or a custom Developer Authenticated Identity.

If you use Facebook authentication, you can use the Facebook Components to authenticate your users after you’ve configured your App ID in the Cognito portal, and then add the authentication token to your credentials before opening your dataset:

credentials.AddLogin ("graph.facebook.com", "FB_AUTH_TOKEN");

You can store any information you’d like in your dataset by specifying an ID and an arbitrary value (in this case a JSON string). After you call the async Sychronize() method, your data will be pushed to the cloud:

public async Task CreateTodoItem (string title)
{
	var dataset = GetDataset ();
	// Create a new todo list item
	var todoItem = new TodoItem ("Pick up some milk");
	// Serialize the object to JSON and put it in the dataset
	dataset.Put (todoItem.Id, JsonConvert.SerializeObject (todoItem));
	// Synchronize changes to the cloud
	await dataset.SynchronizeAsync ();
}

You can also easily fetch all of the items in your dataset from the cloud on any device:

public async Task<IEnumerable<TodoItem>> GetTodoItems ()
{
	var dataset = GetDataset ();
	// Synchronize any changes
	await dataset.SynchronizeAsync ();
	// Deserialize the records' values from the dataset
	return dataset.Records.Select (r =>
                JsonConvert.DeserializeObject<TodoItem> (r.Value));
}

AWS and Xamarin take the hard work out of adding a complex backend to your apps, giving you a flexible, scalable way to go mobile. Be sure to check out all of the AWS SDK Components in the Component Store today!

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone
July 27, 2015

Join Xamarin at AnDevCon 2015 in Boston

By

Join Xamarin in Boston, MA from July 30-31 for AnDevCon 2015, the technical conference for software developers and engineers building Android apps. Key members from the Xamarin team will be available to discuss your apps and projects and show you what’s new across our products.

AnDevCon 2015 Boston Banner

We’re excited to give AnDevCon 2015 attendees a close up look at Xamarin Test Cloud, which we recently announced will be getting support for Appium and its multiple language bindings, including Java, JavaScript, Python, and PHP. You’re invited to join our early access program, and we’ll have members from our Xamarin Test Cloud team onsite at the conference to answer any of your questions.

Come visit us at booth #803 and say hello if you’re at the conference — we look forward to seeing you in Boston!

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone
July 24, 2015

More Awesome Content from Our Community

By

Xamarin developers not only build amazing iOS and Android apps in C#, but love contributing to the Xamarin community through blog posts, components, plugins, and podcasts. The links below will take you to some of favorites over the past few weeks:

Podcasts

Yet Another Podcast with Jesse Liberty

James Montemagno and Jesse Liberty discuss all things Xamarin.

  • Yet Another Podcast – James Montemagno joins Jesse Liberty discuss all things Xamarin, including My Shoppe, Moments, and Xamarin Dev Days.

Great Blog Posts

Awesome Xamarin.Forms Blog Posts

Adam Wolf’s card UI with a drop shadow using Xamarin.Forms.

Thanks to these developers for sharing their Xamarin knowledge with the rest of the developer community. If you have an article or blog post related to Xamarin development that you would like to share, please let us know by tweeting @XamarinHQ and it may be featured in an upcoming community content roundup.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone
July 23, 2015

Build Your Own Messaging App in XAML

By

One of the most popular features of Xamarin.Forms is the ability to use your existing XAML experience to build UIs for iOS, Android and Windows Phone. Moments, a Snapchat clone built with Xamarin.Forms and Microsoft Azure, originally made use of the C# API for creating user interfaces. Today, I’m happy to announce that Moments has been expanded to include a XAML implementation as well, so you can build your own Snapchat clone in XAML today!

Moments, a Snapchat clone built with Xamarin.Forms and Azure.

Build Cross Platform UIs in XAML

If you are coming from a Windows background, Xamarin.Forms XAML will feel right at home! If you aren’t, there are still plenty of great reasons to build your user interface using XAML.

Readability

XAML is often more succinct and readable than the equivalent code in C#. This is especially true when building complex view hierarchies with multiple layouts. Additionally, the parent-child hierarchy inherent in XML allows XAML to mimic the hierarchy of user interface objects with greater visual clarity.

Separation of Concerns

Rather than having an entire page represented in one file, XAML allows you to clearly separate views from the accompanying logic associated with the view, thus making your application more modular.

MVVM Data Binding & Commands

The Model-View-ViewModel (MVVM) architectural pattern is very common in mobile development today – and for good reason. Traditionally, MVVM allows you to further enforce separation of concerns by separating the user interface from the data, with a bridge called a view model. Typically, mobile developers can share the model and view model with all target platforms, while writing the view for each individual platform. With Xamarin.Forms, everything can be shared, including the view. XAML makes using the MVVM pattern easy through data binding and commands, which allow your view and view model to communicate with ease.

Build Your Own Snapchat Clone Today

Moments is a great sample app for seeing everything Xamarin.Forms has to offer. If you’ve ever wondered how to use custom controls from XAML, use markup extensions, implement styling, or enforce the MVVM architectural pattern through data binding and commands, Moments is the sample app for you. Moments is completely open-source and freely available under the MIT license, so building your own Snapchat clone based on Moments is easy. Follow the steps listed here, and you’ll be sending selfies to all your buddies in a matter of minutes!

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone
July 22, 2015

Xamarin Dev Days Recap and Expansion

By

When we announced Xamarin Dev Days, free weekend community events filled with intense and hands-on mobile C# learning, we knew that it would be popular – but we didn’t expect every location to sell out so quickly! Each Dev Days event has been packed full of awesome Xamarin content and fun hacking, and the feedback has been absolutely outstanding.

Head Logo

Dev Days Expansion!

Since we’ve seen such an incredible response to user groups requesting Dev Days in their city, we are excited to announce the next round of Xamarin Dev Days locations. We are not only rolling out more dates and locations in the United States, but we’re also hosting our first official Dev Days event in Europe, and have many more locations in the works!

Make sure to keep an eye on the official Xamarin Dev Days website for future announcements!

Totes2

Here is a sneak peak into what a Dev Days event looks like:

Amazing Presentations

Every Dev Days start off with several presentations introducing every developer to the entire world of the Xamarin Platform, including Xamarin.Forms, Xamarin Test Cloud, and Xamarin Insights. However, it doesn’t stop there as each Dev Days event has special guest speakers from the community present on the topic they’re most passionate about. We’ve see some fantastic presentations covering all aspects of mobile development, including Wearables, MVVM, Azure Mobile Services, and Amazon Web Services, as well as plenty of Xamarin.Forms deep dives.

Sessions Green

Hands-on Learning

After lunch we hold an “Ask the Experts” session where attendees are free to ask anything and everything to get their questions answered from industry experts, and then the Xamarin Team ensures that everyone has their machines fully configured for mobile development. Next, it is on to our interactive labs, code help, and File->New App!, where attendees go through line by line to build their very own Xamarin.Forms mobile application completely from scratch with Xamarin experts guiding them along the way.

Sessions Monkey

Community, Community, Community

Xamarin Dev Days are much more than just an amazing day of hands-on mobile development learning. It’s also the perfect opportunity to connect with other developers in your local community doing amazing things. We have worked closely with local user group leaders to organize Dev Days with us, and they are there to act as your local expert not only during the Dev Days event, but long after it is over.

Amazing Sponsors

Xamarin Dev Days wouldn’t be made possible without our amazing sponsors who not only provide breakfast, lunch, and venues, but also enable Dev Days attendees with the best tools and controls in the industry.

Food Sponsor + James Sponsor3

Don’t see your city on the list yet? Don’t worry as we have plans for even more Dev Days events in the future, so be sure to head to the official Xamarin Dev Days website and request your city!

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone
July 21, 2015

Xamarin’s Newest MVPs!

By

Xamarin MVPAs the Xamarin developer community continues to expand, it consistently provides stand out members that we are excited to include in the Xamarin MVP program. These individuals have made significant contributions by sharing their passion and expertise in mobile app development with Xamarin’s growing global community. We honor these individuals with the Xamarin MVP title for these contributions, which include:

  • Writing great articles, books, and blog posts
  • Speaking in public and online
  • Sharing and building amazing libraries
  • Helping developers online in our forums, on Twitter, Stack Overflow, and other communities
  • Shipping awesome apps

Today, we’re thrilled to recognize our latest round of Xamarin MVPs in 2015 for their remarkable contributions to the community!

chaseflorell Chase Florell Roy Cornelissen roy
mikeB Mike Bluestein Dave Evans dave
les Les Brown Adam Kemp adam
tom Tom Walker Fabian G. Williams fabian
dan Dan Hermes

A big thank you for all of your time, effort, and hard work you have dedicated to the growth of mobile development! If you know an outstanding developer who would make a great Xamarin MVP, please nominate him or her here.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone
July 20, 2015

Same Day Xamarin Support for Visual Studio 2015

By

Today, Microsoft is unveiling the final release of Visual Studio 2015 in a global webcast, and we are joining the celebration! Visual Studio Logo Now Released to Market (RTM) for full use in production, Visual Studio 2015 includes many new features and improvements that make it easier to build apps quickly, including diagnostics, new C# 6 language features, and tighter integrations with TFS for streamlined DevOps.

We’re excited to announce same-day Xamarin support for Visual Studio 2015, including Visual Studio 2015 Community Edition, MSFT’s free IDE for non-enterprise apps. Xamarin and Visual Studio help you go mobile quickly, whether you’re building small projects, amazing consumer games, or employee-facing productivity apps. This combination of Xamarin and Visual Studio 2015 is our most integrated release ever – featuring a Visual Studio 2015 installation process that allows you to choose to install Xamarin with a single click, giving you everything you need to start building native cross-platform apps, all in C#.

Watch Storyboard in Visual Studio 2015

Be sure to check out the Visual Studio 2015 launch webcast today at 8:30am PDT, where MSFT product management teams will demonstrate Visual Studio 2015 product enhancements, including the latest from Xamarin.

It’s never been easier to start building iOS and Android apps — all from VS, all in C#. To learn more about developing native iOS and Android apps with Visual Studio and Xamarin, visit xamarin.com/visual-studio.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone
July 17, 2015

Can’t Miss Community Content

By

Xamarin developers not only build amazing iOS and Android apps in C#, but love contributing to the Xamarin community through blog posts, components, plugins, and podcasts. The links below will take you to some of favorites over the past few weeks:

Podcasts

    Xamarin Podcast Special Edition: Google IO

    Explore mobile backend options with the Xamarin Podcast.

  • Xamarin Podcast — Exploring Backend Options: Mike James and Pierce Boggan discuss mobile backend options for Xamarin developers, including Oracle MCS, Microsoft Azure, and Facebook’s Parse.
  • Gone Mobile — Automated App Testing with eBay’s Niels Frydenholm: eBay’s Niels Frydenholm joins Greg Shackles and Jon Dick to discuss automatic app testing.

Great Blog Posts

Xamarin.Forms

Add bindable maps with the Maps behavior from Jonathan Yates.

Adam Wolf’s card UI using Xamarin.Forms.

Thanks to these developers for sharing their Xamarin knowledge with the rest of the developer community. If you have an article or blog post related to Xamarin development that you would like to share, please let us know by tweeting @XamarinHQ and it may be featured in an upcoming community content roundup.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone
July 16, 2015

Save the Date for Xamarin Evolve 2016

By

Mark your calendars for Xamarin Evolve 2016, taking place April 24-28 in Orlando, Florida! Join the Xamarin team and fellow developers for the largest cross-platform mobile development event in the world.

Xamarin Evolve 2016

Last year, Xamarin Evolve hosted a sell-out crowd of over 1,200 attendees. Speakers from leading companies including Microsoft, Dropbox, Github, Google, Accenture, and IBM led over 90 conference and training sessions covering everything from the Xamarin platform and the latest in iOS and Android development, to the future of C#, mobile security, and cross-platform best practices. Xamarin Evolve attendees were also the first to know about groundbreaking new Xamarin products and capabilities for mobile development.

These are the top five things that Xamarin Evolve attendees told us that they left the conference with:

  • Deeper mobile technical knowledge and skills
  • The ability to go faster with their mobile projects
  • Greater confidence in the success of their mobile strategy
  • Amazing new connections
  • An unforgettable experience

Photos from Xamarin Evolve 2014

Xamarin Evolve 2016 is going to be even more unforgettable! With so much happening in mobile development, and an even bigger venue, you’re going to want to take part in everything Xamarin Evolve has to offer.

Sign up below to be notified when tickets go on sale!

Sign up

 

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone
July 15, 2015

Share Even More Code with Plugins for Xamarin

By

One of my top priorities for Moments, a Snapchat clone built with Xamarin.Forms and Microsoft Azure, was to maximize the amount of code shared between my target platforms. I was already achieving a significant amount of shared code with Xamarin.Forms, but I noticed that many things, such as checking for device connectivity or showing a dialog, had to be done on a per-platform basis. Plugins for Xamarin helped fill in those gaps and allowed me to share even more code.

Plugins for Xamarin NuGet Icon

A Plugin for Xamarin is a special kind of NuGet that adds cross-platform functionality or abstracts platform-specific functionality to a common API. These are extremely lightweight and completely cross-platform, so they can be accessed via a Portable Class Library (PCL) or Shared Project. Below, I’ve shared a few of my favorite Plugins for Xamarin that I used to build Moments.

Connectivity

In today’s world, it’s vital that apps maintain connectivity when interacting with web services and other network-dependent logic. With the Connectivity Plugin for Xamarin and Windows, it’s never been easier to check the connection status of a mobile device, gather connection types and bandwidths, and more.

Testing network connectivity from shared code is literally as easy as writing one line of code:

var connected = CrossConnectivity.Current.IsConnected;

The Connectivity Plugin for Xamarin and Windows can also test the reachability of specific hosts using the IsReachable and IsRemoteReachable methods. Finally, you can subscribe to the ConnectivityChanged event to ensure that your app always knows if the device is connected to the internet:

CrossConnectivity.Current.ConnectivityChanged += (sender, args) =>
{
    // Connectivity changed! Check args.IsConnected!
};

Settings

Another common use case among mobile apps is the ability to store user settings. Each platform exposes its own way of storing settings, such as NSUserDefaults on iOS and SharedPreferences on Android. The Settings Plugin for Xamarin and Windows takes the ability to create and access settings cross-platform!

Rather than dealing with the various platform-specific implementations, the Settings Plugin for Xamarin and Windows makes it easy to implement user settings, as seen below:

public class Settings
{
    public bool NotificationsEnabled
    {
        get { CrossSettings.Current.GetValueOrDefault<bool> ("notificationsEnabled"); }
        set { CrossSettings.Current.AddOrUpdateValue<bool> ("notificationsEnabled", value); }
    }
}

Not only is the Settings Plugin for Xamarin and Windows great for managing settings from shared code, but it can also act as a simple cross-platform key-value store with support for many different data types, such as strings, integers, doubles, booleans, DateTimes, and more!

Dialogs

From alert popups to loading spinners, dialogs are a staple of mobile app development. The User Dialogs Plugin for Xamarin and Windows allows you to show almost any type of dialog you can think of from shared code, including loading spinners, alerts, confirmations, and error dialogs.

Loading Indicators
For performing potentially lengthy tasks, such as logging in a user, use the ShowLoading method:

UserDialogs.Instance.ShowLoading ("Loading");

When the task ends, you can hide the dialog using the following method call:

UserDialogs.Instance.HideLoading ();

Success & Failure
If a dialog needs to reflect success or failure, such as the the result of a user log in, you can use the success and failure APIs available within the User Dialogs Plugin for Xamarin and Windows:

// Success
UserDialogs.Instance.ShowSuccess ("Success");
// Failure
UserDialogs.Instance.ShowError ("Error");

Download a Plugin for Xamarin Today

All of the Plugins for Xamarin listed above helped me significantly increase productivity by achieving over 87% shared code in Moments. Check out Plugins for Xamarin on GitHub to find a plugin for your next project, or find out how easy it is to build your own Plugin for Xamarin.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone