Results 1 to 7 of 7

Hybrid View

  1. #1
    Senior Member
    Join Date
    Jul 2013
    Posts
    39

    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 08:02 AM.

  2. #2
    Senior Member
    Join Date
    Jul 2013
    Posts
    39
    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,

  3. #3
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    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

  4. #4
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    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

  5. #5
    Senior Member
    Join Date
    Jul 2013
    Posts
    39
    Very glad to hear that. Please test for WP8.1 by the way. Thank you!
    Last edited by tvhnet2013; June 3rd, 2014 at 07:01 PM.

  6. #6
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    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.

  7. #7
    Senior Member
    Join Date
    Jul 2013
    Posts
    39
    It works fine. Thank you very much!

 

 

Similar Threads

  1. com.lightstreamer.i.jc cannot be cast to java.lang
    By ddhanis in forum Adapter SDKs
    Replies: 4
    Last Post: March 4th, 2009, 09:19 AM
  2. Item Names cannot be empty
    By d.verzolini in forum Client SDKs
    Replies: 2
    Last Post: September 22nd, 2008, 11:34 AM
  3. Cannot connect to 6661,2,3 ports
    By ap7256 in forum Adapter SDKs
    Replies: 3
    Last Post: October 23rd, 2007, 11:02 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 10:12 AM.