code: private void initKeepAlive()
      {
          if (!this.keepAlive) {
              this.keepAlive = true;
              final KeepAliveTask keepAliveTask = new KeepAliveTask(EFapsApplication.get().getApplicationKey());
              final Timer timer = new Timer(true);
              // every two minutes
              timer.scheduleAtFixedRate(keepAliveTask, 0 * 1000,
                              Configuration.getAttributeAsInteger(ConfigAttribute.WEBSOCKET_KASP) * 1000);
          }
      }
docs: Init the KeepAlive mechanism.