Tag Archives: PC

This Week on Windows: Remix 3D, Minecraft and more

We hope you enjoyed today’s episode of This Week on Windows! Head over here to catch up on our latest programs and deals for back to school, read our Windows 10 Tip on how to use Surface Dial with Paint 3D – or, keep reading for what’s new in the Windows Store.

In case you missed it:

<!–
!function(a,b){“use strict”;function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf(“MSIE 10”),h=!!navigator.userAgent.match(/Trident.*rv:11./),i=b.querySelectorAll(“iframe.wp-embedded-content”);for(c=0;c<i.length;c++){if(d=i[c],!d.getAttribute(“data-secret”))f=Math.random().toString(36).substr(2,10),d.src+=”#?secret=”+f,d.setAttribute(“data-secret”,f);if(g||h)a=d.cloneNode(!0),a.removeAttribute(“security”),d.parentNode.replaceChild(a,d)}}}var d=!1,e=!1;if(b.querySelector)if(a.addEventListener)d=!0;if(a.wp=a.wp||{},!a.wp.receiveEmbedMessage)if(a.wp.receiveEmbedMessage=function(c){var d=c.data;if(d.secret||d.message||d.value)if(!/[^a-zA-Z0-9]/.test(d.secret)){var e,f,g,h,i,j=b.querySelectorAll(‘iframe[data-secret=”‘+d.secret+'”]’),k=b.querySelectorAll(‘blockquote[data-secret=”‘+d.secret+'”]’);for(e=0;e<k.length;e++)k[e].style.display=”none”;for(e=0;e1e3)g=1e3;else if(~~g<!]]>

<!–
!function(a,b){“use strict”;function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf(“MSIE 10”),h=!!navigator.userAgent.match(/Trident.*rv:11./),i=b.querySelectorAll(“iframe.wp-embedded-content”);for(c=0;c<i.length;c++){if(d=i[c],!d.getAttribute(“data-secret”))f=Math.random().toString(36).substr(2,10),d.src+=”#?secret=”+f,d.setAttribute(“data-secret”,f);if(g||h)a=d.cloneNode(!0),a.removeAttribute(“security”),d.parentNode.replaceChild(a,d)}}}var d=!1,e=!1;if(b.querySelector)if(a.addEventListener)d=!0;if(a.wp=a.wp||{},!a.wp.receiveEmbedMessage)if(a.wp.receiveEmbedMessage=function(c){var d=c.data;if(d.secret||d.message||d.value)if(!/[^a-zA-Z0-9]/.test(d.secret)){var e,f,g,h,i,j=b.querySelectorAll(‘iframe[data-secret=”‘+d.secret+'”]’),k=b.querySelectorAll(‘blockquote[data-secret=”‘+d.secret+'”]’);for(e=0;e<k.length;e++)k[e].style.display=”none”;for(e=0;e1e3)g=1e3;else if(~~g<!]]>

See your 3D creations take life with the newest update to Remix 3D

Here’s what’s new in the Windows Store this week:

The Better Together Beta for Minecraft is here!

The Better Together Beta for Minecraft is here!

If you’re on a Windows 10 PC, your world expands to being able to play with friends across devices. The Better Together Update we announced at E3 2017 is designed to unify the console, mobile and Windows 10 PC versions of the game under one single Minecraft edition, which will include infinite worlds, the community Marketplace and community servers (which are coming to the beta later on!). It’ll introduce cross-platform support, allowing console, Windows 10 PC and mobile Minecrafters to play together for the first time! Who can participate? Players on Windows 10 PC, Android and soon Xbox One are welcome to jump into cross-platform play with other beta testers across all three devices. For the full announcement, head over to Minecraft.net!

Build the Car of Your Dreams in the Forza Motorsport 7 Garage

Forza

Welcome to week three of the Forza Motorsport 7 Garage, our weekly look at the 700+ cars coming to the game at launch. This week, in addition to announcing a massive collection of Japanese vehicles – 77 in total – we’re also turning the spotlight on the body customization options available to players in Forza Motorsport 7. For the first time in the Forza Motorsport series, we’re bringing wide-body kits to a number of cars in Forza Motorsport 7. In addition, numerous body-kit options from Forza Horizon 3 will also be available in Forza Motorsport 7, including Upgrade Heroes like the Nissan S14 and the 240SX SE announced today. Wheel options will be abundant in Forza Motorsport 7. In addition to bringing over a number of the new-entry wheels from Forza Horizon 3, we’re adding a selection of new race-inspired. Read more over at Xbox Wire!

Alien: Covenant

Alien

While on a colonizing mission in a distant corner of the galaxy, the ship Covenant stumbles upon a planet that appears to be an undiscovered paradise…but is actually home to something more terrifying than they ever could have imagined. Watch Alien: Covenant ($19.99 HD, $17.99 SD), now available in the Movies & TV section of the Windows Store two weeks before it comes to Blu-ray. For a limited time, win fun swag courtesy of #AlienCovenant! Learn more here.

New Minecraft Marketplace Content!

Minecraft marketplace

Today, we’re releasing even more new content created by our Marketplace partners Noxcrew, Eneija, Razzleberry Fox and Jigarbov: Infinity Dungeon EX map, Summer Festival Skin Pack, Survivors Skin Pack, Kings and Paupers Skin Pack, and the Sports Skin Pack! Anyone on Bedrock Engine platforms can download the new content for now (Windows 10 & mobile devices), but we’re bringing Xbox One and Nintendo Switch into the Bedrock ecosystem soon. To learn more, head over to Minecraft.net!

Have a great weekend!

Configure your app to start at log-in

For a long time, desktop PC users have been able to configure Win32 apps to start at startup or user log-in. This has also been possible for Desktop Bridge apps since the Windows 10 Anniversary Update (v10.0.14393.0). We’ve now extended this feature to allow regular Universal Windows Apps to take part in this also. This is available in Insider builds from Build 16226 onwards, along with the corresponding SDK. In this post, we’ll look at the code changes you need to make in your manifest and in your App class to handle the startup scenario, and how your app can work with the user to respect their choices.

Here’s a sample app, called TestStartup – the app offers a button to request enabling the startup behavior, and reports current status. Typically, you’d put this kind of option into a settings page of some kind in your app.

The first thing to note is that you must use the windows.startupTask Extension in your app manifest under the Extensions node, which is a child of the Application node. This is documented here. The same Extension declaration is used for both Desktop Bridge and regular UWP apps – but there are some differences.

  • Desktop Bridge is only available on Desktop, so it uses a Desktop-specific XML namespace. The new UWP implementation is designed for use generally on UWP, so it uses a general UAP namespace (contract version 5) – although to be clear, it is currently still only actually available on Desktop.
  • The Desktop Bridge EntryPoint must be “Windows.FullTrustApplication,” whereas for regular UWP it is the fully-qualified namespace name of your App class.
  • Desktop Bridge apps can set the Enabled attribute to true, which means that the app will start at startup without the user having to manually enable it. Conversely, for regular UWP apps this attribute is ignored, and the feature is implicitly set to “disabled.” Instead, the user must first launch the app, and the app must request to be enabled for startup activation.
  • For Desktop Bridge apps, multiple startupTask Extensions are permitted, each one can use a different Executable. Conversely, for regular UWP apps, you would have only one Executable and one startupTask Extension.
Desktop Bridge App UWP App

xmlns:desktop=&amp;quot;http://schemas.microsoft.com/
appx/manifest/desktop/windows10&amp;quot;


xmlns:uap5=&amp;quot;http://schemas.microsoft.com/
appx/manifest/uap/windows10/5&amp;quot;


&amp;lt;desktop:Extension
  Category=&amp;quot;windows.startupTask&amp;quot;
  Executable=&amp;quot;MyDesktopBridgeApp.exe&amp;quot;
  EntryPoint=&amp;quot;Windows.FullTrustApplication&amp;quot;&amp;gt;
  &amp;lt;desktop:StartupTask
    TaskId=&amp;quot;MyStartupId&amp;quot;
    Enabled=&amp;quot;false&amp;quot;
    DisplayName=&amp;quot;Lorem Ipsum&amp;quot; /&amp;gt;
&amp;lt;/desktop:Extension&amp;gt;


&amp;lt;uap5:Extension
  Category=&amp;quot;windows.startupTask&amp;quot;
  Executable=&amp;quot;TestStartup.exe&amp;quot;
  EntryPoint=&amp;quot;TestStartup.App&amp;quot;&amp;gt;
  &amp;lt;uap5:StartupTask
    TaskId=&amp;quot;MyStartupId&amp;quot;
    Enabled=&amp;quot;false&amp;quot;
    DisplayName=&amp;quot;Lorem Ipsum&amp;quot; /&amp;gt;
&amp;lt;/uap5:Extension&amp;gt;

For both Desktop Bridge apps and regular UWP apps, the user is always in control, and can change the Enabled state of your startup app at any time via the Startup tab in Task Manager:

Also for both app types, the app must be launched at least once before the user can change the Disabled/Enabled state. This is potentially slightly confusing: if the user doesn’t launch the app and then tries to change the state to Enabled in Task Manager, this will seem to be set. However, if they then close Task Manager and re-open it, they will see that the state is still Disabled. What’s happening here is that Task Manager is correctly persisting the user’s choice of the Enabled state – but this won’t actually allow the app to be activated at startup unless and until the app is launched at least once first – hence the reason it is reported as Disabled.

In your UWP code, you can request to be enabled for startup. To do this, use the StartupTask.GetAsync method to initialize a StartupTask object (documented here) – passing in the TaskId you specified in the manifest – and then call the RequestEnableAsync method. In the test app, we’re doing this in the Click handler for the button. The return value from the request is the new (possibly unchanged) StartupTaskState.


async private void requestButton_Click(object sender, RoutedEventArgs e)
{
    StartupTask startupTask = await StartupTask.GetAsync(&amp;quot;MyStartupId&amp;quot;);
    switch (startupTask.State)
    {
        case StartupTaskState.Disabled:
            // Task is disabled but can be enabled.
            StartupTaskState newState = await startupTask.RequestEnableAsync();
            Debug.WriteLine(&amp;quot;Request to enable startup, result = {0}&amp;quot;, newState);
            break;
        case StartupTaskState.DisabledByUser:
            // Task is disabled and user must enable it manually.
            MessageDialog dialog = new MessageDialog(
                &amp;quot;I know you don't want this app to run &amp;quot; +
                &amp;quot;as soon as you sign in, but if you change your mind, &amp;quot; +
                &amp;quot;you can enable this in the Startup tab in Task Manager.&amp;quot;,
                &amp;quot;TestStartup&amp;quot;);
            await dialog.ShowAsync();
            break;
        case StartupTaskState.DisabledByPolicy:
            Debug.WriteLine(
                &amp;quot;Startup disabled by group policy, or not supported on this device&amp;quot;);
            break;
        case StartupTaskState.Enabled:
            Debug.WriteLine(&amp;quot;Startup is enabled.&amp;quot;);
            break;
    }
}

Because Desktop Bridge apps have a Win32 component, they run with a lot more power than regular UWP apps generally. They can set their StartupTask(s) to be Enabled in the manifest and do not need to call the API. For regular UWP apps, the behavior is more constrained, specifically:

  • The default is Disabled, so in the normal case, the user must run the app at least once explicitly – this gives the app the opportunity to request to be enabled.
  • When the app calls RequestEnableAsync, this will show a user-prompt dialog for UWP apps (or if called from a UWP component in a Desktop Bridge app from the Windows 10 Fall Creators Update onwards).
  • StartupTask includes a Disable method. If the state is Enabled, the app can use the API to set it to Disabled. If the app then subsequently requests to enable again, this will also trigger the user prompt.
  • If the user disables (either via the user prompt, or via the Task Manager Startup tab), then the prompt is not shown again, regardless of any requests from the app. The app can of course devise its own user prompts, asking the user to make manual changes in Task Manager – but if the user has explicitly disabled your startup, you should probably respect their decision and stop pestering them. In the sample code above, the app is responding to DisabledByUser by popping its own message dialog – you can obviously do this if you want, but it should be emphasized that there’s a risk you’ll just annoy the user.
  • If the feature is disabled by local admin or group policy, then the user prompt is not shown, and startup cannot be enabled. The existing StartupTaskState enum has been extended with a new value, DisabledByPolicy. When the app sees DisabledByPolicy, it should avoid re-requesting that their task be enabled, because the request will never be approved until the policy changes.
  • Platforms other than Desktop that don’t support startup tasks also report DisabledByPolicy.

Where a request triggers a user-consent prompt (UWP apps only), the message includes the DisplayName you specified in your manifest. This prompt is not shown if the state is DisabledByUser or DisabledByPolicy.

If your app is enabled for startup activation, you should handle this case in your App class by overriding the OnActivated method. Check the IActivatedEventArgs.Kind to see if it is ActivationKind.StartupTask, and if so, case the IActivatedEventArgs to a StartupTaskActivatedEventArgs. From this, you can retrieve the TaskId, should you need it. In this test app, we’re simply passing on the ActivationKind as a string to MainPage.


protected override void OnActivated(IActivatedEventArgs args)
{
    Frame rootFrame = Window.Current.Content as Frame;
    if (rootFrame == null)
    {
        rootFrame = new Frame();
        Window.Current.Content = rootFrame;
    }

    string payload = string.Empty;
    if (args.Kind == ActivationKind.StartupTask)
    { 
        var startupArgs = args as StartupTaskActivatedEventArgs;
        payload = ActivationKind.StartupTask.ToString();
    }

    rootFrame.Navigate(typeof(MainPage), payload);
    Window.Current.Activate();
}

Then, the MainPage OnNavigatedTo override tests this incoming string and uses it to report status in the UI.


protected override void OnNavigatedTo(NavigationEventArgs e)
{
    string payload = e.Parameter as string;
    if (!string.IsNullOrEmpty(payload))
    {
        activationText.Text = payload;

        if (payload == &amp;quot;StartupTask&amp;quot;)
        {
            requestButton.IsEnabled = false;
            requestResult.Text = &amp;quot;Enabled&amp;quot;;
            SolidColorBrush brush = new SolidColorBrush(Colors.Gray);
            requestResult.Foreground = brush;
            requestPrompt.Foreground = brush;
        }
    }
}

Note that when your app starts at startup, it will start minimized in the taskbar. In this test app, when brought to normal window mode, the app reports the ActivationKind and StartupTaskState:

Using the windows.startupTask manifest Extension and the StartupTask.RequestEnableAsync API, your app can be configured to start at user log-in. This can be useful for apps which the user expects to use heavily, and the user has control over this – but it is still a feature that you should use carefully. You should not use the feature if you don’t reasonably expect the user to want it for your app – and you should avoid repeatedly prompting them once they’ve made their choice. The inclusion of a user-prompt puts the user firmly in control, which is an improvement over the older Win32 model.

Sample Code here.

Get ready for back to school with Microsoft’s latest programs and deals

Well gang, it’s officially August, and our wonderful teachers are setting up their classrooms, and parents and students are starting to fill backpacks and dorm rooms with supplies.

Three students seated at a table smiling at the camera.

To help prepare for the school year ahead, today, we’re sharing new deals and programs from Microsoft and our partners to get you the best offers on the latest hardware – whether you want a new Surface Laptop, a powerful new Surface Pro, or the latest PC from Dell, HP, or Samsung – we’re here to help.

Back in May, we shared our vision for how technology can inspire creativity in the classroom with the announcement of a set of products and tools inspired by teachers and students, including: a new Windows experience called Windows 10 S – streamlined for simplicity, security, and superior performance – new collaboration experiences in Microsoft Teams, new features in Minecraft: Education Edition, and a range of affordable Windows 10 PCs built for students of all kinds. We also announced the newest members of the Surface family – Surface Laptop powered by Windows 10 S and the all new Surface Pro – both built with superior performance and power to help you better create and be more productive. With any of these devices, you can take advantage of Windows Ink to easily make notes directly on a web page in Microsoft Edge, bring your ideas to life with Paint 3D, keep track of your lists with OneNote – free in the Windows Store, and more.

We also offer Office 365 for Education –  the most complete, intelligent, and secure service for teaching and learning – free for students, faculty, and staff. Office 365 for Education is the broadest and deepest toolkit for content creation, personalized learning, and modern classroom collaboration.

These new products, tools, and programs are designed to empower today’s students and teachers to create the world of tomorrow – we cannot wait to see what you will do!

Just in time for school, we’re announcing a new way to buy the latest Surface device

Woman sitting on bed holding a mug working on Surface Book.

With Surface Plus students can take home one of our best in class Surface devices like Surface Laptop, Surface Pro, Surface Book, or Surface Studio – all for a low monthly payment and 0% interest. Surface Plus also offers customers the opportunity to upgrade their device after 18 months for no additional cost, access exclusive deals and get the best in service and support. Available exclusively at Microsoft Store and Microsoft.com, take advantage of Surface Plus and experience the power of Surface. To learn more about this program, head over to our Devices Blog to get all the details, or come into a Microsoft Store and let us help find the right Surface for you with a device fitting.

Introducing Back to School LIVE

Back to school LIVE

The education team introduced Back to School LIVE, a new series designed to help teachers get ready for the new school year with online workshops, tweetmeets, and tips on exciting new products like Microsoft Teams and Minecraft: Education Edition. The series will kick off with a global #MSFTEduChat TweetMeet on August 15 at both 10 a.m. PT and 4 p.m. PT.  Then, on August 16, we will host a “Back to School LIVE” to help you get started in some of our newest tools for the classroom. To learn more about Back to School LIVE, visit the Microsoft Education Blog.

We’ve also rounded up some of the top Windows 10 PC deals to pack your bags with:

    ASUS Premium 2-in-1 Q series Laptop
    Dell Inspiron 15 7000 Gaming
  • Fujitsu offers over 20 devices with various solutions and services around the world for education: Check out their website for more information about these devices.

HP ENVY 27 AIO with keyboard and mouse

  • Get a Lenovo N23 ($249 USD) and N24 ($279 USD) with Windows 10 S, available worldwide just in time for heading back to the classroom.

Samsung Notebook 7

  • Get $200 off the Samsung Notebook 7 2-in-1 PC the weeks of 7/30-8/5 and 8/13-8/19 in addition to the $125 Back-to-School deal promotion for students.

Toshiba-Portege-x20w

  • Get at least $150 off any featured Toshiba laptop computer purchased through toshiba.com until August 31. Restrictions may apply.

Microsoft Surface Pro 4 shown with blue Type Cover and Surface Pen.

  • Save up to $150 on Surface Pro 4: These well-crafted, beautiful devices empower the creator in all of us. Surface Pro 4, a device that offers the balance of portability and performance of a laptop when you’re on the go, perfect for anyone taking a device to class.

HTC Vive Headset

  • Save $200 on HTC Vive with the purchase of select VR-Ready PCsThe HTC Vive allows true-to-life immersion in the virtual world thanks to a high-resolution headset display, stunning graphics, two wireless controllers with haptic feedback and room-scale motion tracking. Want to test it before you buy? You can try HTC Vive for yourself at select Microsoft Store locations.
  • Get 20 percent off on Hyper X Headphones with Xbox One console or PC purchaseA feast for ears, sharpen your competitive edge with Hyper X Headphones and hear every detail of your favorite game without sacrificing comfort. Find something to celebrate the accomplishments for anyone on your list at your local Microsoft Store and Microsoft.com.

Students can also take advantage of some great deals available at Best Buy and BestBuy.com/studentdeals:

Student looking at new PC at Best Buy with Best Buy associate.

  • Save an extra $100 on select Laptops (Windows 10 laptops)
  • Save an extra $125 on select Desktop & All-In-One Computers (Windows 10 Desktops & All-In-One Computers)
  • Save up to $125 on select ASUS Q series Notebooks, Gaming Notebooks, and desktops
  • Save $130 on Samsung Galaxy Book through Sept 2
  • Save 10% on new Surface Devices (Surface Laptop & Surface Pro)
  • Save $40 on Microsoft Office with qualifying purchase

Visit BestBuy.com/studentdeals to sign up to receive exclusive coupons you can redeem in-store and online for these deals and more.

We hope you take advantage of some of these great deals and are wishing all the students out there a fantastic school year in 2017/8. To ALL our teachers – we are grateful and know that technology is only a small part of the incredible work you do to inspire the next generation of creators. Here’s to you!

The Better Together Beta for Minecraft is here!

The Better Together Beta for Minecraft is here!

The Better Together Update we announced at E3 2017 is designed to unify the console, mobile and Windows 10 PC versions of the game under one single Minecraft edition, which will include infinite worlds, the community Marketplace and community servers (which are coming to the beta later on!). It’ll introduce cross-platform support, allowing console, Windows 10 PC and mobile Minecrafters to play together for the first time! The Better Together Update also brings the biggest collection of new features ever to players on Bedrock Engine platforms (Windows 10, mobile), including the very long awaited and much in demand stained glass, fireworks, PARROTS THAT DANCE, customizable banners, armor stands, jukebox and music discs, recipe book and ravines. And for Windows 10 PC versions, integration with Paint 3D and Remix3D.com, making it easy to export and share 3D creations and inspire others.

It's easy to export and share 3D creations and inspire others.

Who can participate? Players on Windows 10 PC, Android and soon Xbox One are welcome to jump into cross-platform play with other beta testers across all three devices.

Xbox One and Windows 10 PC beta testers will need to have downloaded the Xbox Insider app, and players on Xbox One will need to own a digital version of Minecraft. Beta testers on Android will need to have devices that support Google Play and own a copy of the game purchased through the Google Play Store.

For the full announcement, head over to Minecraft.net!

Windows 10 Tip: How to use Surface Dial with Paint 3D

Whether you’re an artist, student or mobile professional, Surface Dial optimizes your digital workflow by bringing your most-used shortcuts and tools to your screen with simple presses and turns of the Dial. You can also use Dial to do things like play music or skip tracks in Groove Music, scroll through web pages in Microsoft Edge, scroll through documents in Microsoft Word off-screen, and so much more.

Today, we’re going to show you a couple ways you can get started using your Surface Dial with the Paint 3D app in Windows 10.* If you have the new Surface Pro or the Surface Studio, you can use the Dial with Paint 3D directly on your screen.**

Set-up

Make sure you have the Surface Dial connected via Bluetooth to your device. You should be able to press and hold the dial to see a context menu pop-up. Open the Paint 3D app to get started and make sure you are in the Paint 3D app when you are using the Surface Dial to access the features below. The dial will have haptic feedback as you use different features in Paint 3D.

Change the color easily using the color wheel

Change the color easily using the color wheel

It’s super simple to change brush colors. On the Surface Studio, press down on the Surface Dial to select the color palette and the color wheel will pop-up. Turn the Dial and the dot will move to show you what color you have selected. Press down to select the color.

On a Surface Pro device, press down on the Surface Dial to select the color palette. Turn the dial and the color selection in your tool bar will move to the right and left. Press down to select the color.

Be playful as you adjust colors & brushes

There’s no need to stop painting just to change the color or brush thickness. Create seamless tapered strokes by turning the Surface Dial to adjust color, brush thickness, and opacity while drawing.

Click on the art tools button, and select a brush.

Click on the art tools button, and select a brush. To change colors dynamically, press down on the dial and select color palette. Use your pen to draw and turn the dial simultaneously to instantly change from one color to the next. To change the thickness, press down on the dial and choose thickness on the context menu. Press down to select.  Turn the dial to the left to taper the line smaller and to the right to make the line thicker.

Rotate objects while painting

Click on the art tools button and choose a brush and color.

The Surface Dial makes it easy to rotate as you paint. Using your digital pen, use the 3D tools to draw a 3D object or pull a model from the Remix 3D community. Click on the art tools button and choose a brush and color. Start painting on your 3D model and keep your pen stationary while turning the dial to rotate the object underneath.

Hit undo

Press and hold for the context menu, and scroll to the last button, undo.

Don’t be afraid to experiment with easy access to the undo button on the Surface Dial. Press and hold for the context menu, and scroll to the last button, undo. Press down on the dial to select and turn the dial to roll-back any changes you’ve made.

Stamping and stickers

Click on the Stickers Tool and select a pre-made sticker, or upload your own.

Click on the Stickers Tool and select a pre-made sticker, or upload your own. Choose where to position the sticker 3D model and simply press down on the Dial to stamp the sticker onto the 3D object. It’s super fun and easy.

If you don’t have a Surface Dial yet, you can order one here from the Microsoft Store. Head over here for five things you need to know about Surface Dial, or check out tips on getting started using Paint 3D.

In case you missed it, here’s last week’s Windows 10 Tip:

<!–
!function(a,b){“use strict”;function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf(“MSIE 10”),h=!!navigator.userAgent.match(/Trident.*rv:11./),i=b.querySelectorAll(“iframe.wp-embedded-content”);for(c=0;c<i.length;c++){if(d=i[c],!d.getAttribute(“data-secret”))f=Math.random().toString(36).substr(2,10),d.src+=”#?secret=”+f,d.setAttribute(“data-secret”,f);if(g||h)a=d.cloneNode(!0),a.removeAttribute(“security”),d.parentNode.replaceChild(a,d)}}}var d=!1,e=!1;if(b.querySelector)if(a.addEventListener)d=!0;if(a.wp=a.wp||{},!a.wp.receiveEmbedMessage)if(a.wp.receiveEmbedMessage=function(c){var d=c.data;if(d.secret||d.message||d.value)if(!/[^a-zA-Z0-9]/.test(d.secret)){var e,f,g,h,i,j=b.querySelectorAll(‘iframe[data-secret=”‘+d.secret+'”]’),k=b.querySelectorAll(‘blockquote[data-secret=”‘+d.secret+'”]’);for(e=0;e<k.length;e++)k[e].style.display=”none”;for(e=0;e1e3)g=1e3;else if(~~g<!]]>

Have a great week!

*Surface Dial is compatible with any Bluetooth-enabled, Windows 10-enabled PC, laptop, and tablet running on Windows 10 Anniversary Update. 
** Surface Dial is on-screen compatible with Surface Studio and Surface Pro only. 

How to Restart your App Programmatically

For some apps (especially games) it is not uncommon for the app to get into a state where it needs to restart – perhaps after a license update, after installing downloadable content, its caches have become corrupt or unwieldy, or for any other reason where the app needs to refresh state from scratch. In earlier releases, your only option would have been to prompt the user to close and relaunch, or to call CoreApplication.Exit – and both options provide sub-optimal user experience.

We have therefore introduced a new API that enables an app to request immediate termination and restart, and to pass arbitrary arguments into the fresh instance. In this post, we’ll look at how this works and how you can build it into your app. This is available now in Insider builds from Build 16226 onwards, along with the corresponding SDK.

Here’s a sample app, called TestRestart. 

The app provides a ListView of cities on the left, the currently-selected city on the right and a TextBox for providing arguments to the app when it is restarted. When the user taps the Request Restart button, the app will terminate and restart itself, passing in the supplied arguments. The new API, RequestRestartAsync, is exposed as a static method on the CoreApplication object. It takes a string parameter, which can be any string value you like – including input from the user or another external entity. If you do choose to accept input in this way, it is your responsibility to validate it correctly to make sure it conforms to whatever constraints you choose to impose. You should do this validation on input, before passing it to RequestRestartAsync. In this sample app, we’re expecting the user to type in the name of a city.


async private void DoRestartRequest()
{
    bool isValidPayload = false;
    string payload = restartArgs.Text;
    if (!string.IsNullOrEmpty(payload))
    {
        foreach (ImageViewModel imageItem in imageListView.Items)
        {
            if (imageItem.Name == payload)
            {
                isValidPayload = true;
                break;
            }
        }
    }

    if (isValidPayload)
    {
        AppRestartFailureReason result =
            await CoreApplication.RequestRestartAsync(payload);
        if (result == AppRestartFailureReason.NotInForeground ||
            result == AppRestartFailureReason.RestartPending ||
            result == AppRestartFailureReason.Other)
        {
            Debug.WriteLine(&amp;quot;RequestRestartAsync failed: {0}&amp;quot;, result);
        }
    }
}

To mitigate privacy concerns, an app is only permitted to restart itself if it is in the foreground at the time it makes the request. When the app restarts, it restarts with normal UI – that is, as a normal foreground window. If we were to permit a background task or minimized app to restart, the result would be unexpected to the user. This is why the API is framed as a request. If the request is denied, the app would need to handle the failure – perhaps by waiting until it is in the foreground and trying again. If you were to request a restart and then through some twist of logic managed to request it again before the system started the operation, then you’d get the RestartPending result, although this is an edge case. You’re unlikely to ever get the other result – unless something goes wrong in the platform.

Note that this is the only significant constraint, but you should use this API carefully. For example, you probably should not use it if your app was not originally launched by the user – for example, if it was launched as the result of a share or picker operation. Restarting in the middle of one of those contract operations would certainly confuse the user.

If the request is granted, the app is terminated and then restarted. There are many different ways to activate an app: in addition to a regular launch activation, apps can choose to support file activation, protocol activation, share or picker activation and so on. The list is documented here. For the restart case, the app will be activated as a regular launch – just as if the user had closed the app manually and tapped its tile to launch it again – but including the arbitrary arguments supplied earlier (if any).

In your App class, you should handle this by overriding the OnActivated method. Test the ActivationKind, and if it’s ActivationKind.Launch, then the incoming IActivatedEventArgs will be a LaunchActivatedEventArgs. From this, you can get hold of the incoming activation arguments. For a regular user-initiated launch, the Arguments will be empty, so if it’s not empty you could simply infer that this is a restart activation. You can also check the PreviousExecutionState, which for a restart operation will be set to Terminated.

Although the arguments might have originated from an untrusted source (eg, the user), you should have done the validation before requesting restart. If so, you can consider them trustworthy when you receive them in OnActivated.


protected override void OnActivated(IActivatedEventArgs args)
{
    switch (args.Kind)
    {
        case ActivationKind.Launch:
            LaunchActivatedEventArgs launchArgs = args as LaunchActivatedEventArgs;
            string argString = launchArgs.Arguments;

            Frame rootFrame = Window.Current.Content as Frame;
            if (rootFrame == null)
            {
                rootFrame = new Frame();
                Window.Current.Content = rootFrame;
            }
            rootFrame.Navigate(typeof(MainPage), argString);
            Window.Current.Activate();
            break;
    }
}

What you do with the incoming arguments is entirely up to you. In this app, we’re simply passing them on to the MainPage. In the MainPage in turn, we have an override of OnNavigatedTo which uses the string to select an item in the ListView:


protected override void OnNavigatedTo(NavigationEventArgs e)

{
    string payload = e.Parameter as string;
    if (!string.IsNullOrEmpty(payload))
    {
        foreach (ImageViewModel imageItem in imageListView.Items)
        {
            if (imageItem.Name == payload)
            {
                imageListView.SelectedItem = imageItem;
                break;
            }
        }
    }
}

As you can see, the CoreApplication.RequestRestartAsync method is a simple API. You can use it to terminate your app immediately, and have it restart as if by user action, with the additional option of passing in arbitrary arguments on activation.

Sample Code here.

This Week on Windows: Shark Week, Imagine Cup, Help Me Choose and more

We hope you enjoyed today’s episode of This Week on Windows! Head over here to catch up on the news out of Imagine Cup, check out our Windows 10 Tip on getting started with Windows Help Me Choose, dive into Shark Week – or, keep reading for what’s new in the Windows Store.

In case you missed it:

<!–
!function(a,b){“use strict”;function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf(“MSIE 10”),h=!!navigator.userAgent.match(/Trident.*rv:11./),i=b.querySelectorAll(“iframe.wp-embedded-content”);for(c=0;c<i.length;c++){if(d=i[c],!d.getAttribute(“data-secret”))f=Math.random().toString(36).substr(2,10),d.src+=”#?secret=”+f,d.setAttribute(“data-secret”,f);if(g||h)a=d.cloneNode(!0),a.removeAttribute(“security”),d.parentNode.replaceChild(a,d)}}}var d=!1,e=!1;if(b.querySelector)if(a.addEventListener)d=!0;if(a.wp=a.wp||{},!a.wp.receiveEmbedMessage)if(a.wp.receiveEmbedMessage=function(c){var d=c.data;if(d.secret||d.message||d.value)if(!/[^a-zA-Z0-9]/.test(d.secret)){var e,f,g,h,i,j=b.querySelectorAll(‘iframe[data-secret=”‘+d.secret+'”]’),k=b.querySelectorAll(‘blockquote[data-secret=”‘+d.secret+'”]’);for(e=0;e<k.length;e++)k[e].style.display=”none”;for(e=0;e1e3)g=1e3;else if(~~g<!]]>

<!–
!function(a,b){“use strict”;function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf(“MSIE 10”),h=!!navigator.userAgent.match(/Trident.*rv:11./),i=b.querySelectorAll(“iframe.wp-embedded-content”);for(c=0;c<i.length;c++){if(d=i[c],!d.getAttribute(“data-secret”))f=Math.random().toString(36).substr(2,10),d.src+=”#?secret=”+f,d.setAttribute(“data-secret”,f);if(g||h)a=d.cloneNode(!0),a.removeAttribute(“security”),d.parentNode.replaceChild(a,d)}}}var d=!1,e=!1;if(b.querySelector)if(a.addEventListener)d=!0;if(a.wp=a.wp||{},!a.wp.receiveEmbedMessage)if(a.wp.receiveEmbedMessage=function(c){var d=c.data;if(d.secret||d.message||d.value)if(!/[^a-zA-Z0-9]/.test(d.secret)){var e,f,g,h,i,j=b.querySelectorAll(‘iframe[data-secret=”‘+d.secret+'”]’),k=b.querySelectorAll(‘blockquote[data-secret=”‘+d.secret+'”]’);for(e=0;e<k.length;e++)k[e].style.display=”none”;for(e=0;e1e3)g=1e3;else if(~~g<!]]>

<!–
!function(a,b){“use strict”;function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf(“MSIE 10”),h=!!navigator.userAgent.match(/Trident.*rv:11./),i=b.querySelectorAll(“iframe.wp-embedded-content”);for(c=0;c<i.length;c++){if(d=i[c],!d.getAttribute(“data-secret”))f=Math.random().toString(36).substr(2,10),d.src+=”#?secret=”+f,d.setAttribute(“data-secret”,f);if(g||h)a=d.cloneNode(!0),a.removeAttribute(“security”),d.parentNode.replaceChild(a,d)}}}var d=!1,e=!1;if(b.querySelector)if(a.addEventListener)d=!0;if(a.wp=a.wp||{},!a.wp.receiveEmbedMessage)if(a.wp.receiveEmbedMessage=function(c){var d=c.data;if(d.secret||d.message||d.value)if(!/[^a-zA-Z0-9]/.test(d.secret)){var e,f,g,h,i,j=b.querySelectorAll(‘iframe[data-secret=”‘+d.secret+'”]’),k=b.querySelectorAll(‘blockquote[data-secret=”‘+d.secret+'”]’);for(e=0;e<k.length;e++)k[e].style.display=”none”;for(e=0;e1e3)g=1e3;else if(~~g<!]]>

 

Here’s what’s new in the Windows Store this week:

Halo Wars 2: Serina & Spearbreaker Bundle

Halo Wars 2: Serina & Spearbreaker Bundle

The latest update to Halo Wars 2 features two exciting new story missions in Operation: Spearbreaker, and a beloved, digitally deceased but downloadably undeterred new Leader – the UNSC Spirit of Fire’s former AI Serina. Both Serina and the Operation: Spearbreaker story missions are available now for Windows 10 as part of the Halo Wars 2 Season Pass, as individual purchases at $5.99 USD each, or a special 2-pack version that includes both pieces of content for $9.99 USD.

Fable Fortune (Game Preview) – Buy for $11.99, through July 31

Fable Fortune (Game Preview)

Play as one of six unique Heroes in a collectible card game that combines the iconic world and characters of Albion with fast-paced and thrilling tactical gameplay. In Fable Fortune (Game Preview) ($14.99 Regular Price, $11.99 Sale Price through July 31) your destiny is on the cards! Starting today, Fable Fortune is 20% off through July 31, 2017.

Sci-Fi Sale in Books*

Sci-Fi Sale in Books

Summer is when we escape the rhythms of the rest of the year – and many of us dive into a great book to do that. The Science Fiction Sale in Books makes this easy and fun, with the ten top sci-fi titles on sale for just $2.99 through July 31.

Netflix – Ozark

Netflix - Ozark

Netflix (Free, with IAP options) brings a stellar cast – and a compelling plot – together in its new original series Ozark. Watch as financial adviser Jason Bateman drags his family from Chicago to the Missouri’s Ozark mountains, where he must launder $500 million in five years to appease a drug boss. Laura Linney co-stars as his wife in this compelling, not-to-be-missed new drama.

Have a great weekend!

*US only

Windows 10 Creators Update fully available for all Windows 10 customers

For the past several months, I’ve shared insights on our roll out approach for Windows 10 Creators Update (version 1703). We’re now moving from a targeted offering to full availability for all compatible devices running Windows 10 globally via Windows Update. Similarly, our commercial customers should feel confident to deploy this release broadly across their organizations.

How to get the Windows 10 Creators Update

Predictable semi-annual release aligned with Office

In response to feedback for a more predictable feature update model, we are moving to a new twice-yearly release cadence called the Semi-Annual Channel that replaces the Current Branch (CB) and Current Branch for Business (CBB). As we announced in April, Windows has aligned with Office 365 ProPlus to simplify IT deployment cycles, targeting releases in March and September. Both feature releases will be serviced for 18 months from the date of release. The Creators Update marks the first of our Semi-Annual Channel releases.

Empowering organizations to decide when and how to deploy

The new Semi-Annual Channel update cadence and life cycle model provides commercial customers with greater predictability and simplicity to take advantage of the latest capabilities and integrated security, as quickly as is practical for their organization. This predictable release cycle enables enterprises to plan combined servicing of Windows and Office and create deployment plans tailored to their needs.

Starting with the Windows Insider Program for Business, IT Pro early adopters can evaluate pre-release builds early and provide feedback across the ecosystem – to us and their IHV/ISV partners – so we can, together as an ecosystem, build reliable, highly productive and secure products and experiences for our customers. When the Semi-Annual Channel feature update is released, organizations can begin targeted deployments to a select group of machines to validate their apps, devices, and infrastructure, prior to beginning a broad deployment at a time that is right for them. For details on Semi-Annual Channel servicing, see our article on TechNet.

You’re most secure on the latest version of Windows 10  

We are excited to make the Creators Update fully available to all our customers. We also encourage commercial organizations to begin broadly deploying Windows 10, version 1703, if you haven’t already done so. You can verify your system is up to date on the Windows Security page. We will continue to ensure all eligible devices can now move forward to the Creators Update, if you are having trouble updating your device, see this helpful article. Staying up to date on both the latest feature and quality updates assures you of being on the most secure version of Windows 10 ever (version 1703).

Announcing the 2017 Imagine Cup Champions

Today, we are excited to announce Team X.GLU of the Czech Republic are the official 2017 Imagine Cup champions. X.GLU’s project combines hardware and Microsoft Azure cloud to help diabetics better cope with the disease’s symptoms. As the victors, X.GLU wins a mentoring session with Microsoft CEO Satya Nadella, $100,000 in cash, a $125,000 Azure Grant and a trip to the 2018 Build developer conference.

In tackling diabetes, X.GLU seeks to improve the quality of life for the 422 million people worldwide impacted by the disease, a significant percentage of whom are children. In many cases, younger patients are burdened with having to check their blood-sugar eight to 10 times per day. Though critical to their continued good health, many children tire of the process around routinely checking their blood-sugar levels, and, as a result, don’t keep up with this crucial aspect of living with the disease. X.GLU’s concept gamifies the process, awarding children “strawberry” icons for correctly guessing their blood-sugar range during tests.

“I loved X. GLU’s project because my mother has diabetes and I know she gets tired of checking her blood sugar each day, too,” said Imagine Cup guest judge Meghan Camarena (Strawburry17). “Even though this was designed with children in mind, I think the concept is one that anyone living with diabetes could appreciate, and it could truly help save lives.”

— Imagine Cup guest judge Meghan Camarena

Today’s students are the makers and doers that will change the world as we know it. Each year, Imagine Cup has proven that technology is merely a tool to unlock students’ innate creativity and ingenuity.

“In a time like this, where every walk of life in every society and every economy is being fundamentally changed and shaped by digital technology, developers like you are going to change the world,” Said Microsoft CEO, Satya Nadella. “You’re going to bend that curve of progress.”

— Microsoft CEO, Satya Nadella

For more details on the two-day competition, head on over to the Official Microsoft Blog.

Tracking your fitness goals just got easier with the Fitbit skill for Cortana

Earlier in May, we announced the public preview of the Cortana Skills Kit, which allows developers to easily create intelligent, personalized experiences for users of Cortana in the US*. Today, we’re pleased to share that the latest skill on Cortana is available, from our partners at Fitbit. With the new Fitbit skill for Cortana, you can easily monitor your health and fitness goals – just by asking Cortana. Users can access the Fitbit skill across devices and platforms, starting with Windows 10, Android and iOS and soon on the Harman Kardon Invoke speaker.

Fitbit is the leading global wearables brand with more than 50M registered users across the world. Fitbit’s health and fitness trackers and software are compatible across Windows 10, Android and iOS platforms, and offers the widest range of easy-to-use, smart and motivational tools that keep users engaged to meet their goals.

With the new Fitbit skill for Cortana, it’s now easier than ever for Fitbit users to monitor their health and fitness goals, sleep, stats and progress. Once you have connected your Fitbit account to Cortana, simply ask Cortana to get the information you need to stay inspired without having to pull up the Fitbit app or website. And because Cortana works across your Windows 10, Android and iOS devices, you can easily do so on the device closest to you.

You can say, “Hey Cortana, Ask Fitbit how am I doing today,” along with several other supported health and fitness prompts to learn about your daily progress. Cortana will not only read out your progress – like active minutes you’ve logged, how you slept last night, or the number of calories you’ve burned for any day within the previous week – but may also show you a short summary with all the handy information. If you’re tracking how you’re performing against your friends, you can say, “Hey Cortana, show me my leaderboard,” and Cortana will provide you with the extra motivation to keep you going. Cortana will also offer words of encouragement to inspire you to meet your goals, with responses that are tailored to the specific time of day. For example, if you inquire about your active minutes in the morning, you might be encouraged with “Today’s the day. Let’s do this.” Or, if you ask about your steps in the evening: “You are so there. I’d high five you if I could.”

Cortana understands natural language and makes it very easy to update Fitbit about your beverage and food intake without having to manually log the information.  You can say, “Hey Cortana, Tell Fitbit to log I had an omelet for breakfast,” or “Hey Cortana, Ask Fitbit to log I drank 12 ounces of water,” and Cortana will update your Fitbit account accordingly. Cortana provides you with the convenience of being able to log these activities through voice, helping you maintain a fuller view of your calorie intake – along with the impact on your overall health and fitness stats.

Cortana provides both voice and visual responses to users

There are many ways Cortana can help you engage with Fitbit. Here are a few you can try:

  • “Hey Cortana, ask Fitbit how much water I’ve had today”
  • “Hey Cortana, ask Fitbit how many calories do I have left to eat”
  • “Hey Cortana, ask Fitbit how many steps do I have left”
  • “Hey Cortana, ask Fitbit how many workouts I need to do this week”

To find out more, get started with the new Fitbit skill. Simply say “Hey Cortana, Open Fitbit,” and Cortana will ask you to connect your accounts by signing-in with your Fitbit username and password. You can then ask Cortana about your Fitbit activity. Happy stepping!

To learn more and discover the currently available skills, visit: microsoft.com/en-us/windows/cortana/cortana-skills/

*Available in US only. Other markets will be added over time.