Windows Phone 7

edited April 2012 in Packaging Apps
Does anyone have any experience working with Enyo+PhoneGap on Windows Phone 7?


  • We've only had a cursory look at Windows Phone 7 as a platform, but:

    * The original OS had an IE7 base, which we don't support (7.5 has an IE9 base).
    * CORS is not supported (no cross domain XHRs).
    * There are no touch events
    * When you put a finger down, you get a mouseup event while the finger is still down. This breaks dragging, scrollers, and a whole host of other things.
  • Darn, that's multiple deal-breaking issues. Have you only looked at the original OS? Do all these issues exist in 7.5? Are these issues with Enyo 1 or Enyo 2 (or both)?
  • These issues affect both versions of Enyo... we've generally only looked at 7.5, since the IE version in WP 7.0 was so inferior.
  • Darn. Thanks for the info.
  • +1 for getting Enyo to work on WP7 (someday). Thanks for the info guys!
  • If anyone wants to learn more about Windows Phone and PhoneGap, there's a hackathon in the Bay Ares on April 23rd - registration is at
  • edited April 2012
    ok, let me hijack this thread:

    I have a little enyojs 2 project (MathThis) which I would like to run on WP 7.5 too. I created my base app using PhoneGap's template and so far so good. Then I copied whole content of MathThis's src folder (the one with the index.html inside) into the www folder of the PhoneGap project and drag'n'dropped the files and folders into the project in Visual Studio. Everything seems to be on the right place.
    Next I altered my index.html to add some of the stuff from original PhoneGap project:
    <!doctype html>
    	<script type="text/javascript">
    		// provide our own console if it does not exist, huge dev aid!
    		if(typeof window.console == "undefined")
    		window.console = {log:function(str){window.external.Notify(str);}};
    		// output any errors to console log, created above.
    		console.log("window.onerror ::" + JSON.stringify(e));
    		console.log("Installed console ! ");
    	<script type="text/javascript" charset="utf-8" src="phonegap-1.4.1.js"></script>
    	<script type="text/javascript">
    		function onBackButton()
    		function onDeviceReady(e)
    		console.log("deviceready event fired!");
    		// our kind is reusable
    		console.log("new MathThis().write()");
    		new MathThis().write();
    		console.log("PhoneGap.addConstructor is working");
    	<title>Math This!</title>
    	<meta name='viewport' content='height=device-height'>
    	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    	<link href="enyo/enyo.css" rel="stylesheet" type="text/css" />
    	<script src="enyo/enyo.js" type="text/javascript"></script>
    	<!-- load the source package.js -->
    	<script src="package.js" type="text/javascript"></script>
    	<script type="text/javascript">
    		if (window.PalmSystem) {
    		// our kind is reusable
    		//console.log("new MathThis().write()");
    		//new MathThis().write();
    When I run it it gives some error messages about several files not written into the package. If I watch it deeper the following file type aren't written: png, json, jpg
    After this it starts and gives the expected log output from the index.html. Then it errors out with:

    ScriptNotify :: WinCE
    ScriptNotify :: deviceready event fired!
    ScriptNotify :: new MathThis().write()
    ScriptNotify :: Error in success callback: Connection2 = Object doesn't support property or method 'error'
    Even then it still recognizes when it goes tumbstoned:

    Has anyone any good inside for me? I will try to add the error function to the enyo object, maybe this is missing?
  • Don't use the write() method in a callback. Instead use renderInto(document.body).

    write() uses document.write and so you have to be careful with it.
  • Ok,

    got a developer device for WP7.5 and tried it out (lumia 800) with my app (minified). It's slow. Scrolling works ok. The biggest struggle is actually touch events. I usually just do "onclick" because that covers the most normal scenarios. But it's almost unuseable. I tried "ontap" and that works much better but still not very well. If I doubletap that works most consistently to register an ontap event or practically bang on the screen for a single tap. It responds fairly quickly once the event is registered but it seems like getting events to register is not working consistently. I deanimated panels and that helped some but again I think the animation would be ok if the events just registered properly. It's also confusing because you can tell the button is tapped (it highlights) but it evidently is looking for something else because if you don't double tap or bang hard it waits for a second and then cancels any event execution. Is this typical? Should I be doing something else?

Sign In or Register to comment.