As we had several inquiries about how to build up a OpenUI5 application in a Windows Phone hybrid app recently, we have investigated a bit in that area. You may have heard that there is a problem regarding restrictions with Windows Store Apps and several JavaScript libraries. Unfortunately OpenUI5 is one of them.
But nevertheless, we figured out a way you should be able to run a OpenUI5 application in a hybrid container on Windows Phone 8.1. As an example I will describe a way you can achieve that when using Visual Studio 2013 (express should do it). Prerequisites are at least Windows 8.1 as operating system, Node.js and the Windows Phone SDK 8.1 installed. The Visual Studio installation should prompt you for those parts. Additionally you need a version of the OpenUI5 Runtime Mobile (which you may get from OpenUI5 - Download). It should work with all versions 1.28.11 and higher.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>UI5CordovaApp</title>
<!-- Cordova reference, this is added to your app when it's built. -->
<script src="cordova.js"></script>
<script src="scripts/platformOverrides.js"></script>
<script src="scripts/index.js"></script>
<script src="./ui5/resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.m"
data-sap-ui-theme="sap_bluecrystal"></script>
<!-- only load the main library "sap.m" and the Blue Crystal theme -->
<script>
var btn = new sap.m.Button({
text: 'Hello World',
press: function () {
navigator.notification.alert("Hello");
}
});
btn.placeAt('content');
</script>
</head>
<body class="sapUiBody">
<div id="content"></div>
</body>
</html>
Note:
Please be aware of the fact that Microsoft changed their app format for Windows Phone. While for Windows Phone 7 and 8 XAP was the default file type it is now the file type APPX. This article above describes how a OpenUI5 app can be packaged as so called Universal App with file type APPX. These apps work on Windows Phone 8.1 but will not work on later Windows Phone Mobile operating systems.
Further information can be found here:
https://en.wikipedia.org/wiki/XAP_(file_format)
https://en.wikipedia.org/wiki/Metro-style_apps#APPX
If you experience any issues please let us know (Issues · SAP/openui5 · GitHub). For any further information regarding Cordova and its plugins check out Apache Cordova API Documentation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
10 | |
10 | |
10 | |
8 | |
7 | |
7 | |
7 | |
7 | |
6 |