Tag Archives: xamarin

Introducing XAML Standard and .NET Standard 2.0

XAML Standard

We are pleased to announce XAML Standard, which is a standards-based effort to unify XAML dialects across XAML based technologies such as UWP and Xamarin.Forms.

XAML Standard is a specification that defines a standard XAML vocabulary. With that vocabulary, frameworks that support XAML Standard can share common XAML-based UI definitions. The goal is for the first version, XAML Standard 1.0, to be available later this year.

Post-specification plans include support of XAML standard in Xamarin.Forms and UWP. You can continue developing your UWP and Xamarin.Forms apps as you do today. When XAML Standard support is enabled, you will be able to reuse and share between the frameworks and expand into more platforms.

To visualize what this support would look like, here’s a side-by-side comparison between today’s XAML in Xamarin.Forms and in UWP:

In the above example – once XAML Standard is supported by Xamarin.Forms, you can use <TextBlock /> and have it supported in a Xamarin.Forms app targeting iOS and Android instead of needing to know and use <Label /> as shown above. In addition to a TextBlock, here are some of the currently proposed items for standardization.

We are at the beginning of a journey that makes it easy for you to reuse your XAML source files between some simple Xamarin.Forms and UWP views. For example – a Settings.xaml page, where you typically have some text, toggle switches and some buttons. You’d only need to design and create one XAML file to describe this UI and that can be used everywhere.

Nothing changes for existing developers – you can continue to use the same APIs you have always used in both frameworks. XAML Standard will help you reuse/share any common UI code that you wish to share between end points.

The XAML Standard v1 draft spec is being defined in the open, we encourage you to start a discussion or give us direct feedback in the GitHub repo here.

.NET Standard 2.0

We are also happy to announce .NET Standard 2.0! .NET Standard is the set of APIs which work in all .NET implementations. A good way to think about it is how HTML5 is today. There are many different browsers which implement HTML parsing and rendering, but the HTML standard is the common glue that holds the web together and allows for interoperability.

.NET Standard was introduced in June of 2016 to bring consistency to the .NET ecosystem. With the .NET Framework, Xamarin & Mono, .NET Core and then UWP, there were many different implementations of .NET and it was very difficult to write code or a library that could work across all of them. Using .NET Standard, and the tooling in Visual Studio, makes it possible to build libraries and NuGet packages that work literally everywhere .NET runs.

The feedback we received on after .NET Standard’s introduction last year was generally phrased as “We like the direction you’re going in, but the set of APIs isn’t large enough to be useful.” The goal with .NET Standard 2.0 is to respond to that feedback and add a large set of .NET’s “greatest hits” into .NET Standard. To do this, we looked at the intersection of APIs between the .NET Framework and Mono. This lead to the 2.0 definition including over 20,000 new APIs and those APIs enable the top 70% of existing NuGet packages to work.

With the addition of .NET Standard 2.0 support for UWP with the Fall Creators Update, .NET developers will be able to share code across all Windows 10 devices, in the cloud and through the rest of the .NET ecosystem. This will also make it easier to reuse existing WinForms and WPF code as many of the most frequently used APIs like DataSet/DataTable, and popularly requested APIs like SqlClient, are now part of .NET Standard 2.0.

You can learn more about .NET Standard here.

Forming the shape of the future

We invite you, the .NET community, to join the discussion and help shape the future of XAML Standard and .NET Standard. You can provide your feedback, both suggestions and issues, at the following locations; .NET Standard on Github and XAML Standard on Github.

Resources:

Project Rome for Android Update: Now with App Services Support

Project Rome developers have had a month to play with Project Rome for Android SDK (Android SDK), and we hope you are as excited about its capabilities as we are! In this month’s release, we are thrilled to bring you support for app services. Before, we offered the ability to launch a URI from an Android device onto a Windows device. However, the SDK was limited to sending a URI. With the introduction of app services, now you can easily message between Android and Windows devices.

What are App Services?

In short, app services allow your app to provide services that can be interacted with from other applications. This enables an Android application to invoke an app service on a Windows application to perform tasks behind the scenes. This blog post is focused on how to use app services between Android to Windows devices. For a deeper look at app services on Windows, go here.

Messaging Between Connected Devices

Let’s circle back to the example in the original blog post. Paul is an app developer that has integrated the Android SDK into his app. He had created his Contoso Music App, giving users the ability to launch the app across devices, without skipping a beat. That experience was enabled using the RemoteLaunch APIs. It has been a great feature for his app. Paul has an Android phone and listens to music while he goes out for a run. When he gets home, he can easily launch the app on his Xbox—with surround sound speakers—to continue playing with a higher quality sound.

As Paul moves about the home he often finds it frustrating that he has to go back to the Xbox to control the music. On a typical day he loads a playlist but finds himself jumping around from song to song, depending on his mood. This is where app services comes in.

Now, Paul can add the ability to control the music app running on his Xbox from his Android phone. This works very well for Paul because he’s always carrying his phone with him, so it’s much more convenient than having to go to the Xbox every time he wants to change the song.  Once the Android app establishes an AppServiceClientConnection, messaging can flow between devices.

Here’s a look at the Android SDK app services in code.

First, you must discover devices, using RemoteSystemDiscovery for the connectionRequest:


// Create a RemoteSystemDiscovery object with a Builder
RemoteSystemDiscovery.Builder discoveryBuilder;

// Implement the IRemoteSystemDiscoveryListener to be used for the callback
discoveryBuilder = new RemoteSystemDiscovery.Builder().setListener(new IRemoteSystemDiscoveryListener() {
    @Override
    public void onRemoteSystemAdded(RemoteSystem remoteSystem) {
        Log.d(TAG, &amp;quot;RemoveSystemAdded = &amp;quot; + remoteSystem.getDisplayName());
        devices.add(new Device(remoteSystem));        
    }
});

// Start discovering devices
startDiscovery();
	 

Second, establish an AppServiceClientConnection. The IAppServiceClientConnectionListener handles the status of the connection, while the IAppServiceResponseListener handles the response to the message.

AppServiceClientConnection


