Class NativeCore

java.lang.Object
com.transifex.txnative.NativeCore

public class NativeCore extends Object
The main class of the framework, responsible for orchestrating all functionality.
  • Field Details

    • TAG

      public static final String TAG
  • Constructor Details

    • NativeCore

      public NativeCore(@NonNull Context applicationContext, @NonNull LocaleState localeState, @NonNull String token, @Nullable String cdsHost, @Nullable TxCache cache, @Nullable MissingPolicy missingPolicy)
      Create an instance of the core SDK class.

      We initialize and set-up the rest of the SDK classes and enable ViewPump interception.

      Parameters:
      applicationContext - The application context.
      localeState - Keeps track of the available and current locales.
      token - The Transifex token that can be used for retrieving translations from CDS.
      cdsHost - An optional host for the Content Delivery Service; defaults to the production host provided by Transifex.
      cache - The translation cache that holds the translations from the CDS; TxStandardCache is used if set to null.
      missingPolicy - Determines how to handle translations that are not available; SourceStringPolicy is used if set to null.