Run Windows Store Apps From Desktop

Thursday, February 7, 2013

When customers ask me how they can run Windows Store app from Desktop usually the answer is – You Can’t, but if you really want there is a way to do that. The reason I usually answer is You Can’t is because – In order to run Windows Store app from Desktop you need to install Windows App Certification Kit, this pack contains “microsoft.windows.softwarelogo.appxlauncher.exe” file that can run a Windows Store app by his application model id. So if you plan on publishing your app you can’t assume the ACK is installed on the client machine. ...

Windows App Cert Kit Failed – The bytecode generation test detected the following errors

In the past couple of weeks I’ve worked on Cordova (PhoneGap) application for Windows 8, just before we intent to publish it to the store I’ve encountered a problem – “bytecode generation test detected“. To give your app the best chance of getting certified you should run the some tests, beside checking for bugs and making sure your application works as expected you should use the App Cert Kit - Windows 8 apps must use the new Windows App Certification Kit to become certified and eligible for sale in the Windows Store “Windows 8 App...

WinRT Toast Notification From Desktop Application

Wednesday, January 30, 2013

The post title maintained Toast Notification but after reading this post we'll be able to perform API calls to WinRT from your Desktop application. As you know WinRT exposing API’s for three developer languages: C#, C++ and JavaScript, this means that from each language you’ll be able to perform WinRT calls. The idea is based on Windows Metadata File (winmd) that expose those APIs that can be consumed across a variety of technologies and languages. Download Demo Project So why not using those calls from a desktop application? for example one of the great...

How To: Compress Files In WinRT

Monday, December 31, 2012

Windows Store apps are aligned with PLM philosophy (Only active application will use device resources), and because of this most Windows Store apps needs to save their data locally until the next application execution. Windows Store apps can also use the Roaming folder to save files and settings that will be sync with the user Windows Live account, when saving settings or files to Roaming folder you need to make sure those files are not too big so Windows 8 will be able to sync the Roaming folder quickly. One option is to use Compression using: ...

How To: Keep Windows 8 Device Screen On While User Away

Thursday, December 27, 2012

While working with a customer on GPS system for Windows Store app, an important question raised: How we can prevent from Windows to turn off the screen due to user inactivity? Normally, a Windows 8 device will dim the display (and eventually turn it off) to save battery life when the user is away. Now for our system we need to keep the display on at all times, to do that call requestActive function to notify Windows that the app requires the display to remain on. Windows automatically deactivates your app's active display requests when...

Why Background Audio Isn’t Working?

Using HTML 5 we can play audio very easily in your Windows Store app, all you need to do is setting an audio element specify the object properties and that’s it. var audioElement= document.createElement('audio'); audioElement.setAttribute("id", "audtag"); audioElement.setAttribute("controls", "true"); audioElement.setAttribute("src", fileToPlay); audioElement.setAttribute("autoplay", "true"); audioElement.load(); What if you want to keep playing this audio even if the user has switch to another application? In order to to that you’ll need to use “Background Audio” ability. First you need to declare the “Background Tasks” in your app package manifest file. Then you need to add the “msAudioCategory” attribute to the audio element: audtag.setAttribute("msAudioCategory", "BackgroundCapableMedia"); Now if you...

Link To Windows Store App From Web Sites

Tuesday, December 25, 2012

While working on Windows Store app for a customer he asked me – how I can promote my app on that company web site, I said this is very simple all you need to do is adding a Windows Store protocol link and once the user will click on that link (Only if his using Windows 8), the app page will appear in Windows Store app. Windows Store protocol link So, how do I add a link to my Windows Store app? src or href => ms-windows-store following by the Package Family Name ...

Creating Windows Store App Using PhoneGap (Cordova)

Sunday, December 2, 2012

There is new PhoneGap release called – Cordova or PhoneGap 2.2.0 that supports WinRT features, in this post I’ll demonstrate some of the basics of PhoneGap for Windows Store apps. Download Demo Project What is PhoneGap? PhoneGap is a free and open source framework that allows you to create mobile apps using standardized web APIs for the platforms you care about. This means that using PhoneGap in your Windows Store app can also be used by other Mobile OS such as iOS, Android, Windows Phone 7, Blackberry and more....

Windows.BackgroundTasks contract or is not installed

Friday, November 30, 2012

Yesterday I did some work on BackgroundTasks (CS) for customer application, while building the structure I faced an unfamiliar error and application crash when the Task was triggered. I’ve look into Windows Event Log and fond a error related to my application: Activation of app fcf446e9-4a89-4d56-b3ae-def1bab41ac2_d824bndbbbqn4!App failed with error: This app does not support the contract specified or is not installed. See the Microsoft-Windows-TWinUI/Operational log for additional information. So where can you find the “Microsoft-Windows-TWinUI/Operational“ log? Expend “Application and Services Logs” folder, Microsoft –> Windows –> Apps...

BackgroundExecutionManager.RequestAccessAsync() Element not found.

Working on Background Task for Windows Store app I faced a annoying issue, while calling: await BackgroundExecutionManager.RequestAccessAsync(); I’ve received the following error: The problem was I put BreakPoint before the line, once I’ve removed the breakpoint below that line everything works just fine. I don’t know why this is happening but this is how I “Solved” the problem. Enjoy