title: Android Google Tag Manager v4 ContainerLoadedCallback
body: <p>I am trying to implement Google Tag Manager by following the tutorial on this web page:</p>
  
  <p><a href="https://developers.google.com/tag-manager/android/v4/#init" rel="nofollow">https://developers.google.com/tag-manager/android/v4/#init</a></p>
  
  <p>But i cant seem to find what the ContainerLoadedCallback should do or where the source of this class is located. any help is greatly appreciated</p>
  
  <p>What i currently have in my splash screen activity is the following:</p>
  
  <pre><code>        PendingResult&lt;ContainerHolder&gt; pending =
                  App.getTagManager().loadContainerPreferNonDefault(C.Const.GTM_CONTAINER_ID,
                          R.raw.gtm_default_container);
  
          // The onResult method will be called as soon as one of the following happens:
  //     1. a saved container is loaded
  //     2. if there is no saved container, a network container is loaded
  //     3. the request times out. The example below uses a constant to manage the timeout period.
          // The onResult method will be called as soon as one of the following happens:
          //     1. a saved container is loaded
          //     2. if there is no saved container, a network container is loaded
          //     3. the request times out. The example below uses a constant to manage the timeout period.
          pending.setResultCallback(new ResultCallback&lt;ContainerHolder&gt;() {
              @Override
              public void onResult(ContainerHolder containerHolder) {
                  ContainerHolderSingleton.setContainerHolder(containerHolder);
                  Container container = containerHolder.getContainer();
                  if (!containerHolder.getStatus().isSuccess()) {
                      Log.e("CuteAnimals", "failure loading container");
  
                      return;
                  }
                  ContainerHolderSingleton.setContainerHolder(containerHolder);
                  ContainerLoadedCallback.registerCallbacksForContainer(container);
                  containerHolder.setContainerAvailableListener(new ContainerHolder.ContainerAvailableListener() {
                  });
                  startMainActivity();
              }
          }, 2, TimeUnit.SECONDS);
  </code></pre>