facebook

EventSource – html5 Support

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #328919 Reply

    Kasalop
    Member

    Hi guys,

    i’m using mobione 2.1 preview and tried to use the eventsource interface from html5 in my application for android and as a web application. But in both applications it didn’t work.
    The emulator doesn’t know EventSource, so all the tests have to be at the device (Samsung S2) directly. At the device i can’t debug helpfully.
    First I try to initialize the ES component in the phoneui.documentReadyHandler but I got a black screen, without seeing my formular or websurface. The next step was to load it in a seperat function and call it with a delay of two seconds with “setTimeout”: now I can see the surface but after that nothing happend. If I place an alert box before and another one behind the

    esObj = new EventSource('...');

    statement, the first alertbox appear, the second was never seen.

    What I want to know is: how can I use the eventsource interface in mobione. It seems like that it isn’t async (so I never see the results, because the connection will never terminated). Must I use a backgroundworker? or is there no support for EventSource, yet? Does anybody know a solution?

    Thank you so far.

    Best regards
    Kasalop

    #328953 Reply

    support-michael
    Keymaster

    @Kasalop

    At this time (MobiOne 2.1 and earlier ver) the Test Center does not support server-side events and websockets apis. We realize the importance of supporting these and other emerging html5 core apis. We are working to prioritize their inclusion in upcoming mobione versions.

    #328966 Reply

    Kasalop
    Member

    @Wayne:

    ok. No problem. But the application at the device have to work, I thought. so i want to know if the error is in the software or is in front of the computer (just me) 😉 I can’t figure out, because the debugging at the device is very hard. i tried to lookup if the EventSource class is defined and test this code:

    alert(EventSource);

    The messagebox show something like this: function EventSource() { [native code] }
    I think its already implemented, but it doesn’t work?!

    With best regards
    Kasalop

    EDIT: I have a general question too. How do you parse the html and interpret the javascript code? Do you use an own interpreter, or do you use the buildin browser-engine of the devices? In the second case there is a problem: http://caniuse.com/eventsource there is no support for that yet in android.
    EDIT2: ok. I figured out that you use the internal android borwser. Now I installed Opera Mobile and now it works (with a little error, but I think, I can do a workaround). But its very uncomfortable that all my users have to install the Opera browser. I think about to write my own ES class.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: EventSource – html5 Support

You must be logged in to post in the forum log in