// Create an AppServiceClientConnection
private void connectAppService(Device device) {
        _appServiceClientConnection = new AppServiceClientConnection(APP_SERVICE,
            APP_IDENTIFIER,
            new RemoteSystemConnectionRequest(device.getSystem()),
            new AppServiceClientConnectionListener(),
            new AppServiceResponseListener());

AppServiceClientConnection callback


// Implement the IAppServiceClientConnectionListener used to callback  
// the AppServiceClientConnection 
private class AppServiceClientConnectionListener implements IAppServiceClientConnectionListener {

	// Handle the cases for success, error, and closed connections
        @Override
        public void onSuccess() {
            Log.i(TAG, &amp;quot;AppService connection opened successful&amp;quot;);            
        }

        @Override
        public void onError(AppServiceClientConnectionStatus status) {
            Log.e(TAG, &amp;quot;AppService connection error status = &amp;quot; + status.toString());
        }

        @Override
        public void onClosed() {
            Log.i(TAG, &amp;quot;AppService connection closed&amp;quot;);            
        }
    }
	 

AppServiceClientResponse callback


// Implement the IAppServiceResponseListener used to callback  
// the AppServiceClientResponse
private class AppServiceResponseListener implements IAppServiceResponseListener() {
    @Override
    public void responseReceived(AppServiceClientResponse response) {
        AppServiceResponseStatus status = response.getStatus();

        if (status == AppServiceResponseStatus.SUCCESS)
        {
            Bundle bundle = response.getMessage();
            Log.i(TAG, &amp;quot;Received successful AppService response&amp;quot;);

            String dateStr = bundle.getString(&amp;quot;CreationDate&amp;quot;);

            DateFormat df = new SimpleDateFormat(DATE_FORMAT);
            try {
                Date startDate = df.parse(dateStr);
                Date nowDate = new Date();
                long diff = nowDate.getTime() - startDate.getTime();
                runOnUiThread(new SetPingText(Long.toString(diff)));
            } catch (ParseException e) {
                e.printStackTrace();
            }
        }
        else
        {
            Log.e(TAG, &amp;quot;Did not receive successful AppService response);
        }
    }
}
	 

Xamarin

That’s not all: we have updated the Xamarin for Android sample with app services, too.

From the sample, these two functions are used in the RemoteSystemActivity class to connect, and then ping, via app services.

AppServiceClientConnection


private async void ConnectAppService(string appService, string appIdentifier, RemoteSystemConnectionRequest connectionRequest)
{
    // Create AppServiceClientConnection
    this.appServiceClientConnection = new AppServiceClientConnection(appService, appIdentifier, connectionRequest);
    this.id = connectionRequest.RemoteSystem.Id;

    try
    {
        // OpenRemoteAsync returns a Task&amp;lt;AppServiceClientConnectionStatus&amp;gt;
        var status = await this.appServiceClientConnection.OpenRemoteAsync();
        Console.WriteLine(&amp;quot;App Service connection returned with status &amp;quot; + status.ToString());
    }
    catch (ConnectedDevicesException e)
    {
        Console.WriteLine(&amp;quot;Failed during attempt to create AppServices connection&amp;quot;);
        e.PrintStackTrace();
    }
}
	 

SendMessageAsync


private async void SendPingMessage()
{
    // Create the message to send
    Bundle message = new Bundle();
    message.PutString(&amp;quot;Type&amp;quot;, &amp;quot;ping&amp;quot;);
    message.PutString(&amp;quot;CreationDate&amp;quot;, DateTime.Now.ToString(CultureInfo.InvariantCulture));
    message.PutString(&amp;quot;TargetId&amp;quot;, this.id);

    try
    {
        var response = await this.appServiceClientConnection.SendMessageAsync(message);
        AppServiceResponseStatus status = response.Status;

        if (status == AppServiceResponseStatus.Success)
        {
            // Create the response to the message
            Bundle bundle = response.Message;
            string type = bundle.GetString(&amp;quot;Type&amp;quot;);
            DateTime creationDate = DateTime.Parse(bundle.GetString(&amp;quot;CreationDate&amp;quot;));
            string targetId = bundle.GetString(&amp;quot;TargetId&amp;quot;);

            DateTime nowDate = DateTime.Now;
            int diff = nowDate.Subtract(creationDate).Milliseconds;

            this.RunOnUiThread(() =&amp;gt;
            {
                SetPingText(this as Activity, diff.ToString());
            });
        }
    }
    catch (ConnectedDevicesException e)
    {
        Console.WriteLine(&amp;quot;Failed to send message using AppServices&amp;quot;);
        e.PrintStackTrace();
    }
}
	 

All documentation and code for both Java and Xamarin can be found on our GitHub here.

Staying Connected with Project Rome

The power of the Project Rome platform is centered around connecting devices (both Windows and Android). With the introduction of app services functionality into the Android SDK, we continue to provide the tools developers need to create highly compelling experiences.

To learn more about the capabilities of the Android SDK, browse sample code and get additional resources related to the platform, check out the information below:

The Windows team would love to hear your feedback. Please keep the feedback coming using our Windows Developer UserVoice site. If you have a direct bug, please use the Windows Feedback tool built directly into Windows 10.

Windows Developer Day – Creators Update

Back in October, Satya, Terry and Panos introduced the Windows 10 Creators Update. They showed some of the new features and announced some amazing new additions to our Surface family of devices. Since then, my team has been working to complete the platform work for the Creators Update to deliver the full power of the Universal Windows Platform to our developers around the world.

Today, I had the chance to host the Windows Developer Day for the Creators Update and to share some of the developer-focused features that are coming soon. You can get started using these today by becoming a Windows Insider and downloading our latest preview SDK, which is now feature complete.

This is an exciting day for me because I love getting to spend time and share information with our developers. We are all driven by our mutual passion to build technology, whether we work on apps for enterprise, games or anything in between.

UWP Improvements

The Universal Windows Platform (UWP) enables your Windows apps to take advantage of the full power of the PC. To show an example of this power, I was joined on stage by Vincent Hardy from Adobe Systems, who showed us Adobe XD, a full-featured and sophisticated desktop application built on UWP.  The Adobe XD app combines beauty and power to deliver a great experience across multiple devices, form factors and input modalities.

We know that many developers want to take full advantage of modern Windows capabilities delivered in UWP, while still retaining their existing technology and code investments. The Desktop Bridge for Windows enables existing desktop applications to call UWP APIs and to be distributed and updated via the Windows Store. The Desktop Bridge makes it easier than ever to share code between Win32, .NET and UWP, taking advantage of the store’s ability to deliver easy and automated upgrades to help ensure that customers are always running the latest and best versions of their apps. Today, I showed Evernote, Photoscape X Pro and KODI, just three of the more than 330 Windows apps and games published to the store in the first four months of availability.

We believe we can work faster and smarter to deliver the best platform for developers if we work with the community. To do just this, I announced that we will make all Microsoft developer documents available and open for community collaboration. In addition, we will open our bug and feature backlog to the public and take bug contributions and feature requests starting today at noon.

In that spirit of openness, I was joined on stage by Todd Anglin from Progress, makers of the powerful Telerik controls. Telerik is popular with enterprise developers, enabling them to build great business applications with a rich set of easy-to-use UI controls. Todd showed us what these great controls can do, and announced that they are now Open Source and available on GitHub and also as NuGet packages. Find out more at telerik.com/uwp.

One of the great powers of UWP is its ability to run across a wide range of Windows devices and enable a wide range of experiences. Today, I showed a few examples of this ability:

  • Developers will be able to use the Windows Holographic Platform to bring amazing 3D experiences, both apps and games, not just to HoloLens, but to the wide range of mixed-reality headsets coming soon. We showed how easy it is to make a single app look fantastic across HoloLens and occluded headsets.
  • The new Cortana Skills Kit gives developers new and natural ways to connect user to their apps and services. We built a Cortana Skill on stage today and showed how easy it is to integrate bots created using the Microsoft Bot Framework and LUIS.
  • We know that your users interact with a variety of devices throughout the day, so we are building UWP capabilities (called “Project Rome”) to help your experiences flow seamlessly across devices, and guide users to your best and richest experience. Rome provides “apps for websites”, a simple tool that directs users to your apps (with the right context) rather than simply opening the browser. Rome’s cross-device services make it easy for users to continue an activity within your app as they move from one device to another, including Android devices. To make this possible, we released today the Rome SDK for Android.

Whenever I talk to developers, I hear that it is critically important for us to enable you to build apps that are visually beautiful and engaging, and that also take advantage of the latest and coolest hardware capabilities. It is also a high priority for us. Today, I showed some of the new capabilities that are coming to the visual and XAML layers of the platform that enable you to create beautiful user experiences through the use of effects, animations and transitions. With only a small amount of code, you can bring these effects to your apps with amazing results that delight users. In the Creators Update, we have worked to deliver new capabilities in pen and ink, including a more powerful ink toolbar that’s easy for any developer to use; smart ink, which enables recognition of lists, simple shapes and even math symbols; and enhanced APIs that enable you to do more than ever with the Surface Dial. Check out the video of the presentation for a full demo that shows a lot of these features coming together to make a beautiful and engaging app.

Games on UWP

I talked a lot about apps, but we’re also building UWP to be the best platform for building amazing games that run across the PC and Xbox One. With the Creators Update, UWP makes game development faster, easier and better. Specifically, I’d like to call out three key UWP improvements that will be appreciated by gamers and devs alike:

  • Game Mode: Windows 10 can optimize system resources to deliver the best PC gaming experience possible.
  • UWP on Xbox: UWP games (along with apps) will now be available on Xbox One via the Windows Store.
  • Windows Sonic: Microsoft’s next-gen spatial audio platform provides a powerful, immersive sound experience with support for Dolby Atmos. Windows Sonic will be available on Xbox One and Windows 10 PCs, also supporting both speakers and headphones.
  • Intelligent install: Lastly, the UWP packaging format makes it easier to install the bits in the right order, letting players jump into a new game (or app) before it has fully downloaded. And updates focus on downloading only the bits that have changed, so players can jump back in even faster.

For more information on these features and many more coming this year, tune into the Xbox sessions at GDC in a few weeks.

Windows is the home for all developers

I’m a developer, and my team is a team of developers. Like you, we love our tools and services and we’re very demanding of them. We want Windows to be the very best place to develop experiences, whether for Windows, the web or cross-platform. Today, we showed some of the performance, stability and debugging improvements in Visual Studio 2017. We demonstrated improvements to the Console and Bash, as well as to the Windows Subsystem for Linux. We showed remote access to device information via the Windows Device Portal, and even pixel-level GPU debugging with the new PIX tool for Windows.

The Windows Store team walked through several new and improved services coming in the next few months. Store Services APIs provide services to help you understand how your app is performing in the wild, including analytics and telemetry, flighting, automated submissions and updates, and ad campaigns.  The team also highlighted updated services to enable better user engagement using A/B testing, targeted push notifications and more.

And, of course, I recognize that you use lots of services from providers other than Microsoft, so today it gave me great pleasure to show powerful additions to the collection of middleware that is available to Windows Developers. Today, we announced the immediate availability to two important libraries:

  • The Windows SDK for Google Analytics brings one of the most popular and powerful real-time analytics packages to Windows. The core library works with UWP, Xamarin, Windows Forms and WPF, allowing for maximum code reuse.
  • Facebook App Install Ads are now available for UWP apps. Facebook App Install Ads are displayed in the Facebook newsfeed both on the web and in the Facebook app, bringing immense reach to Windows developers, as well as rich targeting capabilities (including interests, location and demographics) and their ads manager dashboard.

Where to get the bits

Here’s a quick recap of some of the announcements we made today:

  • Windows SDK Availability: Become a Windows Insider and get the newest feature-complete flight of the Windows 10 Creators Update SDK today.
  • Documentation: For the first time, all of Microsoft’s developer documentation will be in one place (http://docs.microsoft.com/) where it will be easier to find and use. We are also opening up the docs to community contribution.
  • Developer Platform Backlog: My team and I are making our backlog public, for both features and bugs. This will be online at noon today at https://developer.microsoft.com/windows/platform.
  • Telerik Controls: The Telerik UWP control library is now open source and available on GitHub and as NuGet packages. Find out more at telerik.com/uwp.
  • Cortana Skills Kit: The Cortana Skills Kit will enter open Developer Preview later this month.
  • Rome SDK for Android: This is a new SDK that brings the cross-devices services of “Project Rome” to Android devices, allowing easy and powerful integration with Windows. Find the new SDK at https://github.com/Microsoft/project-rome.
  • UWP Community Toolkit 1.3: Today, we are releasing a big update to the toolkit that includes many contributions from our developer community.
  • Windows SDK for Google Analytics: This new SDK, available now, enables Windows developers (UMP, Xamarin, WPF and WinForms) access to one of the more popular and powerful real-time analytics suites. Get this today at https://github.com/dotnet/windows-sdk-for-google-analytics.
  • Windows SDK for Facebook: With one billion users, Facebook offers one of the most powerful tools for you to acquire new users for your app or game. Check out the new SDK here: https://developers.facebook.com/docs/app-ads/windows-sdk.

It was a great day today, and there is more to come. We look forward to seeing you at Build in a few months when we will go deeper into the Creators Update capabilities for developers, and take a look at what’s coming next. In the meantime, I’d like to invite all of you to get started developing for Windows Creators Update today. Download the SDK, update your applications with new features (or build all-new apps that deliver the best new experiences), and please keep giving us feedback.

— Kevin

Announcing Project Rome Android SDK

Project Rome Overview

Project Rome is a platform for creating experiences that transcend a single device and driving up user engagement – empowering a developer to create human-centric scenarios that move with the user and blur the lines between their devices regardless of form factor or platform.

We first shipped Project Rome capabilities for Remote Launch and Remote App Services in Windows 10 Anniversary Update.

Project Rome Android SDK

Today we are excited to announce the release of the Android version of the Project Rome SDK.  This Android SDK works both with Java and with Xamarin.

You can download the Project Rome SDK for Android here.

Capabilities exposed through the Project Rome Android SDK

Let’s take an example of an app that might need this capability. In the last blog post, we had talked about Paul and his Contoso Music App. In that scenario, Paul had his UWP app which was a music player, and he wanted to make sure that his users had a way to communicate between his app as they moved between devices.

If we take that example further, we can imagine that Paul has a Contoso Music App for Android as well. Paul notices that most of his users use his app on Windows, and on Android. These are the same users logged in with the same MSA. Paul wants to make sure that his users’ experience translates well when they move between their Android and Windows devices. Paul also notices that many of his Windows users run his UWP app on their Xbox at home.

With the Project Rome Android SDK Paul can use:

  1. The Remote Systems API to discover other Windows devices that the user owns. The Remote Systems APIs will allow the Contoso Music app to discover these devices on the same network, and through the cloud.
  2. Once discovered, the Remote Launch API will launch his app on another Windows device.
  3. Once his app is launched on the other device, Paul can use remote app services to control his app running on Windows from his Android device. We are not releasing this functionality in the release today, but it is coming soon in a future release of the Android SDK.

Thus, using the Project Rome Android SDK, Paul can bridge the experience gap that exists as his users move between their Android and Windows devices.

Capability Walkthrough

We will briefly walk through both a Java and Xamarin example.  We have full examples of UWP here: https://github.com/Microsoft/Windows-universal-samples/tree/dev/Samples/RemoteSystems and Android here: https://github.com/Microsoft/project-rome/tree/master/Project%20Rome%20for%20Android%20(preview%20release).

Click on the image below to see the Android Sample app in action:

Using Java

Here are snippets in Java from our sample of how you’d use the Project Rome Android SDK.  The first step to get going with the Android SDK is to initialize the platform, where you’ll handle authentication.


Platform.initialize(getApplicationContext(), new IAuthCodeProvider() {
    @Override
    public void fetchAuthCodeAsync(String oauthUrl, Platform.IAuthCodeHandler authCodeHandler) {
        performOAuthFlow(oauthUrl, authCodeHandler);            
    }
}

Using OAuth you’ll retrieve an auth_code via a WebView:


public performOAuthFlow (String oauthUrl, Platform.IAuthCodeHandler authCodeHandler) {

    WebView web;
    web = (WebView) _authDialog.findViewById(R.id.webv);
    web.setWebChromeClient(new WebChromeClient());
    web.getSettings().setJavaScriptEnabled(true);
    web.getSettings().setDomStorageEnabled(true);

    // Get auth_code
    web.loadUrl(oauthUrl);

    WebViewClient webViewClient = new WebViewClient() {
        boolean authComplete = false;
        @Override
        public void onPageFinished(WebView view, String url) {
            super.onPageFinished(view, url);

            if (url.startsWith(REDIRECT_URI)) {
                Uri uri = Uri.parse(url);
                String code = uri.getQueryParameter(&amp;quot;code&amp;quot;);
                String error = uri.getQueryParameter(&amp;quot;error&amp;quot;);
                if (code != null &amp;amp;&amp;amp; !authComplete) {
                authComplete = true;
                authCodeHandler.onAuthCodeFetched(code);
                } else if (error != null) {
                  // Handle error case                                    }
            }
         }
    };

    _web.setWebViewClient(webViewClient);
}

Now, discover devices:


RemoteSystemDiscovery.Builder discoveryBuilder;
discoveryBuilder = new RemoteSystemDiscovery.Builder().setListener(new IRemoteSystemDiscoveryListener() {
    @Override
    public void onRemoteSystemAdded(RemoteSystem remoteSystem) {
        Log.d(TAG, &amp;quot;RemoveSystemAdded = &amp;quot; + remoteSystem.getDisplayName());
        devices.add(new Device(remoteSystem));
        // Sort devices
        Collections.sort(devices, new Comparator&amp;lt;Device&amp;gt;() {
            @Override
            public int compare(Device d1, Device d2)
            {
                return d1.getName().compareTo(d2.getName());
            }
        });
       }
});
startDiscovery();

Remote launch a URI to your device:


new RemoteSystemConnectionRequest(remoteSystem)
String url = &amp;quot;http://msn.com&amp;quot;

new RemoteLauncher().LaunchUriAsync(connectionRequest,
        url,
        new IRemoteLauncherListener() {
            @Override
            public void onCompleted(RemoteLaunchUriStatus status) {

            …
            }
        };

Using Xamarin

Similarly, here are snippets in Xamarin.

You will first initialize the Connected Devices Platform:


Platform.FetchAuthCode += Platform_FetchAuthCode;
var result = await Platform.InitializeAsync(this.ApplicationContext, CLIENT_ID);

Using OAuth you’ll retrieve an auth_code:


private async void Platform_FetchAuthCode(string oauthUrl)
{
    var authCode = await AuthenticateWithOAuth(oauthUrl);
    Platform.SetAuthCode(token);
}

Now, discover devices:


private RemoteSystemWatcher _remoteSystemWatcher;
private void DiscoverDevices()
{
    _remoteSystemWatcher = RemoteSystem.CreateWatcher();
    _remoteSystemWatcher.RemoteSystemAdded += (sender, args) =&amp;gt;
    {
        Console.WriteLine(&amp;quot;Discovered Device: &amp;quot; + args.P0.DisplayName);
    };
    _remoteSystemWatcher.Start();
}

Finally, connect and launch URIs using LaunchUriAsync:


private async void RemoteLaunchUri(RemoteSystem remoteSystem, Uri uri)
{
    var launchUriStatus = await RemoteLauncher.LaunchUriAsync(new RemoteSystemConnectionRequest(remoteSystem), uri);
}

If you want to see the Xamarin code, please head over to https://github.com/Microsoft/project-rome/tree/master/xamarin.

Wrapping Up

Project Rome breaks down barriers across all Windows devices and creates experiences that are no longer constrained to a single device. With today’s announcement, we are bringing this capability to Android devices as well. The Remote Systems API available in Windows 10 is a key piece of Project Rome that provides exposure of the device graph and the ability to connect and command – this is fundamental for driving user engagement and productivity for applications across all devices.

To learn more and browse sample code, including the snippets shown above, please check out the following articles and blog posts:

The Windows team would love to hear your feedback.  Please keep the feedback coming using our Windows Developer UserVoice site. If you have a direct bug, please use the Windows Feedback tool built directly into Windows 10.

UWP Experiences – App Samples

The UWP App Experiences are beautiful, cross-device, feature-rich and functional app samples built to demonstrate realistic app scenarios on the UWP platform across PC, Tablet, Xbox and more. Besides being open source on GitHub, each sample is accompanied by at least one blog post and short overview video, and will be published on the Windows Store in the upcoming month to provide easier access for developers.

The News Experience

( source | blog post | video )

Fourth Coffee is a news app that works across desktop, phone, and Xbox One, and offers a premium experience that takes advantage of each device’s strengths including tailored UI for each input modality such as controller on Xbox, touch on tablet and mouse on Desktop.

The Weather Experience

( source | blog post | video )

Atmosphere is a weather app that showcases the use of the popular Unity Engine to build beautiful UWP apps. In addition, the app implements UWP app extensions to enable other developers to extend certain areas of the app, as well as exposes an app service that enables other apps to use that weather information, as illustrated by Fourth Coffee.

The Music Experience

( source | blog post | video )

Backdrop is a cross-platform music app sharing code between UWP and other platforms using Xamarin. It supports background audio on UWP devices and cross-platform device collaboration using SignalR.

The Video Experience

( source | blog post | video )

South Ridge Video is a hosted web application built with React.js and hosted on a web server. The app can easily be converted to a UWP application that takes advantage of native platform capabilities, and can be distributed through the Windows Store as with any other UWP app.

The IoT Experience

( source | blog post | video )

Best For You is a fitness UWP app focused on collecting data from an IoT device using Windows IoT Core, Azure IoT Hub, Azure Event Hub and Azure Stream Analytics for processing.

The Social Experience

( source )

Adventure Works is a cross-device UWP application for sharing adventures and experiences with fictional friends. It is separated into three parts:

About the samples

These samples have been built and designed for multiple UWP devices and scenarios in mind from the start and are meant to showcase end to end solutions. Any developer can take advantage of these samples regardless of the device type or features they are targeting, and we are looking forward to hearing about your experience on the official GitHub repository.

Happy coding!

Designing and Prototyping Apps with Adobe Experience Design CC (Beta)

Adobe Experience Design CC (Beta) or Adobe XD, is a new creative tool from Adobe for designing high-fidelity prototypes of websites and mobile apps.  You can try a new public preview released today of Adobe XD on Windows 10.

Why Adobe XD?

A well-designed app often starts out with a sketch, a rough prototype, something that can be shared with stakeholders. But the challenge has always been that to get something testable and demonstrable, you needed to do some coding, you needed to get developers involved in building a prototype that might get thrown away.  But once you have developers investing in coding, they are reluctant to change the code – even if that’s the right thing to do based on the feedback from your prototype.  In his book The Inmates are Running the Asylum, Alan Cooper discusses just this challenge.  That’s where Adobe XD comes in – it is a tool expressly designed for building quick prototypes as well as high-fidelity user experience designs.  With Adobe XD, anyone can create wireframes, interactive prototypes, and high-fidelity designs of apps and websites.  Once you have your prototype, you then can import the visuals into Visual Studio or the IDE of your choice to start building out the final application.

Below is a quick walk-through of using Adobe XD.

Designing a User Experience

To give you an idea of how to use Adobe XD to design quick prototypes, I am going to walk you through the process that I am going through to redesign an app and create a quick prototype with Adobe XD.  I have found that having an interactive prototype with transitions and multiple screens is much more effective at illustrating a user journey than a storyboard of screen images.  I am designing a new version of an app, Architecture, that I originally built for Windows but now I’m using Xamarin to make a cross-platform version that works on Windows, iOS and Android.  Having studied architecture in college, I have always loved the field.  Quite often, I start off with a rough sketch in my journal but that isn’t typically something that is interactive or in a state that can be shared with enough fidelity, so I use XD.

When I start it up, Adobe XD greets me with a blank canvas where I want to place artboards, one for each screen of my app. To place artboards on the canvas, I press the artboard button (the last icon on the left toolbar) – then I see options for various device form factors, including options for iOS, Android, Surface and Web.

To start, I pick a few screen sizes by tapping on Android Mobile, iPhone and Surface Pro 4 on in the property inspector on the right and blank artboards for each format are created on the design canvas.

To start my design I first focus on designing a map page which would show a map of the user’s current location and notable buildings nearby. I grab a screenshot of San Francisco in a folder on my PC and drag it onto each page, resizing it.  Once I place an image onto a page, any overflow is hidden once I deselect the image.  This is very helpful as I design multiple screen sizes in parallel.

Now I want to focus on one of the designs to add some more detail, in this case, the Android design on the left.  I navigate around the artboard by using the trackpad on my computer, panning with two fingers and zooming in and out on the trackpad by pinching and expanding gestures.  This is similar to the interaction method for XD on macOS.  In this initial preview of XD for Windows, touch and pen support are not enabled yet on the design canvas but they do work on the toolbar and in the property inspector. My team is working closely with the XD team to enable a great experience for pen and touch with Adobe XD that will be ready later in 2017.

I’ve started by adding three red boxes for architectural landmarks in San Francisco, and three boxes at the bottom that will work as buttons for UI interactions.  As I draw each button, XD puts snapping guidelines in to help me position the buttons relative to each other.  I ignore the guidelines to show that by selecting all three buttons and pressing the align bottom button at the top of the property inspector (the pane on the right), I can quickly align the buttons and set them all to have the same width and height in the property task pane.  I can then distribute the buttons horizontally using the hotkey Ctrl-Shift-H.  You can also distribute objects horizontally and vertically using the distribute icons in the property inspector.

I then use the text tool to add placeholder icons to the buttons, taking advantage of the Segoe MDL2 Assets Font (use the Character Map app that comes with Windows) for graphics for the Buildings, Locate Me, and Add buttons.  In a few minutes, I get my ideas out and start a first page of my Architecture app.  Now I want to add another page that would be used to browse a list of buildings by pressing the first button on the first page.  I add another Android mobile page by clicking on the artboard button and selecting a new Android mobile page.  A new artboard page is now placed on my design canvas right below the page I’m working on.  Since this page is for browsing a list of buildings, I start with a design of what each building in the list would look like.  I drag an image of a building from my desktop onto a square and it automatically resizes and crops the image to the square.

After finishing that first item design, I select all of the elements for the building and press the Repeat Grid button on the right and then drag the handle that appeared on the bottom of the rectangle to the bottom of the page, repeating the element.

While I’m dragging the repeat grid, I see the items building instantly and hints showing me the spacing between the items.  Once I look at the items together, it becomes clear that I don’t need the frame around the items and the spacing is a bit wide. All I need to do is select the prototypical items at the top of the list and edit the that item – the changes are replicated throughout the list. To change the spacing, I put my cursor between the items and the pink spacing guide appears. By dragging that, I change the spacing between the items and see the results instantly.

The last thing I want to do on this page is to use different images and text for each building in the list.  To do this, I just grab some images that I have in a folder on my PC and drop them on one of the images in the list.  I also have a text file with the names of the buildings that I drag onto the “Building Name” text.  I instantly have a list of items with unique text images and text, a perfect design for the Xamarin ImageCell element when I’m ready to code this.

Now that I have two related pages, I want to connect them so I have a prototype that starts on the map page and then shows the Buildings page when the user clicks on the Buildings button.  I do that in the Adobe XD Prototyping interface by pressing the Prototype button at the top of the window. I start by clicking on the Buildings button on the maps page and the button is highlighted in blue and a blue arrow appears on the right of the button.  All I do is drag and drop that arrow onto the Building page and a connection is made – I can set the transition type, easing type and duration – very easy.

To test that action, I press the desktop preview button (Play button) in the upper right of the application window and a new window with the map page pops up.  I can then press the Buildings button and see the transition as the app preview shows the Buildings page. I can also drag that preview page to another screen if I have an extended desktop and I can even make changes in the design view while the preview is running.  Once you are done with the design prototype, you can easily export the artboards as images that developers could use as starting points for app development.

As a last step, I exported the artboards as PNG images and opened them up in Visual Studio to start the process of laying out the Xaml for my app:

“Design at the Speed of Thought”

Adobe looked at making XD enable “design at the speed of thought” and through this short walk-through, I hope you get the idea that adding the app to your toolbox will help you design, prototype, test and refine your designs quickly and fluidly.

The Technology Behind Adobe XD

Working with Adobe to bring an app of this sophistication and quality will help other developers prepare for Windows 10. Through close collaboration on this app, we have taken much of the feedback from the Adobe developers to make the Universal Windows Platform even better.

Adobe XD on Windows is a UWP app using XAML, C++, JavaScript, and ANGLE striving for a best-in-class Windows UWP experience while sharing as much code as possible with their Mac version. As Adobe has a very high quality bar for app development, the app is testable through automated tests using the Adobe first released Adobe XD earlier this year on the Mac as a public preview and through that preview, Adobe got input that enabled them to make it the best app for designing user experiences.  That feedback went into making both the Mac and Windows versions of XD even better.  Interestingly, Adobe is taking advantage of some of the new functionality in the Windows Anniversary Edition to enable them to release Adobe XD through their Creative Cloud app (how you get Photoshop, Illustrator Lightroom and other creative apps today) instead of the Windows Store.

Help Shape Adobe XD on Windows

Now that you can start using Adobe XD on Windows, please try it and submit your feedback to Adobe through their UserVoice site and help shape the future of Adobe XD on Windows 10. This is just the beginning.

  • Read Adobe’s blog post about today’s release of Adobe XD on Windows 10.
  • Try the Adobe XD public preview (all you need is a Windows 10 PC running the Anniversary Edition and a free Adobe ID or Creative Cloud account).
  • Provide feedback to Adobe on any topic but we’re especially interested in understanding how would you want to use pen and touch in Adobe XD and how you would want to use the new Surface Dial? How would you use pen and touch simultaneously with Adobe XD?  What other apps  and services would you want Adobe XD to connect with? What kinds of extensibility would make Adobe XD even better for your designer-developer workflow?

Get started today with Adobe XD on Windows 10 with the public preview today.

Background Audio and Cross Platform Development with Xamarin (App Dev on Xbox series)

We are back with yet another app, Backdrop, an open source sample media app developed to showcase a cross-device music experience. In this blog post, we will dive deep into the new background model in the Universal Windows Platform, and specifically focus on how to enable your application to continue playing audio in the background  across Windows 10 devices, including Xbox One, delivering a stellar customer experience. In addition, we will show you how we built Backdrop to be a cross platform application by using Xamarin to share code between Windows 10 and AppleTV. The source code for the application is available on GitHub right now so make sure to check it out.

If you missed the previous blog post from last week on Unity interop and app extensibility, make sure to check it out. We covered how to get started building great 2D and 3D experiences with Unity and XAML as well as how to make your apps work great with other apps on the platform. To read the other blog posts and watch the recordings from the App Dev on Xbox live event that started it all, visit the App Dev on Xbox landing page.

Backdrop

image1

Figure 1. Xbox One view

Backdrop is a sample music application that lets a group of friends collaborate on the music selection process and share their experience and music choices. A device is first chosen to be the host device where the music will be played. Then anyone is able to add and vote on tracks on their own device. Each friend can see the current playlist in real time and the progress of the current track on their own device. Each can vote on different tracks to set the order in which they will be played as well as suggest other tracks to be played.

The application has been written for the Universal Windows Platform (UWP) and tvOS by using Xamarin to share the majority of business logic, view models, playlist management, cloud and device communication. The UI, in turn, is written using the native controls and affordances of each platform. Using the shared project, additional platforms such as Android and iOS can easily be added.

image2

Figure 2. architectural diagram

Background audio

With the Windows Anniversary Update, a new single process model for playing background audio was introduced to simplify UWP development. Using MediaPlayer or MediaPlayerElement with the new model should make implementing background audio much easier than it was before.

Previously, your app was required to manage a background process in addition to your foreground app and then manually communicate state changes between the two processes. Under the new model, you simply add the background audio capability to your app manifest and your app will automatically continue playing audio when it moves to the background. You will use the two new application life cycle events, EnteredBackground and LeavingBackground, to find out when your app is entering and leaving the background.

Background audio in Backdrop

image3

Figure 3. Playing audio in background and System Media Transport Controls on Xbox One

Here is the step-by-step process for implementing background audio:

  • Add the Background Media Playback capability to your app manifest.
  • If your app disables the automatic integration of MediaPlayer with the System Media Transport Controls (SMTC), such as by setting the IsEnabled property to false, then you must implement manual integration with the SMTC in order to enable background media playback. You must also manually integrate with SMTC if you are using an API other than MediaPlayer, such as AudioGraph, to play audio if you want to have the audio continue to play when your app moves to the background.
  • While your app is in the background, you must stay under the memory usage limits set by the system for background apps.

Modifying the app manifest

To enable background audio, you must add the background media playback capability to the app manifest file, Package.appxmanifest. You can modify the app manifest file either by using the designer or manually.

To do this through the Microsoft Visual Studio designer, in Solution Explorer, open the designer for the application manifest by double-clicking the package.appxmanifest item.

  1. Select the Capabilities
  2. Select the Background Media Playback check box.

To set the capability by manually editing the app manifest xml, first make sure that the uap3 namespace prefix is defined in the Package element. If not, add it as shown below. [see code on GitHub]


&amp;lt;Package xmlns=&amp;quot;http://schemas.microsoft.com/appx/manifest/foundation/windows10&amp;quot; 
         xmlns:mp=&amp;quot;http://schemas.microsoft.com/appx/2014/phone/manifest&amp;quot; 
         xmlns:uap=&amp;quot;http://schemas.microsoft.com/appx/manifest/uap/windows10&amp;quot; 
         xmlns:uap3=&amp;quot;http://schemas.microsoft.com/appx/manifest/uap/windows10/3&amp;quot; 
         IgnorableNamespaces=&amp;quot;uap mp uap3&amp;quot;
         &amp;gt;

Then add the backgroundMediaPlayback capability to the Capabilities element:


  &amp;lt;Capabilities&amp;gt;
    &amp;lt;Capability Name=&amp;quot;internetClient&amp;quot; /&amp;gt;
    &amp;lt;uap3:Capability Name=&amp;quot;backgroundMediaPlayback&amp;quot; /&amp;gt;
  &amp;lt;/Capabilities&amp;gt;

System Media Transport Controls

image4

Figure 4. System Media Transport Controls on mobile

The Backdrop client uses a MediaPlayer to play audio in the PlaybackService class [see code on GitHub].


        public PlaybackService()
        {
            // Create the player instance
            _player = new MediaPlayer();
            _player.PlaybackSession.PositionChanged += PlaybackSession_PositionChanged;
            _player.PlaybackSession.PlaybackStateChanged += PlaybackSession_PlaybackStateChanged;

            _playlist = new MediaPlaybackList();
            _playlist.CurrentItemChanged += _playlist_CurrentItemChanged;
            _player.Source = _playlist;
            _player.Play();

            Dispatcher = new DispatcherWrapper(CoreApplication.MainView.CoreWindow.Dispatcher);

When using a MediaPlayer, it is necessary to implement MediaTransportControls. The media transport controls let users interact with their media by providing a default playback experience comprised of various buttons including play, pause, closed captions and others.

When adding audio tracks to the player, you also need to create a MediaPlaybackItem from the audio source and set its display properties in order to play it. Here is the code from Backdrop [see code on GitHub]:


    var source = MediaSource.CreateFromUri(new Uri(song.StreamUrl));

    var playbackItem = new MediaPlaybackItem(source);
    var displayProperties = playbackItem.GetDisplayProperties();
    displayProperties.Type = Windows.Media.MediaPlaybackType.Music;
    displayProperties.MusicProperties.Title = song.Title;
    displayProperties.MusicProperties.Artist = song.Artist;
    displayProperties.Thumbnail = RandomAccessStreamReference.CreateFromUri(new Uri(song.AlbumArt));

    playbackItem.ApplyDisplayProperties(displayProperties);

You can also override the default SMTC controls and even use manual control if you are using your own media playback. MediaTransportControls is ultimately just a composite control made up of several other XAML controls, which are all contained within a root Grid element. Because of this, you can re-template the control to change its appearance and functionality. For more info, see Create custom transport controls and the Media transport controls sample.

Managing resources in background

When your app moves from the foreground to the background, the EnteredBackground event is raised. And when your app returns to the foreground, the LeavingBackground event is raised. Because these are app life cycle events, you should register handlers for these events when your app is created. In the default project template, this means adding it to the App class constructor in App.xaml.cs.

Because running in the background will reduce the memory resources your app is allowed to retain by the system, you should also register for the AppMemoryUsageIncreased and AppMemoryUsageLimitChanging events, which will be used to check your app’s current memory usage and the current limit. The handlers for these events are shown in the following examples. For more information about the application lifecycle for UWP apps, see App life cycle. You can see the code from Backdrop here [see code on GitHub]:


private void App_LeavingBackground(object sender, LeavingBackgroundEventArgs e)
        {
            _isInBackgroundMode = false;

            // Reastore view content if it was previously unloaded.
            if (Window.Current.Content == null)
            {
                CreateRootFrame(ApplicationExecutionState.Running, string.Empty);
            }
        }

        private void App_EnteredBackground(object sender, EnteredBackgroundEventArgs e)
        {
            _isInBackgroundMode = true;
            ReduceMemoryUsage(0);
        }

When your app transitions to the background, the memory limit for the app is reduced by the system in order to ensure that the current foreground app has sufficient resources to provide a responsive user experience. The AppMemoryUsageLimitChanging event handler lets your app know that its allotted memory has been reduced and provides the new limit in the event args passed into the handler. [see code on GitHub]


        private void MemoryManager_AppMemoryUsageIncreased(object sender, object e)
        {
            var level = MemoryManager.AppMemoryUsageLevel;

            if (level == AppMemoryUsageLevel.OverLimit || level == AppMemoryUsageLevel.High)
            {
                ReduceMemoryUsage(MemoryManager.AppMemoryUsageLimit);
            }
        }

        private void MemoryManager_AppMemoryUsageLimitChanging(object sender, AppMemoryUsageLimitChangingEventArgs e)
        {
            if (MemoryManager.AppMemoryUsage &amp;gt;= e.NewLimit)
            {
                ReduceMemoryUsage(e.NewLimit);
            }
        }

Xamarin

Xamarin is a free Microsoft tool that allows developers to write fully native Android and iOS apps using C# and programming models already familiar to .NET developers. With Xamarin, you can build native Android and iOS apps without needing to know Java or Objective-C and best of all it is included with all editions of Visual Studio 2015. For Android development, Visual Studio has one of the most performant Android emulators built in so you can test your Xamarin.Android apps from your Windows development environment. For iOS development, Xamarin provides a remote iOS simulator for Visual Studio to test your applications without having to switch to a Mac. It even supports touch and multi-touch; something that is missing from testing iOS apps on the iOS simulator on a Mac. You will still need to connect to a physical Mac in order to build the application, but the entire development process is completely done in Visual Studio, including editing storyboards.

Apps built using Xamarin compile to native code on their respective platforms. Xamarin wraps low level native APIs so you are able to access sensors and other platform specific features. Xamarin.iOS projects compile to .app files that can be deployed to Apple mobile devices. Xamarin.Android projects compile to .apk files, the application package used for deploying to Android devices.

image5

Because Xamarin lets you use Visual Studio projects to organize your Xamarin.Android and Xamarin.iOS code, you can include different platform versions of your app side-by-side under a common solution. When you do this, it is important to clearly separate your UI code from your business layer code. It is also important to separate out any code you intend to share between platforms from code that is platform-specific.

Sharing code with Xamarin

Xamarin provides two ways of sharing business layer code between your cross-platform projects. You can use either a Shared Project or a Portable Class Library (PCL). Each has its advantages and disadvantages.

A Shared Project is generally the easier way to create common code. The .cs files in a Shared Project simply get included as part of any project that references it. On build, the Shared Project is not compiled into a DLL. Instead, the Shared Project’s code files are compiled into the output for the referencing project. Shared Projects become tricky when they include platform specific code. You will need to use conditional compilation directives like #if and #endif in these situations to test for the appropriate compiler version.

Unlike Shared Projects, Portable Class Library projects are compiled into DLLs. You decide which platforms your PCL can run on by setting its Profile identifier. For instance, you might have your PCL target all of the following: .NET Framework 4.5, ASP.NET Core 1.0, Xamarin.Android, Xamarin.iOS and Windows 8. PCLs use conditional compilation directives in order to fork platform specific code. Instead, you may want to use a Dependency Injection pattern with multiple PCLs for this.

The Backdrop reference app uses a PCL for sharing common code between a UWP app, a tvOS app for the Apple TV, and music_appService—a RESTful web service consumed by both.

image6

Building the UI

Each platform needs to have its own UI project. You can choose, however, to share common visual elements using the Xamarin.Forms cross-platform UI library, or create custom UIs for each platform. Both options will create fully-native UIs that will be completely familiar to end-users, but Xamarin.Forms is more restrictive. Developers seeking the greatest amount of code-sharing and efficiency will gravitate toward Xamarin.Forms, while those who require a more granular level of control should choose Xamarin.Android and Xamarin.iOS for a custom UI. The Backdrop reference app uses custom UIs.

You are probably already familiar with how to create a native UWP UI, either in Xaml or with the Visual Studio designer. You will be glad to learn that Visual Studio comes with a Xamarin Designer for iOS that provides a similarly easy way for you to work with native iOS controls. The iOS Designer maintains full compatibility with the Storyboard and .xib formats, so that files can be edited in either Visual Studio or Xcode’s Interface Builder.

image7

Wrap up

Adding other platforms is straightforward and can be an exercise for the reader. We implemented tvOS and UWP apps, but the same shared code can be used in iOS and Android projects just as easily. The cross-platform architecture demonstrated in the Backdrop source code provides a great way to achieve the greatest reach with a single, maintainable cross-platform code base. It also shows us how the cross-platform story for UWP and the cross-platform story for Xamarin actually dovetail to create apps with much greater reach than we have ever seen before. Consider that Backdrop’s architectural design ultimately allows friends on an android phone, an iPhone, a Windows 10 phone, Apple TV and Xbox One to all work together on a common music playlist. How’s that for a build-once solution?

Until next time…

…check out the app source on our official GitHub repository, read through some of the resources provided, watch the event if you missed it, and let us know what you think through the comments below or on twitter.

Next week we will release another app experience and go in-depth on how to build hosted web experiences that take advantage of native platform functionality and different input modalities across UWP and other native platforms.

Until then, happy coding!

Resources

In the meantime, below are some additional resources to help you understand background audio as well as the architectural underpinnings of modern cross-platform apps build with Xamarin.

Download Visual Studio to get started!

The Windows team would love to hear your feedback.  Please keep the feedback coming using our Windows Developer UserVoice site. If you have a direct bug, please use the Windows Feedback tool built directly into Windows 10.

The future of mobile app development

It is incredible how much has happened since Xamarin joined Microsoft just over a month ago, starting with Scott Guthrie’s Build 2016 announcements that Xamarin is now part of all editions of Visual Studio at no additional charge — from Community to Enterprise — and our plans to open source the Xamarin SDK. It is a dream come true for us to be able to put the power of Xamarin into the hands of all developers.

In just the first two weeks since Build alone, we helped nearly 3.5 times more developers get started building great apps with Xamarin than ever in our history as a company.

Now we are at Xamarin Evolve 2016, the world’s largest cross-platform mobile development conference, in Orlando. This morning we open sourced the Xamarin SDK and launched new ways to make Visual Studio the most complete mobile development environment.  We also launched new ways to build native, cross-platform apps faster than ever using our popular cross-platform UI framework, Xamarin.Forms.

This is our third Evolve conference, but the first time we are showing the comprehensive developer experience that only Microsoft and Xamarin together can deliver.

Open source Xamarin: Ready for you!

We have officially open sourced and contributed to the .NET Foundation the Xamarin SDK for Android, iOS and Mac under the same MIT license used for the Mono project. This includes native API bindings for iOS, Android and Mac, the command-line tools necessary to build for these platforms, and Xamarin.Forms, our popular cross-platform UI framework.

Watching Xamarin co-founder and open source pioneer Miguel de Icaza announce this onstage was a proud moment for all of us. The future of native cross-platform mobile development is now in the hands of every developer. We look forward to seeing your contributions; go to open.xamarin.com to get involved.

Visual Studio: Your complete mobile development environment

Today we launched new ways to connect Visual Studio to your Mac to make it even easier for C# developers to create native iOS apps, and new ways to auto-generate mobile app test scripts in Visual Studio.

Our iOS Simulator remoting lets you simulate and interact with your iOS apps in Visual Studio — even supporting multi-touch interactions on Windows machines with capable touch screens. We also unveiled our iOS USB remoting, which makes it possible to deploy and debug apps from Visual Studio to an iPad or iPhone plugged into your Windows PC.

In addition, our Test Recorder Visual Studio Plugin now brings Test Recorder’s ability to generate test scripts to Visual Studio users. Simply interact with your app on device or in the simulator and Test Recorder automatically generates scripts that can be run on thousands of devices with Xamarin Test Clouds automated app testing.

Xamarin.Forms: Faster and easier mobile app development

We launched Xamarin.Forms a few years ago to help developers build mobile apps faster, maximizing UI code-sharing while still delivering fully native experiences.

Today, we showed three key new features that will be coming to Xamarin.Forms.  Data Pages and Themes make it easy to connect apps to common entities and data sources, and create beautiful, native user interfaces with just a few lines of code. The Forms Previewer makes it easy to iterate on your Xamarin.Forms UI designs by providing real-time previewing of Xamarin.Forms user interfaces composed in XAML.

The new, mobile-optimized development lifecycle

We were able to show today the most streamlined mobile lifecycle available anywhere through our combined product lineup, including integrations between Visual Studio Team Services, HockeyApp and Xamarin Test Cloud. Through our combined mobile lifecycle solution, you now have a complete solution to build great mobile apps at scale, tackling the unique challenges of mobile DevOps.

Blog Graphic-2

We’ve heard great enthusiasm from our customers.  Bryan Hooper, senior director enterprise architecture at Bloomin’ Brands, talked about how they have “paired Xamarin with Microsoft’s Azure technology, and we’re really excited about the new partnership between the two organizations.”   Darrell Thompson, vice president of information system services at Coca-Cola Consolidated, says that “Xamarin and Microsoft have been excellent partners and brought our mobile development to a whole new level.”

Learn more

To dive deeper into the Evolve announcements, visit the Xamarin blog, and watch the Xamarin Evolve 2016 live stream throughout today and tomorrow. Don’t miss the closing session with Steve Wozniak and Miguel de Icaza sharing their perspectives on the future of apps and software development (4:00 p.m. EST).

If we’re able to deliver all of this for you in just six weeks, imagine what you’ll be able to do in six months with Xamarin and Microsoft!

The post The future of mobile app development appeared first on The Official Microsoft Blog.

Build 2016: Announcing tomorrow’s cloud innovations for today’s developers

Every business and industry is being transformed by the cloud – and as cloud speed, scale and agility continue to increase, so too does what’s possible using cloud services. Imagine a dairy farmer who can improve his cows’ milk production by hooking them up to monitoring sensors. Or a hospital that can auto-monitor hygiene practices to make it a safer place. Or a car that can alert you to traffic and save you hassle on the way to work. All this is happening today, thanks to exponentially increasing amounts of data, and new ways to analyze this data for better business insights and connect it to a growing number of devices.

But helping businesses evolve to the next generation of cloud computing isn’t easy on developers. The pressure to innovate faster falls squarely on their shoulders, tasking them with building applications that can process and analyze data at cloud speed, while targeting any device or platform. Today at Build, our message is simple: We’re here to take the pressure off. With unparalleled scale via 30 worldwide regions, Microsoft Azure is the best environment for developers to easily build intelligent applications – across any device or OS.

Today, we made targeting every device and platform a lot easier by making Xamarin available to every Visual Studio developer for free, including the free Visual Studio Community Edition. We are also making available a free Xamarin Studio Community Edition for OS X. Developers worldwide can now easily create apps using an end-to-end mobile development solution – joining companies like Slack, Pinterest, Alaska Airlines and more. To enable even more choice and flexibility for developers, we announced a commitment to open source Xamarin’s runtime, libraries and command line tools as part of the .NET Foundation. Both the Xamarin SDK and Mono will be available under the MIT License.

Xamarin capabilities and services will also be added to Microsoft DevOps and Enterprise development tools offerings, providing a comprehensive solution that spans every phase of the mobile development cycle.

With the combination of Xamarin and Azure App Service for rich mobile backends, Microsoft is helping developers embrace the next generation of app development – but it’s only one piece of the puzzle. Developers also need to take advantage of the data explosion to build more intelligent, predictive apps, while ensuring those apps stay connected across a growing number of devices. Today, we announced several new innovations to help.

First, we announced a preview of Azure Functions, extending Azure’s market-leading application platform with new serverless compute for event-driven solutions. Functions lets developers easily handle on-demand tasks that respond to events, common in Web and mobile applications, IoT and big data scenarios. Working across Azure and third-party services, it enables developers to write functions in a variety of languages, such as JavaScript, C#, Python and PHP, with the ability to automatically scale out to meet demand, only charging for the time a function runs. And with an open source runtime, developers will be able run Functions anywhere – on Azure, in their datacenters or on other clouds –taking flexibility and choice a step further.

We also announced easier ways for developers to embrace the Internet of Things to connect data and devices for greater innovation. For example, we now have Azure IoT Starter Kits available for purchase. With development boards, actuators, sensors and easy user-friendly tutorials, now anyone with Windows or Linux experience – whether a student, inventor, device maker, hobbyist or developer – can quickly build IoT prototypes inexpensively. Once a prototype is ready for full-scale deployment, these users can leverage all of Azure’s comprehensive IoT offerings already on the market. In addition, we announced the Azure IoT Gateway SDK, along with device management in Azure IoT Hub – further easing the path to IoT by connecting legacy devices and sensors to the Internet without having to replace existing infrastructure, and managing these devices at scale via a standards-based approach. Using Azure IoT technology, customers like Schneider Electric have connected more than 3 million devices this year alone, transforming them from a traditional electric company to a modern, connected, global leader in sustainable energy management.

Connecting devices and data through IoT is critical for developers – but so is ingesting, storing, processing and analyzing that data. To help developers help their customers get insights from data we announced a preview of Power BI Embedded, which allows developers to embed fully interactive reports and visualizations in any customer-facing application, on any device.  Customers can choose from a broad range of Power BI data visualizations that come out of the box, or easily build custom visualizations for their unique applications. To help developers scale it all while maximizing choice and flexibility, we also announced today that applications can now communicate with the scalable NoSQL service DocumentDB, using existing Apache License MongoDB APIs and drivers. This extends the reach of DocumentDB, a proven service that enables companies like NextGames, makers of the multi-player Walking Dead video game run on Azure, to handle 75 billion requests per day.

Helping developers embrace new app models in a cloud-first world is a priority, especially with the growing demand to build highly scalable apps that are always-on and agile. In a 24×7 world, businesses cannot afford to have apps down for maintenance. Increasingly, developers are turning to microservices, independent components that work together to deliver an application’s overall functionality, to help address these business requirements.

Today we announced the general availability of Azure Service Fabric, our microservices application platform, to help developers design apps and services with always-on availability and scale. This battle-tested platform has been used for years as the foundation for Microsoft cloud services like Azure SQL Database, Azure Document DB, Cortana and Skype for Business. Features like automated health-based upgrades and rollbacks, support for stateful and stateless microservices, and deep Visual Studio integration make Service Fabric a compelling choice. We also announced previews of Service Fabric for Windows Server, for deploying on-premises and on other clouds, and Service Fabric for Linux and Java APIs – extending scale, availability and agility to developers everywhere.

From intelligent data and machine learning advancements, to IOT innovations and microservices offerings, Microsoft is helping developers build applications for the cloud realities of today, and the cloud evolution of tomorrow. We’re in a unique position to do this, as the only cloud provider that supports every organization and developer – from core infrastructure services, to platform services and tools, to SaaS – with the flexibility to build and run apps in any language across any platform. Today at Build, I am humbled to have the opportunity to share our innovations with developers – and hear firsthand their feedback so we can continually shape, deliver and improve the offerings that will make them more productive and successful. Together with our customers, we’re building the next generation of the cloud to achieve more.

The post Build 2016: Announcing tomorrow’s cloud innovations for today’s developers appeared first on The Official Microsoft Blog.

Windows 10 Anniversary SDK is bringing exciting opportunities to developers

Hello from Build 2016! I just had an opportunity to participate in today’s keynote with Satya Nadella and Terry Myerson where we celebrated the progress we have made with Windows 10, gave a preview of the Windows 10 Anniversary Update, and talked about how we are continuing to invest in the Windows Platform to make it home for all developers. Terry’s blog summarizes many of today’s announcements, but in this post I want to share a few of the highlights for developers.

Throughout the year, I have heard from many of you, both in person and via our various feedback channels, and you have asked us for more. We know that every innovation with Windows is only as powerful as the ecosystem that rallies around it, so I want to cover today’s most important Build announcements and what they mean for our development community.

The Windows 10 Anniversary SDK

Today we are taking the first step with the announcement of the preview of the Windows 10 Anniversary SDK. It contains thousands of new features and APIs that are the direct result of your feedback.

Here are just a few of the significant improvements that we are excited about but didn’t have time to cover in the keynote:

  • Connected Devices: We are bringing new ways to connect to, communicate with, and manage multiple devices and apps. This technology enables Cortana extensibility and the new Action Center in the Cloud, and it’s being introduced today.
  • Background execution: We are bringing the ability to run your application in the background without requiring two separate processes. Along with extended execution and opportunistic tasks, writing applications that run when they need to will become simpler and more powerful.
  • App Extensions:   UWP now supports app extensibility allowing you to build an ecosystem based on your application. Microsoft Edge uses this technology for its own extensions.
  • Action Center in the Cloud: Enables your app to engage with users on all their devices. You can now dismiss notifications on one device and they will be dismissed everywhere.
  • Windows Store & Dev Center: Significate new tools include user roles in Dev Center, app flighting, improved analytics, an analytics API that allows you to grab your data and use it outside of the dashboard, user segmentation and targeting, A/B testing, app subscriptions, advertising improvements, and more.

Here at Build, we will talk about these and much more during more than one hundred technical sessions, all of which will be available for you to view on Channel 9 over the next several days.

Pioneers wanted: NUI Innovations coming to UWP

With the Universal Windows Platform, we have been creating new ways of interacting with our devices that go beyond touch and mouse to include vision, writing, speech, and more. It’s more than just the inputs and outputs; it’s about creating experiences that transcend a single device and enabling developers to orchestrate experiences across devices.

At today’s keynote we gave a detailed overview of some of the new innovations that are coming to Windows 10 in the Anniversary Update SDK:

  • Windows Ink APIs: Together we will unlock new natural ways of interacting with our apps with Windows Ink. Just two lines of code enable you to bring the “Hello World” of Windows Ink into your apps through the InkCanvas and new InkToolbar controls. One level down, the InkPresenter provides a powerful and flexible way to extend the InkToolbar and to create customize ink experiences. In all cases, the platform provides beautiful low-latency ink rendering, handwriting recognition, and ink data management.
  • Windows Hello: You can already use Windows Hello and biometric authentication to make your apps easier to access and more secure with Windows Passport. If you are web developer, you can now bring that same Windows Hello experience to your websites with JavaScript APIs in Microsoft Edge.
  • Cortana APIs: Nearly 1,000 apps are already using voice commands with Cortana. Now Cortana allows you to go further and integrate proactive actions with your apps. As a developer, you can drive increased user engagement by registering actions with Cortana that she will use to connect users to your apps at just the right time. Check out the new Cortana portal where you can request access to the beta.
  • Microsoft HoloLens Development Edition begins shipping: The Windows Holographic SDK and emulator are now available for download and Microsoft HoloLens Development Edition is starting to ship to developers.  These will enable you to create holographic apps using UWP.  Our documentation and forums are up and running. We’re also happy to share a number of open source projects, HoloToolkit, HoloToolkit-Unity, and Galaxy Explorer, which will accelerate your development of holographic apps, and give you an opportunity to contribute back to help others building on the platform. Developers can now bring existing UWP apps to HoloLens where they will work on 2D surfaces within the virtual world.

Windows is pioneering a change in how people will use technology: will you join?

Listening to your needs, embracing tools for multi-platform development on Windows.

We want Windows to be the best development environment regardless of the technologies you use or the platforms you target. We made cross-device a reality at the core of the Universal Windows Platform, and we are excited to offer more:

  • Converting Desktop Apps (Project Centennial): We are shipping a new desktop app converter which will enable your Win32 and .NET apps to get access to UWP and the Windows Store. With the new installer technology, your app can cleanly install, uninstall, and update, and also get full access to UWP APIs including Live Tiles, Cortana, notifications, and more.
  • Bash is coming to Windows: For users of popular command-line tools, Windows 10 now has great support for Bash running on Ubuntu as part of our partnership with Canonical, and growing support for the universe of open-source command-line tools. Developers will be able to download the Bash shell from the Windows Store.
  • Xamarin: will make it easy to share code across platforms while delivering native experiences for each. Also, our open source Windows Bridge for iOS enables iOS developers to bring Objective-C code into Visual Studio, and compile it into a UWP app.
  • Retail Dev Kit Unlock for Xbox One: Today we are releasing the Retail Dev Kit Unlock for Xbox One which enables any Xbox One to be a developer kit with Xbox Dev Mode. Now anyone can develop UWP apps and deploy them to an Xbox One. Your apps can be tailored for the larger viewing distance and screen size of the living room and for Game Controller input, and you can test these optimizations on your own Xbox.

You asked us to help you in be more productive, and we listened. We will continue to invest in making Windows home for developers, regardless of which platform you build for.

Stay tuned to this blog over the course of the next week to view a series of in-depth posts that will go into details of some of the topics that I discussed here (Cortana, Windows Ink, Windows Store & Dev Center, Bash, and more).

Get involved.

What a difference a year makes. Last year at Build we were showing what would be possible in Windows 10, and today we celebrate more than 270 million devices on the platform!

Build is just the next step in this journey, but now is the time to get involved. Start developing on the Windows 10 Anniversary Update. To do so, install the latest Windows 10 for Insiders, update to Visual Studio 2015 Update 2, and then install the Windows 10 Anniversary SDK Preview Build 14295.

I cannot wait to celebrate our shared success next year at Build 2017.

– Kevin