Page 1 of 1
(RDMLX) Windows 10.1 Issues
Posted: Fri Dec 04, 2015 8:46 am
by edwardtn
I understand the LongRange JavaScript API in the Windows 10.1 app is still in Beta, but wanted to list the issues I am having and ask some questions:
1. When using an RDMLX local objects generator to hide the application title bar (#COM_OWNER.Set Property('/SysStates.HideTitleBar') To(True)). In the Windows 10.1 app, the title bar is still visible.
2. In a windows WebView, I cannot seem to store and retrieve cookies (I am able to do so in the iOS/Android apps).
Is this an issue with the Windows App WebView component security? Is this something I will need to code around?
3. Attempting to use the JavaScript API and having trouble with using:
LONGRANGE.Form.runOperation{operation:{type:GetGeolocation}}
LONGRANGE.Camera
LONGRANGE.BarcodeScanner
LONGRANGE.Audio
Will there be full support for these API's in a future release? Is there a definitive schedule for future releases?
Our app is intended for a BYOD user-base so we are keen to test on as many platforms as possible.
Thanks in advance!
Edward
Re: (RDMLX) Windows 10.1 Issues
Posted: Fri Dec 04, 2015 1:47 pm
by tsupartono
Hi Edward,
1) The latest version on the Windows Store (version 1.18.1.8) includes a fix for this, so if you could download this version and try again?
2) Based on our testing, we have no problem setting & retrieving cookies. Can you provide more details on how you are setting & retrieving the cookies?
3) The JavaScript API on Windows currently works only on HTML resources (the HTMLs that reside in the LongRange's resource folder, and the Web View URL on LR Studio is set to just the name of the HTML, e.g. Employee.html, as opposed to say
http://myserver/Employee.html).
We are currently working on completing the JavaScript API support in LR for Windows, and it should be generally available mid Q1 2016.
I will provide you with test versions once it is stable enough for general testing.
Re: (RDMLX) Windows 10.1 Issues
Posted: Sat Dec 05, 2015 1:36 am
by edwardtn
Hi Tony,
1. I will try out the new version and post an update.
2. Here are the functions I use globally to get/set cookies:
Code: Select all
function setCookie(cookieName, cookieValue, expireDays) {
var expireDate = new Date();
expireDate.setTime(expireDate.getTime() + (expireDays * 24 * 60 * 60 * 1000));
var expireDateUTC = "expires=" + expireDate.toUTCString();
document.cookie = cookieName + "=" + cookieValue + "; " + expireDateUTC;
}
function getCookie(cookieName) {
cookieName += "=";
var cookieArray = document.cookie.split(';');
for(var i = 0; i < cookieArray.length; i++) {
var thisCookie = cookieArray[i];
while (thisCookie.charAt(0) == ' ') thisCookie = thisCookie.substring(1);
if (thisCookie.indexOf(cookieName) == 0) {
return thisCookie.substring(cookieName.length, thisCookie.length);
}
}
return "";
}
3. I am using local HTML file located in the app resources folder...I will check the value of location.href, but I assume it to be something akin to "file:///<application path>/app/resources/page.htm".
Thanks,
Edward
Re: (RDMLX) Windows 10.1 Issues
Posted: Sat Dec 05, 2015 3:21 am
by edwardtn
Hi Tony,
I downloaded the latest version from the Windows App Store and the application title bar is now hidden.
Thanks,
Edward
Re: (RDMLX) Windows 10.1 Issues
Posted: Tue Dec 08, 2015 3:57 pm
by tsupartono
Edward, a follow-up to your cookie issue in LR Windows.
I can replicate the problem when executing the HTMLs are resources, and there doesn't seem to be any workaround that I know of.
If feasible, my suggestion would be to use HTML5 local storage instead (which should work on all 3 platforms).
Let us know your thoughts.
Code: Select all
function setLocalStorage(key, value)
{
window.localStorage.setItem(key, value);
}
function getLocalStorage(key)
{
return window.localStorage.getItem(key);
}
Re: (RDMLX) Windows 10.1 Issues
Posted: Thu Dec 10, 2015 12:54 am
by edwardtn
Thanks again, Tony. I changed my functions to use local storage and tested on all platforms and it works as expected. I had researched and found an article that said the Windows App WebView component uses the Internet Explorer browser engine and it does not allow cookies for local domains...so I don't believe there is a workaround either. In this case (not having to support older browsers), local storage is a much better solution.
Regards,
Edward