1 Reply Latest reply on Jun 14, 2017 6:21 AM by Polgar Balazs

    Using the Network module properly

    Polgar Balazs

      Hi everyone,


      I'm relatively new to SB1 development and I'm currently working on an SB1 application which can remain functional without a Wi-Fi connection and save its data into a local web database. I'm trying to base the synchronization between the local database and the backend on the RhoElements 2 Network Module as suggested in the Programmer's Guide. I'm following the RhoElements documentation:



      Here are the relevant code snippets:

      function initNetwork(){

          network.networkEvent = 'networkEvent(%json)';

          network.host = '';

          network.port = '8085';




      asl.events.subscribe("onloaded", function() {





      function networkEvent(jsonObject){

           var connectInfo = jsonObject.connectionInformation;

           generic.Log('Connection Info: ' + connectInfo, 1)



      But for some reason my app does not receive any callbacks from the network module at all. And also there is no sign of any related messages in the device log. Could you please help me with this issue? I'm not sure in which direction should I continue my code inspection.



      Balazs Polgar