Category Archives: Apps

Auto Added by WPeMatico

Cognitive Toolkit Model Evaluation in UWP

We are excited the share with you that Microsoft Cognitive Toolkit (CNTK) 2.1 has added support for model evaluation on UWP applications. This means you can harness the power of deep learning in your Windows apps delivered via the Windows Store! Read on to find out how can infuse your apps with the power of AI.
The Virtuous Intelligence Cycle
Cloud-connected devices can perform operations locally or delegate them to the cloud. The virtually unlimited compute power of the cloud makes it a good choice for running tasks that need significant compute power but don’t require low latency. In machine learning, model training is an example of such a task. It might require hours or days to train a model, but once the model is trained, deploying it closer to where the data is generated has some very useful properties. First, it reduces the roundtrip latency inherently unavoidable in cloud communication. This is critical for time-sensitive deep learning scenarios like self-driving cars and industrial equipment failure detection. Second, it can unlock insights from data that were previously discarded due to network transmission costs. And finally, it allows machine learning solutions in scenarios with intermittent network connectivity like search & rescue, agriculture and others.
We refer to devices with non-trivial compute power that are in closer proximity to the data source as “intelligent edge” devices. Intelligent edge devices can vary broadly depending on scenario as shown in the figure below.

In the virtuous intelligence cycle, deep learning models trained in the cloud are deployed and evaluated at the edge. Additionally, the edge feeds valuable data back to the cloud where the models are improved and redeployed to the edge, hence completing the virtuous cycle.
The improvements described in this post allow UWP applications to be part of the intelligent edge where deep learning models can be evaluated.
Image Classification Example
Let’s look at an example where an image classification machine learning model is built into an UWP application. The app allows you to pick a CNTK compatible model to perform image classification on an image. Several pre-trained models to use for this purpose are available at this link.
The code for the entire solution is available in the CNTK Github repo.
Currently, only C++ CNTK UWP bindings are supported. However, the sample demonstrates how a C# based UWP solution can perform model evaluation by referencing a WinRT library that wraps the UWP-compatible CNTK native components available on NuGet.

packages.config specifies the NuGet packages the library uses, and points to the UWP-compatible package:

<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CNTK.UWP.CPUOnly" version="2.1.0" targetFramework="native" />
</packages>
 

This NuGet package provides UWP-compatible CNTK components, including the OpenBLAS math library, for CPU-based model evaluation. ImageRecognizerLib exposes Create and RecognizeObjectAsync methods used to load the pre-trained CNTK model and classify the specified image input as an array of bytes.
The rest of the solution is a few simple XAML UI elements to accept input from the user. Here is a quick animation of the app in action:

Now it’s your turn!
We’ve demonstrated how you can use the newly added UWP support in CNTK to bring the next level of intelligence to your Windows applications. We can’t wait to see the awesome apps you will build with this exciting new technology!

Best practices for using video ads in Windows apps

Interstitial videos are a highly engaging ad format that, if used right, have much higher monetization potential as compared to more traditional ad formats. Interstitial videos are typically 15-60 seconds long and take up the full screen space, getting the user engaged in the brand or app being advertised and result in much better conversions compared to standard ad formats.
Here are some do’s and don’ts for using interstitial videos in your app for maximum yield:
DO’s
Have a clear user experience defined in the app or game to the point where the video ad is shown – Since the video ad overlays the app screen completely, it must be used with caution and should never disrupt the user during game play or app usage. Typical examples of usage of interstitial ads are in between game levels or switching to a new tab in a content app.
Set the ad unit mediation configuration to ‘Automatic’ – This allows Microsoft to determine the best waterfall order of ad units for every incoming ad request, giving developers maximum revenue potential from their apps.
Maintain good viewability of the video ad – The Media Ratings Council defines video viewability as, “At least 50% of the pixels in the ad are on an in-focus browser tab on the viewable space of the browser page; the pixel requirement is met for at least two continuous seconds or more at any point in the ad.” Many advertisers only pay when the impression is viewable, for better yield and to avoid fraud. Make sure that when you display the video ad in your app, it plays fully and is not hidden under any other screen in the app.
DON’Ts
Pre-caching for long time periods – Video ad demand is transient by nature. An ad that is available at a given moment may not be available to play a few seconds later from the same ad provider. Given this, app developers should minimize the ad pre-fetch to less than 8 seconds before they are ready to display the ad in the app.
Fire multiple requests repeatedly – In case of a No Ad response, it is recommended that the developer should not fire multiple ad requests constantly. By firing multiple requests and not showing an ad when available, the ad unit becomes more likely to get marked as low quality, further decreasing the chances of getting an ad in the future. Make the next ad request only when it is aligned with the user flow in the app or game and you are ready to show an ad again.
We are working closely with our partner ad networks to bring the best demand to Windows apps and improve fill rates and monetization for our publishers. To know more about adding video ads in your apps, read the article here. Stay tuned for more announcements in this space!

