-
May 31st, 2014, 06:22 AM
#1
LS cannot connect in phonegap-winphone app
Hi,
I use LS javascript sdk in my app that is built for winphone 8+ by phonegap (cordova).
When I test with desktop browser, it works fine.
When I test with IE mobile in winphone 8, it works fine.
It also works fine as Android app (wrapped by phonegap).
But when I run app wrapped by phonegap in my winphone device, it cannot work.
After investigation, I found this command does not work: LightStreamerClient.connect();
There is no error, no exception, no log message.
Looking into html page elements, I found that LS cannot append its <iframe> tag into page body as normal.
My device is Nokia Lumia 520, windows phone 8.0.10517.150.
I use Lightstreamer 5.1.1 build 20140310 Moderator.
I use Weinre to see log message and inspect html elements.
Cordova 3.5.0
How do I solve it? Thanks in advance.
Last edited by tvhnet2013; May 31st, 2014 at 07:02 AM.
-
May 31st, 2014, 04:17 PM
#2
I tried your demo here: http://blog.lightstreamer.com/2012/0...negap-app.html.
Just download and build winphone app using PhoneGap Build service.
Running the app in my winphone device (Nokia Lumia 520, WP8), it shows DISCONNECTED in the second line.
And all three buttons are not working (nothing happens when tap on).
Can LS javascript SDK run in winphone-phonegap app?
Thanks,
-
June 3rd, 2014, 10:40 AM
#3
Hi,
I'm not sure why it does not work on WP8 but I see that phonegap is now on version 3.x while the demo was using version 2.x
Before digging in the issue I'm going to port the demo to the latest version, hopefully that alone will solve the issue, otherwise we will try and find a fix.
I'll keep you posted
-
June 3rd, 2014, 04:43 PM
#4
Hi,
it looks like that just reading the document.domain property while in a WP8 phonegap application generates an exception. This makes the library fail to connect.
I made a quick test by replacing in the minified file document.domain accesses with "document.domain" strings and the app was able to connect in HTTP-STREAMING mode.
HTTP-STREAMING was not the expected connection type, so I had to dig a little bit more and I was able to make it connect over websockets by fixing a test on the library
I'm going to properly patch the library today or tomorrow and I'll let you have the patched version to test if that's ok for you.
HTH
-
June 3rd, 2014, 05:05 PM
#5
Very glad to hear that. Please test for WP8.1 by the way. Thank you!
Last edited by tvhnet2013; June 3rd, 2014 at 06:01 PM.
-
June 4th, 2014, 12:32 PM
#6
Hi,
I sent you a private message containing a link to a patched version of our JavaScript library.
I also upgraded our demo app on github: https://github.com/Weswit/Lightstrea...lient-phonegap
please get back to me if you still have issues.
-
June 7th, 2014, 03:51 AM
#7
It works fine. Thank you very much!
Similar Threads
-
By ddhanis in forum Adapter SDKs
Replies: 4
Last Post: March 4th, 2009, 08:19 AM
-
By d.verzolini in forum Client SDKs
Replies: 2
Last Post: September 22nd, 2008, 10:34 AM
-
By ap7256 in forum Adapter SDKs
Replies: 3
Last Post: October 23rd, 2007, 10:02 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 10:24 AM.
Bookmarks