Android Open Source - GADemoGTM Container Holder Singleton






From Project

Back to project page GADemoGTM.

License

The source code is released under:

GNU General Public License

If you think the Android project GADemoGTM listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.pdro.gademogtm.gtm;
//w  w  w.  j a va2  s.com
import com.google.android.gms.tagmanager.ContainerHolder;

/**
 * Singleton to hold the GTM Container (since it should be only created once
 * per run of the app).
 */
// todo ensure that the implementation of this class matches what's in the dev doc guides
public class ContainerHolderSingleton {
    private static ContainerHolder containerHolder;

    /**
     * Utility class; don't instantiate.
     */
    private ContainerHolderSingleton() {
    }

    public static ContainerHolder getContainerHolder() {
        return containerHolder;
    }

    public static void setContainerHolder(ContainerHolder c) {
        containerHolder = c;
    }

    public static void refreshContainer() {
        containerHolder.refresh();
    }
}




Java Source Code List

com.pdro.gademogtm.MainActivity.java
com.pdro.gademogtm.MessageActivity.java
com.pdro.gademogtm.SplashScreen.java
com.pdro.gademogtm.gtm.ContainerHolderSingleton.java
com.pdro.gademogtm.gtm.Utils.java
com.pdro.gademogtm.tools.ColorWheel.java
com.pdro.gademogtm.tools.FactBook.java