Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-19916

Android: HTTPClient ondatastream method responseText is empty for Android


    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 5.0.2
    • Fix Version/s: Release 5.2.0
    • Component/s: Android
    • Environment:
    • Story Points:
    • Sprint:
      2015 Sprint 25 SDK


      We have comet server which we receive updates. iOS version works but Android version responseText is empty which must not be the case. In iOS version ondatastream method receives ping items but Android does not receive.

      How to reproduce issue:
      There are two version app.js (long version)
      app_simplified.js (short version/ no need to send news to test it)
      use app.js code as attached.
      Use iOS simulator then test the service by using following url:
      send news update
      fill pass field:
      pass: murat123

      result is shown in the terminal : "its working" means ondatastream works. We sended a news and it cought in ondatastream method but Android gives runtime error because responseText is empty.

      [INFO] : TypeId:TestType
      [INFO] : notification:{"py/object":"NewsLib.DefaultNewsItem.DefaultNewsItem","readCount":0,"uid":"20150930141554","source":"TestSource","symbol":"EURUSD","dateTime":

      {"py/repr":"datetime/datetime.datetime(2015, 9, 30, 14, 15, 54, 430528)"}

      ,"thumbnailID":"http://www.forexsirketleri.org/uploads/destekfx-inceleme.png","header":"My Header","typeId":"TestType","keywords":["","usd","abd","eurusd","eur","euro b??lgesi"],"pretext":"pretext","isRefresh":false,"isDelete":false,"stocks":"","timestamp":1446207300000}
      [INFO] : its working!!!

      Now try same step with Android simulator there is no info print! ondatastream responseText is empty!

      I attached our comet service document for further explanation of comet service.

      Just run the code and see the response.




            • Assignee:
              msamah Ashraf Abu (Inactive)
              ceyhun Ceyhun Kazel
              Hieu Pham
            • Watchers:
              7 Start watching this issue


              • Created:

                Backbone Issue Sync

                • It looks like Backbone Issue Sync is not enabled for your project.

                  Git Source Code