Understanding the ad mediation configuration in the Microsoft ad mediation service

We announced the general availability of the Microsoft ad mediation service in May 2017. The federated cloud based ad mediation service is designed to help app developers maximize their ad revenue. In this blog post, we will go deeper into the mechanics of how a developer can configure their ad network choices to achieve the best possible yield.
Configuring mediation for your application
Developers can setup ad mediation in the Windows Dev center for their ad enabled applications. The ad mediation service mediates ad requests between a plethora of ad networks. The mediation configuration UX in the Monetize with Ads page for an application provides the developer control over managing the mediation configuration for that application.

Microsoft optimized configuration
The default option that is selected is for Microsoft to choose the best mediation settings for the app. This allows the machine learning algorithms that we employ to make ad requests to the best possible available ad networks to ensure highest yield for the developers.
The yield management algorithms use a mixture of User Profile (Age/Gender, Behavioral​ Segmentation, Location​, Time of the day, Day of the week​, Ad Engagement Rate​), Publisher quality score (Ad Size, Ad Format, Ad Placement​, Similar Apps, Category, CTR​, Viewability Signals, Quality Score) and Historical data score (Historical CPM, Historical Sell-through Rate​) parameters for their computation.
The machine learning algorithm looks at various parameters to compute the waterfall order of the ad partners that would get the maximum yield for the application developer.
It is strongly recommended that developers choose this default option for maximizing yield for their ad enabled apps.
Manual configuration
A developer can also manually configure the rank order of the ad networks to serve ads on a given ad unit. These selections can be done across all markets or can be customized for specific markets. When the option for letting Microsoft choose the best mediation settings is unselected, the list of available ad networks and their order is shown. The developer can play around with these settings and set it up to their desired values, including setting specific order for different markets. They can also remove ad networks from the waterfall by toggling the ‘Active’ checkbox in the configuration UX, as shown below.

If you notice the choice of networks here, you can see the presence of both paid and other (non-paid) ad networks. The percentages indicate the percentage of times the ad request will be sent to the ‘type’ of ad networks first. The percentages allow for the developer to allocate between paid and non-paid ad networks. This gives them flexibility to play with the type of ads being shown based on their requirements. For example, if a developer wants to use a given week to just promote their app, they can mark the paid ads to 0% and non-paid House and Community ads to 100%.
In the above screenshot, the ad request would be sent first to the other ad networks 30% first before it would be sent to the paid networks. If the developer does not have any House or Community ad campaigns setup, no ads would be returned for them.
Although it is recommended that developers use the Microsoft optimized configuration option, there are a few advanced scenarios in which a developer would choose to go with a manual configuration:
The developer wants to exclude a few ad networks from serving
The developer wants to tweak the ratio of paid and free ads
The developer wants specific configuration for different markets
The configuration can be changed once per day and takes a couple of hours to take effect. Developers can learn more about configuring their ad unit for optimal yield here.
Examining the performance of the various ad networks in the Analytics page can help the developer choose the method of configuration for their ad networks.
We hope this gives you insight into how you can use the ad mediation service to increase your yield. Please let us know if you have any questions or comments!

New Tools in Windows Device Portal for the Windows 10 Fall Creators Update

In the Windows 10 Fall Creators Update, Device Portal now offers several new tools from across Windows to help you location test your UWP, explore Mixed Reality, build new hardware peripherals and test your apps new installation pipeline. It’s a little bit of goodness for everyone, and we’re excited to share these with you.
If you’re not familiar with Device Portal, you can check out the blog posts below to see what other tools you can find in Device Portal, or look at the new docs.microsoft.com to learn how to enable it.
And as always, all of these tools are backed by a REST API, so that you can use it from a scripting or client application environment using the Device Portal Wrapper.
Location Based Testing
Most of us don’t have the travel budgets to test our apps across the world – but pretending to travel is almost as good!  The Location tool in Device Portal lets you easily change the location that Windows reports to apps. By tapping the “Override” check box, you can swap out the device location for whatever you set using the map or lat/long text boxes. Be sure to uncheck the box when you’re done so that your location (and timezone) come back to reality – every vacation must end…

