code: public static void registerSubscription(Subscription subscription) {
          mSubscriptions.add(subscription);
          if (isConnected()) {
              executeQuery(subscription.getQuery());
          }
      }
docs: Register subscriptions