DCSIMG
JavaScript,Metro - Shai Raiten's Blog

Shai Raiten's Blog

It's all about code...

Browse by Tags

All Tags » JavaScript » Metro (RSS)
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...
How To: Keep Windows 8 Device Screen On While User Away
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...
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...
Link To Windows Store App From Web Sites
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 PDP - Open an app listing page...
Creating Windows Store App Using PhoneGap (Cordova)
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...
Windows Store App - Resize Image (JavaScript)
In this post I’ll demonstrate how to change picture size using JavaScript while constraining the image proportions. Resize image functionality can be used in several scenarios in Windows Store app, for example: if your app allow the user to download images from the web you might want to resize the image to reduce space usage. Also if you whish to share this image using Roaming Storage you need to make sure the image size is small enough so the Roaming sync will not failed. The first steps for this...
Windows 8 Metro – Code Behind
When I develop Windows 8 Metro App I usually use Windows Store app samples to see code examples features but sometimes you want more… For example I really want to know how “Mail” metro app works: How getting access to other email account, sending email and more. So in order to to that I had to gain access to “Mail” metro app… Let’s start the Hack: Problem: WindowsApps folder is blocked and by default you can’t open this folder. Solution : First open Windows Explorer and navigate into “C:\Program...
Using Live SDK in Windows 8 – JavaScript
In my previous post I talked about Using Live SDK in Windows 8 – C# , now it’s time to see how you can do the same things using JS. Live SDK provides a set of controls and APIs that enable applications to integrate single sign-on (SSO) with Microsoft accounts and access information from SkyDrive, Hotmail, and Windows Live Messenger on Windows Phone and Windows 8. Live SDK support several platforms such as: iOS, Android and of course Windows Phone and Windows 8 applications using C# and JS. In this...
Windows 8 RTM JavaScript – FlipView Control
Tweet Windows 8 Metro App has couple of wonderful ways to display data, the more common way is Grid and Split Application Template. (You can read more about Windows 8 Project Templates - Windows 8 JavaScript Metro Application–Getting Started ). But there are several other ways to display information, in this post I’ll demonstrate a FlipView control, that represents an items control that displays one item at a time, and which enables "flip" behavior for traversing its collection of items...
Windows 8 RTM JavaScript–Change Lock Screen Image
Tweet In the past couple of months I’ve worked a lot with Windows 8 JavaScript and C#, I’ve also wrote plenty of posts on that subject and there is much more stuff to talk about. In this post I’ll show two things: Using File Picker using JavaScript Change Windows 8 Lock Screen Image Programmatically Download Demo Project Step 1: Create Blank JavaScript Project In the app.onactivated function we add the following code to listen the Choose Picture button and calling the displayCurrentImg function....
How To: Bing Maps Custom Tile Overlay - Google Maps
Tweet I got a question from a friend who wanted to replace Bing Maps Tiles with Google Maps Tiles . You might ask yourself why? If you want Google Tiles just replace Bing Control and work with Google Maps…..  In this case I want to work with Bing Map Control because the benefits I get in Metro Applications in Windows 8 for C#, C++, VB.NET and JavaScript.  And I also want Google Maps language support . Download Demo Project Currently Bing Maps doesn't support any language except English...
How To: Bing Maps For Windows 8 Metro Apps - JavaScript
In my last post I talked about Bing Map for C# , but you can also do the same of JavaScript projects using Bing Maps SDK. Download Demo Project Step 1: Maps Developer Account Before you can use Bing Sdk from Windows 8 Metro App you need Maps Developer Account, open http://www.bingmapsportal.com/ , create or enter with existing Windows Live account. Choose “ Create or view keys ” and create new Key for your application. Step 2: Create Bing Maps Metro Application Download the latest bits - Bing Maps...
Upgrade Metro App From Beta To RC
In my previous post Convert VS 11 Beta Metro Projects To VS 2012 RC I talked about upgrading the Project file from Beta to RC, in this post I’ll try to talk about all changes made from Beta to RC. I don’t know all the breaking changes in JavaScript and C# but I collect all the breaking changes from the application and games I develop and I’ll show them here. JavaScript + HTML Type Old Value New Value Comment Event MSGestureTap onclick   Event MSGestureHold oncontextmenu   Method getPointerList...
Convert VS 11 Beta Metro Projects To VS 2012 RC
Over the last months I’ve worked a lot with Windows 8 Metro applications, from Consumer Preview to Preview 2 and now to RC. When working on Beta versions you know that you have to upgrade your app when RC or RTM versions will published, and sometime those upgrades can take a while… So this is the first part of upgrading your Project from Visual Studio 11 Beta to Visual Studio 2012 RC, in my next post I’ll talk about code Changes from Beta to RC both for C# and JavaScript. JavaScript For JavaScript...
Windows 8 - DEP0600 : The following unexpected error occurred during deployment
Tweet While working on JavaScript Game in Windows 8 I got the below error when trying to run it from Visual Studio 11: Error : DEP0600 : The following unexpected error occurred during deployment: Illegal characters in path.    at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)    at System.IO.Path.Combine(String path1, String path2)    at Microsoft.VisualStudio.ImmersiveProjectServices.Shared.AppxLayoutManager.CheckPackageLayoutState(DeployPackageName...
More Posts Next page »