Figure 1: The News app keeping me up to date with local headlines!
This also works for web pages in Microsoft Edge, letting you test your webpages in different parts of the world.
Some notes on what this tool can and cannot do:
This doesn’t change the locale of your PC! So the News app above still saw an EN-US user in the middle of Italy.
You may not see all apps using this location. Some programs don’t use the Windows API to determine location or have special logic (e.g. using your IP address) to determine your location.
This tool marks the PositionSource of the location data as “Default.” Some apps may check for the source and alter their behavior based on it.
Happy travels!
USB Diagnostics
This one goes out to all the hardware folks – if “HLK” or “WDK” sound familiar, you might find this handy. The USB team has updated the USBView tool to work inside Device Portal, so developers working on new hardware can have more tooling at their fingertips.
The USB Devices tool can be a bit tricky to find – head to the hamburger menu in the top right, and go to “Add tools to workspace.”  Scroll to the bottom and check the “USB Devices” box, then hit “Add.” And voila – a full view of your systems USB hubs, controllers and peripherals. The hubs and controllers expand to show individual devices using the + (plus) sign, and clicking the gear will expand to show the items properties.

Streaming App Install Debugging
The Windows 10 Creators Update added ““streaming installation” for UWP, which allows a user to launch the app before it finished downloading. In order to make this easy to test, the App Model team has added a Streaming Install Debugger tool to Device Portal. To use it, deploy an app with content groups to the device, then open the Streaming Install Debugger. In it you’ll be able to edit the states of the content groups so you can test your apps behavior as streaming install is being simulated and ensure it behaves correctly when content groups are missing.

For more details, check out Andy Liu’s blog posts about the new App Installer and Streaming Install Debugger tools.
Mixed Reality Tooling
One of the bigger splashes in the Fall Creators Update is the addition of Mixed Reality to Windows Desktop. As part of that release, we’re including a suite of tools to help developers build great Mixed Reality apps. Two of these tools may look familiar to HoloLens developers – 3D View and a Framerate counter. There’s also a new app launch option that appears when you have an immersive headset attached to your PC, which lets you launch your app in Mixed Reality.
Frame rate is an important factor in making mixed reality apps comfortable, and it’s important for developers to optimize performance to hit full frame rate on the systems they support. The Frame Rate tool in the Device Portal helps by showing developers both the frame rate of their app and of the system’s compositor.

The 3D View helps when testing your immersive headset’s interactions with the real world, displaying its position as it moves through space.

Finally, what good is tooling if you can’t actually run your app in your immersive headset? Now, when you have an immersive headset attached, the Installed Apps tool will add a button letting you launch the app in the HMD. While fully immersive apps will always run in Mixed Reality, this new button is particularly useful for 2D UWP apps (or apps that switch between 2D and immersive) when you want to test them in Mixed Reality.

As always, if you have ideas for Device Portal that would help you write or debug apps, please leave us a note on our UserVoice or upvote an existing request. If you run into bugs, please file it with us via the Feedback Hub.
Related Posts:
Using Device Portal to view debug logs for UWP
Using the App File Explorer to see your app data

Using your ad units correctly when you have multiple store apps

As we had blogged earlier, ad unit performance has a direct correlation with the application category and the users targeted by the application. Having an ad unit associated with multiple store applications leads to ambiguity, which can result in improper ad delivery. This will have an adverse impact on your revenue and user experience. The Children’s Online Privacy Protection Act (COPPA) and other compliance requirements mandate that there is a 1:1 correlation between a store application and an ad unit.
Each ad unit must be only be used in a single store application. This requirement includes applications that target Universal Windows Platform applications, along with Windows 8.x (WinRT) applications.
We’ve reached out to developers through various means, including multiple notifications inside Dev Center. The ad delivery will soon stop on ad units used across multiple applications, so if you have any such ad units, please update! Setting up new ad units is extremely easy.
Don’t forget these following tips that can help maximize your in-app-ad revenue:
Move to the latest advertising SDKs
Set COPPA settings for your app
Use only IAB standard ad sizes
Set your ad placement appropriately
Use Interstitial Banner as fallback to Interstitial Video