Я пытаюсь реализовать Диспетчер тегов Google, следуя учебник на этой веб-странице:Android Google v4 Диспетчера тегов ContainerLoadedCallback
https://developers.google.com/tag-manager/android/v4/#init
Но я не могу показаться, чтобы найти то, что ContainerLoadedCallback должен делать или где источник этого класса. любая помощь очень ценится
Что я в настоящее время в моей заставке деятельности является следующее:
PendingResult<ContainerHolder> 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<ContainerHolder>() {
@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);
Что такое 'increment', 'mod' в registerCallbacksForContainer()? – sandeepmaaram