Page 1 of 1 in the WindowsPhone8 category
# Sunday, 29 June 2014

I was working on a test game using Unity3D v4.5 when I bumped into a few quirks here are some quick notes so you don't need to scratch your head like I did.

How Do I Get Rid Of 'Developement Build' Text?


One of the strangest thing is the word developement text that's constantly hovering on the lower right corner of your game EVEN if you set Unity to NOT build a developement build, even if you compiled your Windows Phone app in RELEASE mode. The fix was simple enough, you set the build configuration to MASTER mode.


I did a quick scan of the build settings but I couldn't find any difference between Release and Master but it works interestingly enough.

Why Is The Windows 8.1 Visual Studio Project Meant For ARM Processors?

Trying to run the Windows 8.1 (and possibly the Windows 8.0 one as well) Store project built by Unity will give you this error

Error : DEP0700 : Registration of the app failed. Windows cannot install package SappyUnity because the package requires architecture ARM, but this computer has architecture x64. (0x80073cf3)   

For those of you unfamiliar with the ARM term, that's the processor used in devices like Windows Phone, iOS, Android and also Windows RT based devices. The processor you are running Visual Studio and Windows on is x86 so you'll need to do a quick switch so you can run and debug the app on your local machine.

Select Build-> Configuration Manager


Then in the configuration screen that appears, select x86 from the drop down on the top right.


Note that you also have to change the configuration to Master to remove the "Development Build" text from the screen. And also when you're building for the Windows Store you need to build BOTH an x86 and an ARM version so that you can have the widest potential audience coverage.

Lock Your Windows 8.1 App Orientation

By default the generator Windows Store app by Unity doesn't lock your app to a preferred orientation, so do remember to open up your Package.appxmanifest file and lock your app to landscape or portrait orientation depending on your requirements.



It's soooooo easy to make games in Unity, you drag some objects onto the scene, you attach some behaviours, press the RUN button a few times to debug your game. And all is good! Then something causes Unity to crash, you restart Unity and you find yourself staring at a BLANK SCENE!!! But all your assets like scripts, prefabs, etc. etc. are all ok.

This is because unlike working in a compiled system like Visual Studio, work files such as opened scene files aren't saved in Unity when you hit the RUN button.

So do remember to SAVE OFTEN!!! Lest you lose ALL of your work because of some accident!

Sunday, 29 June 2014 09:52:50 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Tuesday, 10 June 2014

After making a free app like my M2 Sony Camera Remote app sometimes as a developer even though it's free. It'd be nice if there was some avenue for getting paid by our users if they so wish to show their appreciation.

Some of you might say that a good way is to use In App Ads, but I really hate the ad systems that are out there which most people use especially on games that my son plays on the phone or iPod touch. Frequently you see many inappropriate, non family friendly ads.

So, to that end, I resort to using the In App Purchasing system offered to me by the Windows Store. And here's the presentation and sample code which I did on Malaysia's //Publish/ day event.

Check it out here.

Tuesday, 10 June 2014 23:38:43 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Thursday, 13 February 2014

Ever had this need to decipher a string to HEX form on the go? Or maybe you need to answer a client's email on how exactly to type out the value for the URL Encoded Query String while you're enjoying a movie with your significant other? Can't remember all the HEX values for a particular string? No problem, with M2StringToolkit you can freely convert between several formats easily. Currently supports the following encoding types with more to come!

  • Base64
  • URL
  • HTML
  • Javascript
  • HEX

Get it for your Windows Phone 8 device today!


Thursday, 13 February 2014 10:24:23 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Friday, 08 March 2013

The Nokia Cinemagraph program on my Nokia Lumia 920 allows me to make interesting animated GIF files, while interesting GIF files don’t share very well currently. It would have been better if it was a more widely used MP4 file. So once again I break out the old FFMPEG and made a simple front end for the express purpose of converting a GIF file to MP4.


You’ll need to copy the GIF file to you PC before you can work on it, and before you ask. YES, I realize that it would have been better if this could be done on the phone itself but I haven’t found any thing to help me achieve that yet. Maybe Nokia will realize we’d like to be able to share our animated Cinegraphs through social media easily and built it into the next update.

But for now you can download the program here : M2SimpleGIF2MP4 

Unzip into a folder and run the M2SimpleGIF2MP4.EXE, should be pretty obvious how everything works. And here’s a sample.

Embarrasing Note : So.. after I did all this, then only I figured out where the share function in the Cinemagraph app is hidden, WTF indeed, Nokia should make the button more visible! Smile with tongue out

Friday, 08 March 2013 00:08:10 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Sunday, 03 March 2013

If you’re a web developer, and you’ve been making web sites for mobile devices you’ve no doubt come across using this META tag to control the width of the browser’s view window.

<meta name="viewport" content="width=800" />

Given the snippet above, the window would be constrained to a pixel width of 800 pixels. If you don’t know how this works, basically it’s like resizing your desktop browser window to 800 pixels, since the user can’t do such a thing on a mobile phone browser you as the content provider would need to do it.

In any case, pretty much all modern mobile web browsers would support the use of this to control the viewport window width. And of course, so does Internet Explorer 10 for Windows Phone 8. Kind of…

It’s not that IE10 doesn’t support the use of the viewport meta tag. But rather it’s limited in what can be supported. From my testing you are able to set the viewport width to these values using the viewport meta tag:- 240 (Will be resized to 320), 320 and 480.

