IBM MobileFirst apps on WindowsPhone 8.1 Update 1

Last year, Microsoft released Update 1 for Windows Phones 8.1, also known as GDR1. While initially, this update was available only on device that were shipped new and for those with had the Preview for Developers installed, later on the update proliferated to almost all of the Lumia models. Known as the Denim update for Lumia phones, it was a major update with several changes to Internet Explorer that comes bundled with the OS.

With this update of Windows Phone, we at IBM had to make some changes to have MobileFirst applications run smoothly on Windows Phone 8.1 Update 1. Here is a list of things you might have to be cognizant of if you have your apps running on Windows Phone 8.1 Update 1.

  • APAR PI31804
  • Title: WINDOWS PHONE 8 APPLICATIONS CANNOT CONNECT TO WORKLIGHT SERVER 6.1 ON WINDOWS PHONE 8.1 UPDATE 1 Resolution: Ensure to have the latest iFix installed.

  • APAR PI36918
  • Title: WINDOWS PHONE 8.1 IS BEING DETECTED AS IOS DEVICE ON MOBILEFIRST APPLICATION CENTER Resolution: If you're using the MobileFirst Application Center, then this APAR fix is an important one to ensure that your Windows Phone users get the correct version of applications hosted on Application Center.

    This issue was caused by a change in the User-agent string that is sent to the server by the Windows Phone device.

  • Rendering Google Maps
  • MobileFirst Hybrid apps displaying Google Maps have issues when the map is zoomed in and out. The final image is not rendered correctly. This was investigated to be a problem with the WebBrowser control provided by the operating system and IBM cannot provide a fix for this. However, by retargetting the application to Windows Phone 8.1, the issue is not seen. Retargetting the app will mean that the app will no longer be able to run on devices with Windows Phone 8.0.

  • Dojo
  • MobileFirst Hybrid applications will require some changes to the Windows Phone 8 environment. If you have any of your dojo code in your HTML tags, move it to your js files.

    For example, if you had the following code in your html

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    
    require([
    			"dojo/_base/connect",
    			"dojo/ready",
    			"dojo/_base/array",
    			"dojo/dom",
    			"dijit/registry",
    			"dojox/mobile/parser",
    			"dojox/mobile",
    			"dojox/mobile/compat",
    			"dojox/mobile/Button"
    		], function(connect, ready, array, dom, registry){
    			ready(function(){
    				array.forEach(["btn1", "btn2", "btn3", "btn4", "btn5"], function(btnId){
    					var btnWidget = registry.byId(btnId);
    					connect.connect(btnWidget.domNode, "click", onBtnClicked);
    				});
    			});
    			function onBtnClicked(){
    				var span = dom.byId("msgArea");
    				span.innerHTML = " + dom.byId(this.id).innerHTML + "quot; button was clicked.";
    				setTimeout(function(){
    					span.innerHTML = "";
    				}, 1000);
    			};
    		});

    Then, move it to your js/main.js .

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    
    function wlCommonInit(){
    	require([ "layers/core-web-layer", "layers/mobile-ui-layer" ], dojoInit);
    }
    function dojoInit() {
    	require([
    				"dojo/_base/connect",
    				"dojo/ready",
    				"dojo/_base/array",
    				"dojo/dom",
    				"dijit/registry",
    				"dojox/mobile/parser",
    				"dojox/mobile",
    				"dojox/mobile/compat",
    				"dojox/mobile/Button"
    			], function(connect, ready, array, dom, registry){
    				ready(function(){
    					array.forEach(["btn1", "btn2", "btn3", "btn4", "btn5"], function(btnId){
    						var btnWidget = registry.byId(btnId);
    						connect.connect(btnWidget.domNode, "click", onBtnClicked);
    					});
    				});
    				function onBtnClicked(){
    					var span = dom.byId("msgArea");
    					span.innerHTML = " + dom.byId(this.id).innerHTML + " button was clicked.";
    					setTimeout(function(){
    						span.innerHTML = "";
    					}, 1000);
    				};
    			});
    }

    Have you run your MobileFirst apps on Windows Phone 8.1 GDR 1 ? How did it work out for you ? We'd love to hear from you in the comments below.

    Inclusive terminology note: The Mobile First Platform team is making changes to support the IBM® initiative to replace racially biased and other discriminatory language in our code and content with more inclusive language. While IBM values the use of inclusive language, terms that are outside of IBM's direct influence are sometimes required for the sake of maintaining user understanding. As other industry leaders join IBM in embracing the use of inclusive language, IBM will continue to update the documentation to reflect those changes.
    Last modified on May 01, 2016