@Override
 public void onActivityPaused(Activity activity) {
   Adjust.onPause();
 }
  @Override
  public void onCreate() {
    LoggingUtil.v("Called SpilSDKApplication.onCreate()");

    try {
      Class.forName("android.os.AsyncTask");
    } catch (Throwable ignore) {
      // ignored
    }

    // Crash Reporting
    ACRA.init(this);
    CrashReportUtil crashReportUtil = new CrashReportUtil();
    ACRA.getErrorReporter().setReportSender(crashReportUtil);

    super.onCreate();

    // Google Analytics
    getDefaultTracker();

    // Adjust
    try {
      String appToken = SpilConfig.getInstance(this).getAdjustAppToken();
      String environment;
      if (SpilConfig.getInstance(this).isDebugModeEnabled()) {
        environment = AdjustConfig.ENVIRONMENT_SANDBOX;
      } else {
        environment = AdjustConfig.ENVIRONMENT_PRODUCTION;
      }

      if (appToken != null) {
        if (!appToken.isEmpty() || appToken.length() > 0) {
          LoggingUtil.d("Enabling Adjust");
          AdjustConfig adjustConfig = new AdjustConfig(this, appToken, environment);
          Adjust.onCreate(adjustConfig);

          registerActivityLifecycleCallbacks(new AdjustLifecycleCallbacks());
        }
      }
    } catch (NoClassDefFoundError error) {
      LoggingUtil.e(
          "Spil Adjust Module not included! If you want to use Adjust please include the spilsdk-adjust dependency");
    }

    try {
      String subdomain = SpilConfig.getInstance(this).getZendeskSubdomain();
      String appId = SpilConfig.getInstance(this).getZendeskAppId();
      String oauthClientId = SpilConfig.getInstance(this).getZendeskOauthClientId();

      if (subdomain.length() > 0
          && !subdomain.isEmpty()
          && appId.length() > 0
          && !appId.isEmpty()
          && oauthClientId.length() > 0
          && !oauthClientId.isEmpty()) {
        LoggingUtil.d("Enabling Zendesk");
        ZendeskConfig.INSTANCE.init(this, subdomain, appId, oauthClientId);

        Identity identity = new AnonymousIdentity.Builder().build();
        ZendeskConfig.INSTANCE.setIdentity(identity);
      } else {
        LoggingUtil.e(
            "Spil Zendesk Module initialisation failed! Please make sure you include all the necessary information in the 'defaultGameConfig.json' file (subdomain, appId and oauthClientId). ");
      }

    } catch (NoClassDefFoundError error) {
      LoggingUtil.e(
          "Spil Zendesk Module not included! If you want to use zendesk please include the spilsdk-zendesk dependency");
    } catch (NullPointerException error) {
      LoggingUtil.e(
          "Spil Zendesk Module initialisation failed! Please make sure you include all the necessary information in the 'defaultGameConfig.json' file (subdomain, appId and oauthClientId). ");
    }

    SpilSdk.resetContext();
  }
 @Override
 public void onActivityResumed(Activity activity) {
   Adjust.onResume();
 }