Setting the width to any value other than those mentioned would result in the default width of 1024 to be used, and that’s not what you want!

So? Is all hope lost if you need to set a arbitrary width value for your viewport in IE10? Is it time to add to the #iesux hash tag archive?!


While we can’t have full control over the viewport width using the META tag, we can use another method which is through the use of the CSS device adaptation features. Basically you just need to include in your css file somewhere a directive like this.

<style type="text/css">        
    @-ms-viewport {
        width: 550px;

No no no, put your pitch forks back down this is not a Microsoft only feature, the MS prefix is just to indicator that it’s still a vendor specific extension like how box-shadow and border-radius used to have it. See.. here’re the W3C specifications for this.

Anyway, with this you will be able to set the viewport to any value which you want. Therefore when you want to set a viewport width and make sure it works with all mobile browsers you would make your page contains something like this.

<meta name="viewport" content="width=550" />
<style type="text/css">
@-ms-viewport { width: 550px; }

Anyway here are a few more notes regarding this viewport setting.

When doing testing on your Windows Phone with different viewport values, don’t just REFRESH the page whenever you update the viewport value. Usually the phone doesn’t respect the new viewport value when you just do a refresh, best to close the tab and open the URL from a new tab.

Internet Explorer 10 on Windows 8 (not phone, the actual PC version) in both Metro and Desktop modes will actually respect the @viewport value. Just remember that the Metro IE has it’s zoom level turned up a bit by default. The fact that a PC browser actually respects the @viewport directive could lead to some interesting applications.

Finally I find it funny that the compatibility repository Can I Use doesn’t seem to have an entry for @viewport wonder if it’s because it’d bad to show MS actually being ahead of everyone else in supporting something. Smile with tongue out

Sunday, 03 March 2013 10:55:30 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Friday, 19 November 2010

Today news broke that you can access your Windows Phone 7’s storage folders from this webpage, most sites referred to this as Portable USB drive access. They also wondered about the usefulness of this USB drive method since even if you COULD copy say… a DOC file into a folder, you couldn’t access it in the Office app on the phone. For that you could use my webserver method.

But I recognized what the folders were (Me and the other 10 people who used a Powered By Windows Media PMP device :P) The folders you see when you browse to the device…


These are the MEDIA FOLDERS, From my experience Windows Media powered PMP would have folders like this and used this structure to hold it’s contents.

So it’s a simple way to move media around, big deal you say. But here’s the thing that interested me the most.


Remember that you can already copy video files to the device using the Zune application, but unless your file satisfied certain parameters the Zune application will reencode the file to the WMV format before copying it to the device.

But… when you attempt to copy a file into the video folder directly through Explorer you get this dialog instead.


So you can choose to drop the file onto the phone WITHOUT ANY REENCODING!

Now that I could copy video files into the phone directly what’s left was to find out what kind of codecs were supported. Microsoft provides a nice little list here. But I’d be lying if I’d say I knew what’s the difference between the various different profiles of MPEG4. ;) Anyway what’s missing on the list is.. AVI file container support.

Quick primer for those of you who are unfamiliar with how video files work. A video file consists of a container which has multiple streams and each stream might contain data using various codecs. A typical AVI file you download off the Internet would be using the AVI container format, and has 2 streams, a video stream using the MPEG4 codec (or more commonly known as XVID), and an audio stream using the MP3 codec.

The problem here is that because Windows Phone 7 doesn’t support reading of AVI containers, it means that we are unable to just drop AVI files onto the phone. Based on my experience and testing when making my Simple Webserver, I know that MP4 Containers ARE supported and usable.

So now we have a problem, we have a container (AVI) which can’t be read by Windows Phone 7 but it contains streams MPEG4 and MP3 which CAN be used by Windows Phone 7. So the question was, how do we get the streams into a MP4 container WITHOUT having to go through any reencoding?

Enter the swiss army knife of video tools : FFMPEG

With FFMPEG it’s easy to copy streams from one container to another, with a simple command line of

ffmpeg –I inputfile.avi –vcodec copy –acodec copy output.mp4

The streams from inputfile.avi will be copied over to output.mp4 WITHOUT wasting time reencoding. Once processed you can then drop the MP4 file onto your phone and hopefully it’ll play properly (Remember, there are various other settings for MPEG4, and the phone doesn’t support all of them)

What’s that you say? You don’t know how to use the command line? How about this then?


It’s a VERY simple frontend to FFMPEG, you click on Pick Source to pick your source file. A quick analysis is done, and the program will tell you the state of the file. The destination file is entered automatically if possible, if not click Pick Destination for the output filename. (Be sure to enter a filename with the MP4 extension) Then click GO to start processing. Once it’s done copy the file over to your phone and try it out.

You can grab the M2RecontainInMP4 Program here. (I packaged the FFMPEG executable with it… I’m pretty sure I violated something in the licensing by doing so)

Things to note :-

  • It’s not a PERFECT process, sometimes some artifacts will appear
  • Renaming and deleting video files in Explorer seems to have WEIRD results, I think it’d be best if you don’t rename files on the device through Explorer. And to delete files, tap and hold on them in the Music & Videos app on your phone.
  • I haven’t gotten a H.264 video codec file to play properly, so.. good luck with the files you have.
  • This is a VERY VERY EASY hole for Microsoft to patch up. Let’s hope they don’t!

Friday, 19 November 2010 00:13:42 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
Page 1 of 1 in the WindowsPhone8 category