### Monitor Database Operation Performance Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/08-feedback-apm-modules.md This example shows how to monitor a database query. It starts a trace, performs the query, calculates the duration and row count, and then ends the trace with custom metrics. ```java private void queryDatabase() { Countly.sharedInstance().apm().startTrace("db_query_users"); try { long startTime = System.currentTimeMillis(); SQLiteDatabase db = dbHelper.getReadableDatabase(); Cursor cursor = db.query("users", null, "active = ?", new String[]{"1"}, null, null, null); int rowCount = cursor.getCount(); cursor.close(); long duration = System.currentTimeMillis() - startTime; Map metrics = new HashMap<>(); metrics.put("rows_returned", String.valueOf(rowCount)); Countly.sharedInstance().apm().endTrace( "db_query_users", metrics, duration ); } catch (Exception e) { Countly.sharedInstance().apm().cancelTrace("db_query_users"); Countly.sharedInstance().crashes().recordException(e); } } ``` -------------------------------- ### Start a View Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/05-sessions-views-modules.md Starts tracking a view. Must be paired with stopView(). Returns true if started, false if already started. ```java public void startView(@NonNull final String viewName) ``` ```java @Override public void onResume() { super.onResume(); Countly.sharedInstance().views().startView("DetailView"); } ``` -------------------------------- ### Configuration Example Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/04-crashes-module.md An example demonstrating how to initialize the Countly SDK with crash reporting enabled and configure internal limits and crash filter callbacks. ```APIDOC ## Configuration Example ```java CountlyConfig config = new CountlyConfig(context, "app_key", "https://countly.example.com") .enableCrashReporting(); config.sdkInternalLimits .setMaxBreadcrumbCount(150) .setMaxStackTraceLinesPerThread(50); crashes.setGlobalCrashFilterCallback(new GlobalCrashFilterCallback() { @Override public void filterCrash(CrashData crashData) { if (isDevBuild()) { // Only report production crashes crashData.ignore(); } } }); ``` ``` -------------------------------- ### Complete Countly SDK Configuration Example Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/11-configuration.md A comprehensive example demonstrating how to initialize and configure the Countly SDK with various options, including logging, core functionality, sessions, events, consent, network, push notifications, remote config, star rating, and device ID. Also shows how to configure SDK internal limits and initialize the SDK. ```java CountlyConfig config = new CountlyConfig(application, "app_key", "https://countly.example.com") // Logging .setLoggingEnabled(true) // Core functionality .enableCrashReporting() .enableAutomaticViewTracking(true) .setAutoTrackingUseShortName(true) // Sessions .setSessionUpdateTimerDelay(120) // Events .setEventQueueSizeThreshold(50) // Consent .setRequiresConsent(true) .setEnableAllConsents(false) // Network .setHttpPostForced(true) .setRequestTimeout(60) .setMaxRequestQueueSize(2000) .setCustomNetworkRequestHeaders( Collections.singletonMap("Authorization", "Bearer token") ) // Push .initMessaging(Countly.CountlyMessagingMode.PRODUCTION, Countly.CountlyMessagingProvider.FCM) // Remote Config .enableRemoteConfigAutomaticDownloadTriggers(true) .enableAutoEnrollFlag(true) // Star Rating .setStarRatingSessionLimit(10) .setStarRatingTextTitle("Rate our app") .setStarRatingShowAutomatically(true) // Location .setDisableLocation(false) // Device .setDeviceId("user_123"); // Configure limits config.sdkInternalLimits .setMaxKeyLength(256) .setMaxBreadcrumbCount(200); // Initialize Countly.sharedInstance().init(config); ``` -------------------------------- ### HTTP Request Monitoring Example Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/08-feedback-apm-modules.md An example demonstrating how to monitor an HTTP request using the APM module, calculating request size, response code, response size, and duration. ```APIDOC ## Example: HTTP Request Monitoring ```java private void makeApiRequest(String endpoint) { long startTime = System.currentTimeMillis(); try { HttpURLConnection conn = (HttpURLConnection) new URL("https://api.example.com/" + endpoint).openConnection(); int responseCode = conn.getResponseCode(); int requestSize = calculateRequestSize(conn); int responseSize = conn.getContentLength(); long duration = System.currentTimeMillis() - startTime; Countly.sharedInstance().apm().recordNetworkTrace( endpoint, responseCode, requestSize, responseSize, duration ); // Handle response... } catch (Exception e) { Countly.sharedInstance().crashes().recordException(e); } } ``` ``` -------------------------------- ### Start Trace Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/08-feedback-apm-modules.md Starts timing a named operation or trace. Returns true if the trace was started successfully, and false if a trace with the same name is already running. ```APIDOC ## startTrace(String traceName) ### Description Starts timing a named operation/trace. ### Method `startTrace` ### Parameters #### Path Parameters - **traceName** (String) - Yes - Name of operation to monitor ### Return Type - `boolean` - true if started, false if already running ### Example ```java Countly.sharedInstance().apm().startTrace("database_query"); // ... perform database operation ... Countly.sharedInstance().apm().endTrace("database_query"); ``` ``` -------------------------------- ### startView Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/05-sessions-views-modules.md Starts tracking a view. This method must be paired with a corresponding `stopView()` call to record the view's duration. ```APIDOC ### startView(String viewName) Starts tracking a view. Must be paired with `stopView()`. #### Parameters - **viewName** (String) - Yes - Name of view to start #### Return Type - **boolean** - true if started, false if already started **Example:** ```java @Override public void onResume() { super.onResume(); Countly.sharedInstance().views().startView("DetailView"); } ``` ``` -------------------------------- ### Start a Session Manually Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/INDEX.txt Manually starts a new user session. This is an alternative to automatic session tracking. ```java Countly.beginSession(); ``` -------------------------------- ### Start a Timed Event Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/INDEX.txt Starts a timed event. This is useful for measuring the duration of specific actions. ```java Countly.startEvent("My Timed Event"); ``` -------------------------------- ### Countly SDK Initialization Example Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/02-countly-config.md Demonstrates how to initialize the Countly SDK with various configuration options, including enabling features, setting thresholds, and custom headers. Ensure the application context, app key, and server URL are correctly provided. ```java CountlyConfig config = new CountlyConfig(application, "app_key", "https://countly.example.com") .setLoggingEnabled(true) .enableCrashReporting() .enableAutomaticViewTracking(true) .setRequiresConsent(true) .setEventQueueSizeThreshold(50) .setHttpPostForced(true) .setMaxRequestQueueSize(2000) .setCustomNetworkRequestHeaders(headers); Countly.sharedInstance().init(config); ``` -------------------------------- ### APM Configuration Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/08-feedback-apm-modules.md Provides examples of how to configure the APM module, such as enabling network tracking and setting limits for trace segmentation values. ```APIDOC ## APM Configuration Configure APM behavior: ```java config.apm .setNetworkTrackerEnabled(true) .setTraceMaxSegmentationValues(100); ``` ``` -------------------------------- ### Start APM Trace Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/08-feedback-apm-modules.md Starts timing a specific operation or trace within the application. Returns true if the trace was successfully started, false if a trace with the same name is already running. ```java public void startTrace(@NonNull final String traceName) ``` ```java Countly.sharedInstance().apm().startTrace("database_query"); // ... perform database operation ... Countly.sharedInstance().apm().endTrace("database_query"); ``` -------------------------------- ### Start APM Trace Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/INDEX.txt Starts a trace for Application Performance Monitoring (APM). Used to measure the duration of specific operations. ```java Countly.startTrace("database_query"); ``` -------------------------------- ### Track Activity Start Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/01-countly-main.md Call this method from your Activity's onStart() to track session begins and app foregrounding. Ensure 'this' is passed as the activity context. ```java public void onStart(Activity activity) ``` ```java @Override protected void onStart() { super.onStart(); Countly.sharedInstance().onStart(this); } ``` -------------------------------- ### Countly SDK Initialization and Lifecycle Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/README.md This snippet demonstrates the basic setup for the Countly Android SDK, including adding the dependency, creating a configuration object, initializing the SDK, and integrating lifecycle hooks. ```APIDOC ## Countly SDK Initialization and Lifecycle ### Description This section covers the essential steps to integrate the Countly Android SDK into your application. It includes adding the SDK dependency, configuring its initialization parameters, starting the SDK, and managing its lifecycle through `onStart` and `onStop` methods. ### Method SDK Integration and Lifecycle Management ### Endpoint N/A (SDK Integration) ### Parameters #### Dependency - **implementation 'ly.count.android:sdk:26.1.3'** (Gradle dependency) #### Configuration (`CountlyConfig`) - **application** (Application) - Required - The application context. - **app_key** (String) - Required - Your Countly application key. - **server_url** (String) - Required - The base URL of your Countly server. - **setLoggingEnabled(boolean)** - Optional - Enables or disables SDK logging. - **enableCrashReporting()** - Optional - Enables the crash reporting feature. - **enableAutomaticViewTracking(boolean)** - Optional - Enables automatic tracking of user views (screens). ### Request Example ```java // 1. Add Dependency (build.gradle) implementation 'ly.count.android:sdk:26.1.3' // 2. Create Configuration (in Application class) CountlyConfig config = new CountlyConfig(application, "app_key", "https://countly.example.com") .setLoggingEnabled(true) .enableCrashReporting() .enableAutomaticViewTracking(true); // 3. Initialize SDK (in Application.onCreate()) Countly.sharedInstance().init(config); ``` ### Response #### Success Response SDK is initialized and ready to track events and user activity. #### Response Example N/A (SDK Initialization) ### Lifecycle Hooks #### `onStart(Activity)` Call this method in your `Activity.onStart()` to begin a session. #### `onStop()` Call this method in your `Activity.onStop()` to end a session. ```java // In your Application class: @Override protected void onStart() { super.onStart(); Countly.sharedInstance().onStart(this); } @Override protected void onStop() { Countly.sharedInstance().onStop(); super.onStop(); } ``` ``` -------------------------------- ### Begin a New Session (Manual Control) Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/05-sessions-views-modules.md Call this method when you want to manually start a new user session. This is used when manual session control is enabled in the SDK configuration. ```java Countly.sharedInstance().sessions().begin(); ``` -------------------------------- ### Countly SDK Configuration with Crash Reporting Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/04-crashes-module.md Example of initializing the Countly SDK with crash reporting enabled and configuring specific limits and a global crash filter. ```java CountlyConfig config = new CountlyConfig(context, "app_key", "https://countly.example.com") .enableCrashReporting(); config.sdkInternalLimits .setMaxBreadcrumbCount(150) .setMaxStackTraceLinesPerThread(50); crashes.setGlobalCrashFilterCallback(new GlobalCrashFilterCallback() { @Override public void filterCrash(CrashData crashData) { if (isDevBuild()) { // Only report production crashes crashData.ignore(); } } }); ``` -------------------------------- ### Start and End Timed Event Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/INDEX.txt Starts and ends a timed event using its key. This is useful for tracking the duration of an action. ```java events.startEvent(key) endEvent(key) ``` -------------------------------- ### startEvent Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/03-events-module.md Starts timing an event. This method must be paired with a corresponding `endEvent()` call to record the event's duration. ```APIDOC ## startEvent ### Description Starts timing an event. Must be paired with `endEvent()` call. ### Method Signature public boolean startEvent(@NonNull final String key) ### Parameters #### Path Parameters - **key** (String) - Yes - Event name to time ### Return Type - **boolean** - true if started, false if already started ### Example ```java Countly.sharedInstance().events().startEvent("login"); // ... perform login operation ... Countly.sharedInstance().events().endEvent("login"); ``` ``` -------------------------------- ### Get SDK Configuration Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/01-countly-main.md Retrieves the active configuration object for the Countly SDK. Returns null if the SDK has not been initialized. ```java public CountlyConfig getConfig() ``` -------------------------------- ### Countly Configuration Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/INDEX.txt Detailed documentation for the CountlyConfig builder, covering all constructors, setter methods, required and optional parameters, default values, validation rules, and SDK limits. Includes examples for various configurations. ```APIDOC ## Countly Configuration ### Description This section details the `CountlyConfig` builder, which allows for comprehensive configuration of the Countly SDK. It lists all available constructors and over 30 setter methods, specifying which parameters are required or optional, their default values, and the rules for validation. It also outlines SDK limitations such as `maxKeyLength` and `maxBreadcrumbs`. ### Configuration Builder (`CountlyConfig`) #### Initialization Patterns - Constructors for basic setup. #### Setter Methods (Examples) - `setAppKey(String appKey)`: Sets the application key. - `setHost(String host)`: Sets the Countly server host URL. - `setDeviceId(String deviceId)`: Sets a custom device ID. - `enableCrashReporting()`: Enables automatic crash reporting. - `enableAutomaticViewTracking()`: Enables automatic tracking of user views. - `setPushIntent(Intent intent)`: Configures push notification intent. #### SDK Limits - `maxKeyLength`: Maximum length for event keys and segmentation keys. - `maxBreadcrumbs`: Maximum number of breadcrumbs to store. #### Configuration Validation - Rules ensuring that provided configuration values are valid before initialization. ### Example ```java CountlyConfig config = new CountlyConfig("YOUR_APP_KEY", "YOUR_HOST_URL"); config.enableCrashReporting(); config.enableAutomaticViewTracking(); Countly.sharedInstance().init(config); ``` ``` -------------------------------- ### Monitor HTTP Request Performance Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/08-feedback-apm-modules.md This example demonstrates how to manually monitor an HTTP request. It calculates the request size, response code, response size, and duration, then records this data using `recordNetworkTrace`. ```java private void makeApiRequest(String endpoint) { long startTime = System.currentTimeMillis(); try { HttpURLConnection conn = (HttpURLConnection) new URL("https://api.example.com/" + endpoint).openConnection(); int responseCode = conn.getResponseCode(); int requestSize = calculateRequestSize(conn); int responseSize = conn.getContentLength(); long duration = System.currentTimeMillis() - startTime; Countly.sharedInstance().apm().recordNetworkTrace( endpoint, responseCode, requestSize, responseSize, duration ); // Handle response... } catch (Exception e) { Countly.sharedInstance().crashes().recordException(e); } } ``` -------------------------------- ### Apply User Privacy Choices Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/07-consent-remoteconfig-modules.md Example demonstrating how to apply granular user privacy choices to the Countly SDK's consent settings. This pattern is useful for managing user preferences in a privacy settings screen. ```java // User denies all tracking Countly.sharedInstance().consent().removeConsentAll(); // Later, user opens privacy settings Map userChoices = getPrivacySettings(); // Apply each choice if (userChoices.get("tracking")) { Countly.sharedInstance().consent().giveConsent( Countly.CountlyFeatureNames.events, Countly.CountlyFeatureNames.sessions ); } if (userChoices.get("notifications")) { Countly.sharedInstance().consent().giveConsent( Countly.CountlyFeatureNames.push ); } if (userChoices.get("analytics")) { Countly.sharedInstance().consent().giveConsent( Countly.CountlyFeatureNames.views, Countly.CountlyFeatureNames.crashes ); } ``` -------------------------------- ### Start a Timed Event Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/03-events-module.md Initiates the timing for an event. This method must be paired with a corresponding `endEvent` call to record the duration. ```java public boolean startEvent(@NonNull final String key) ``` ```java Countly.sharedInstance().events().startEvent("login"); // ... perform login operation ... Countly.sharedInstance().events().endEvent("login"); ``` -------------------------------- ### Consent and Privacy Configuration Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/02-countly-config.md Configure whether explicit user consent is required before the SDK starts tracking data, in compliance with privacy regulations like GDPR. ```APIDOC ## setRequiresConsent(boolean requires) ### Description Requires explicit user consent before the SDK starts tracking any data, essential for GDPR compliance. ### Method `setRequiresConsent` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **requires** (`boolean`) - Optional - If true, explicit user consent is required for all tracking features. Default: false ``` -------------------------------- ### WebView View Tracking Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/05-sessions-views-modules.md For WebView tracking, use special WebView integration to start and stop view tracking around WebView navigation. ```java Countly.sharedInstance().views().startView("WebContent"); // WebView loads and navigates... Countly.sharedInstance().views().stopView("WebContent"); ``` -------------------------------- ### onStart(Activity activity) Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/01-countly-main.md Must be called from each Activity's `onStart()` method to track session begins and app foregrounding. This method is essential for accurate session tracking and understanding user engagement within the application. ```APIDOC ## onStart(Activity activity) ### Description Tracks session begins and app foregrounding. This method should be invoked from the `onStart()` lifecycle method of each Activity in your application. ### Method Signature `public void onStart(Activity activity)` ### Parameters #### Path Parameters - **activity** (Activity) - Required - The Activity instance that is starting. ### Request Example ```java @Override protected void onStart() { super.onStart(); Countly.sharedInstance().onStart(this); } ``` ``` -------------------------------- ### Event Module Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/INDEX.txt Documentation for recording events, including simple events, timed events, and events with segmentation. Covers methods for starting, ending, and recording events with custom timestamps, as well as event cancellation and segmentation limits. ```APIDOC ## Event Module ### Description This module provides functionality for recording user events within the application. It supports simple events, timed events that can be started and ended, and events with associated segmentation data. It also allows for recording past events with custom timestamps and provides mechanisms for event cancellation. ### Event Recording - **Simple Events**: Record an event with a name. - `Countly.sharedInstance().events().recordEvent("event_name");` - **Timed Events**: Start and end events to measure duration. - `Countly.sharedInstance().events().startEvent("timed_event_name");` - `Countly.sharedInstance().events().endEvent("timed_event_name");` - **Events with Segmentation**: Record events with additional key-value data. - `Map segmentation = new HashMap<>(); segmentation.put("level", "10"); segmentation.put("score", "1000"); Countly.sharedInstance().events().recordEvent("level_complete", segmentation); ` - **Past Event Recording**: Record events that occurred in the past. - `Countly.sharedInstance().events().recordEvent("past_event", System.currentTimeMillis() - 3600000); // 1 hour ago` - **Event Cancellation**: Cancel a previously started timed event. - `Countly.sharedInstance().events().cancelEvent("timed_event_name");` ### Segmentation Limits - Keys and values have size limits (`maxKeyLength`). - Supported data types for segmentation values include String, Integer, Double, Boolean. ``` -------------------------------- ### Basic SDK Feature Usage Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/README.md Demonstrates common SDK operations like tracking events, updating user profiles, recording exceptions, and presenting feedback. ```java Countly.sharedInstance().events().recordEvent("purchase", segmentation, 1, 99.99); // Update user profile Countly.sharedInstance().userProfile().setEmail("user@example.com"); // Record crash Countly.sharedInstance().crashes().recordException(exception); // Present feedback Countly.sharedInstance().feedback().presentRating(MainActivity.this); ``` -------------------------------- ### Download Remote Config with Callback on App Startup Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/07-consent-remoteconfig-modules.md Demonstrates a common usage pattern for downloading remote configuration values on application startup and processing them within a callback. This ensures that the app uses the latest configuration after a successful download. ```java // On app startup Countly.sharedInstance().remoteConfig().downloadRemoteConfig( new String[]{"app_version", "maintenance_mode"}, new RemoteConfigCallback() { @Override public void onRemoteConfigLoaded(boolean success) { if (success) { String version = Countly.sharedInstance().remoteConfig() .getRemoteConfigValueAsString("app_version"); Boolean maintenance = Countly.sharedInstance().remoteConfig() .getRemoteConfigValueAsBoolean("maintenance_mode"); if (maintenance != null && maintenance) { showMaintenancePage(); } } } } ); ``` -------------------------------- ### giveConsentAll() Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/07-consent-remoteconfig-modules.md Grants consent for all available features, enabling all SDK tracking capabilities. ```APIDOC ## giveConsentAll() ### Description Grants consent for all available features. ### Method `public void giveConsentAll()` ### Example ```java Countly.sharedInstance().consent().giveConsentAll(); ``` ``` -------------------------------- ### Get Countly SDK Instance Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/01-countly-main.md Access the single instance of the Countly SDK. This method should be called to get the SDK object before performing any other operations. ```java Countly.sharedInstance() ``` -------------------------------- ### End APM Trace Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/08-feedback-apm-modules.md Ends a previously started trace and records its duration. Returns true if the trace was successfully ended, false if the trace was not found or not started. ```java public void endTrace(@NonNull final String traceName) ``` -------------------------------- ### Check APM Consent Before Starting Trace Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/08-feedback-apm-modules.md Before starting an APM trace, it's crucial to check if the user has granted consent for the APM feature. This ensures compliance with privacy regulations. ```java if (Countly.sharedInstance().consent() .getConsent(Countly.CountlyFeatureNames.apm)) { Countly.sharedInstance().apm().startTrace("operation"); } ``` -------------------------------- ### Initialize Countly SDK Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/INDEX.txt Initializes the Countly SDK with the provided configuration. This is the first step before using any other SDK features. ```java Countly.sharedInstance().init(config) ``` -------------------------------- ### CountlyConfig Constructor (Required Fields) Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/02-countly-config.md Creates a configuration object with the minimum required fields: context, app key, and server URL. ```java public CountlyConfig(Context context, String appKey, String serverURL) ``` -------------------------------- ### Start and End Timed Events Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/README.md Measures the duration of operations by starting an event timer and ending it with optional segmentation and metrics. Returns `true` on success, `false` if the event is already running. ```java events.startEvent("login"); // ... perform login ... events.endEvent("login", segmentation, 1, 0); ``` -------------------------------- ### cancelEvent Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/03-events-module.md Cancels a timed event that was started with `startEvent()` without recording its duration. ```APIDOC ## cancelEvent ### Description Cancels a timed event without recording it. ### Method Signature public boolean cancelEvent(@NonNull final String key) ### Parameters #### Path Parameters - **key** (String) - Yes - Event name to cancel ### Return Type - **boolean** - true if cancelled, false if not started ### Example ```java Countly.sharedInstance().events().startEvent("download"); if (userCancelled) { Countly.sharedInstance().events().cancelEvent("download"); } ``` ``` -------------------------------- ### Retrieve Current Device ID Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/09-other-modules.md Get the currently active device ID from the SDK. ```java String deviceId = Countly.sharedInstance().deviceId().getDeviceId(); ``` -------------------------------- ### Initialization Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/01-countly-main.md Initializes the Countly SDK with the provided configuration. This method must be called before using other SDK methods and is thread-safe. ```APIDOC ## Initialization ### Description Initializes the Countly SDK with the provided configuration. This method must be called before using other SDK methods and is thread-safe. ### Method `init(CountlyConfig config)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **config** (`CountlyConfig`) - Required - Configuration object containing all initialization parameters. ### Request Example ```java CountlyConfig config = new CountlyConfig(context, "app_key", "https://countly.example.com") .setLoggingEnabled(true) .enableCrashReporting(); Countly.sharedInstance().init(config); ``` ### Response #### Success Response (200) - **Countly**: The same instance for method chaining. ### Throws - `IllegalArgumentException`: if config is null, serverURL is invalid, or appKey is missing. ``` -------------------------------- ### End a Timed Event Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/INDEX.txt Ends a previously started timed event. The duration is calculated automatically. ```java Countly.endEvent("My Timed Event"); ``` -------------------------------- ### Download Specific Remote Config Keys with Callback Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/07-consent-remoteconfig-modules.md Use this method to download specific remote configuration keys and receive a callback upon completion. The callback indicates whether the download was successful. ```java public void downloadRemoteConfigCallback(@Nullable final String[] keys, @Nullable final RemoteConfigCallback callback) ``` ```java Countly.sharedInstance().remoteConfig().downloadRemoteConfigCallback( new String[]{"welcome_message", "feature_enabled"}, new RemoteConfigCallback() { @Override public void onRemoteConfigLoaded(boolean downloadSuccessful) { if (downloadSuccessful) { // Config updated } } } ); ``` -------------------------------- ### End APM Trace Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/INDEX.txt Ends a previously started APM trace. The duration is recorded and sent to the server. ```java Countly.endTrace("database_query"); ``` -------------------------------- ### Stop a View Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/05-sessions-views-modules.md Stops tracking a view and records it with duration. Returns true if stopped, false if not started. ```java public void stopView(@NonNull final String viewName) ``` ```java @Override public void onPause() { Countly.sharedInstance().views().stopView("DetailView"); super.onPause(); } ``` -------------------------------- ### Set User Birth Year Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/06-user-profile-module.md Sets the user's birth year as an integer. Example: 1990. ```java Countly.sharedInstance().userProfile().setBirthYear(1990); ``` -------------------------------- ### Required Configuration Methods Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/02-countly-config.md Details the essential methods for configuring the Countly SDK, including setting the context, server URL, and application key. ```APIDOC ## setContext(Context context) ### Description Sets the Android context. Either context or application must be provided. ### Method ```java public synchronized CountlyConfig setContext(Context context) ``` ### Parameters #### Path Parameters - **context** (Context) - Required - Android application context ### Returns `this` for method chaining ## setServerURL(String serverURL) ### Description Sets the Countly server URL. Must be a valid URL without trailing slash. ### Method ```java public synchronized CountlyConfig setServerURL(String serverURL) ``` ### Parameters #### Path Parameters - **serverURL** (String) - Required - URL like `https://countly.example.com` ### Returns `this` for method chaining ## setAppKey(String appKey) ### Description Sets the application key from Countly dashboard. ### Method ```java public synchronized CountlyConfig setAppKey(String appKey) ``` ### Parameters #### Path Parameters - **appKey** (String) - Required - Application key (non-empty string) ### Returns `this` for method chaining ## setApplication(Application application) ### Description Sets the Android Application class. Required for activity lifecycle callbacks. ### Method ```java public synchronized CountlyConfig setApplication(Application application) ``` ### Parameters #### Path Parameters - **application** (Application) - Optional - Application instance ### Returns `this` for method chaining ``` -------------------------------- ### Check SDK Initialization Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/01-countly-main.md Use this method to determine if the Countly SDK has been successfully initialized by calling the init() method. ```java public boolean isInitialized() ``` -------------------------------- ### Countly Singleton and Initialization Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/INDEX.txt Documentation for the Countly singleton class, including the init() method for initialization, module accessors, and lifecycle methods. It also covers logging, feature constants, and thread safety. ```APIDOC ## Countly Singleton and Initialization ### Description Provides documentation for the core Countly singleton class, detailing its initialization process via the `init()` method, access to various feature modules, and management of application lifecycle events. It also outlines logging mechanisms, constants for features, and thread safety guarantees. ### Methods - `init(CountlyConfig config)`: Initializes the Countly SDK with the provided configuration. - `onStart()`: Call this method when the application starts or resumes. - `onStop()`: Call this method when the application is paused or stopped. - `getLogger()`: Accesses the SDK's logger instance. ### Key Concepts - **Singleton Pattern**: The Countly SDK is accessed via a single instance. - **Module Accessors**: Provides access to different SDK features like Events, Crashes, etc. - **Lifecycle Management**: Requires explicit calls to `onStart()` and `onStop()` for accurate session tracking. - **Thread Safety**: Guarantees that SDK operations are thread-safe. ``` -------------------------------- ### CountlyConfig Constructor (Empty) Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/02-countly-config.md Creates an empty configuration object. You must call setter methods before initializing the SDK. ```java public CountlyConfig() ``` -------------------------------- ### CountlyConfig Constructor (Application Instance) Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/02-countly-config.md Creates a configuration object using the Application class instead of a Context. This is required for activity lifecycle callbacks. ```java public CountlyConfig(Application application, String appKey, String serverURL) ``` -------------------------------- ### Download Remote Config with Callback Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/12-errors.md Initiates a download for remote configuration values and provides a callback to handle success or failure. On failure, cached values are used. ```java remoteConfig.downloadRemoteConfig( new String[]{"key1", "key2"}, new RemoteConfigCallback() { @Override public void onRemoteConfigLoaded(boolean downloadSuccessful) { if (!downloadSuccessful) { // Download failed - use cached values String cached = remoteConfig.getRemoteConfigValueAsString("key1"); } } } ); ``` -------------------------------- ### setHttpPostForced Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/02-countly-config.md Forces all requests to use HTTP POST instead of the default GET method. Use this for specific network requirements. ```APIDOC ## setHttpPostForced(boolean force) ### Description Forces all requests to use HTTP POST instead of GET (default GET). ### Method `public synchronized CountlyConfig setHttpPostForced(boolean force)` ### Parameters #### Path Parameters - **force** (boolean) - Required - If true, all requests use POST ### Response #### Success Response (200) - `this` (CountlyConfig) - for method chaining ``` -------------------------------- ### Web View Support Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/05-sessions-views-modules.md Explains how to implement view tracking for WebViews using the SDK's integration. ```APIDOC ## Web View Support For WebView tracking, use special WebView integration: ```java Countly.sharedInstance().views().startView("WebContent"); // WebView loads and navigates... Countly.sharedInstance().views().stopView("WebContent"); ``` ``` -------------------------------- ### Pause a View Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/05-sessions-views-modules.md Pauses view timing without stopping, useful for hidden views. Returns true if paused, false if not started. ```java public void pauseView(@NonNull final String viewName) ``` ```java // When dialog shown over view Countly.sharedInstance().views().pauseView("MainView"); // When dialog dismissed Countly.sharedInstance().views().resumeView("MainView"); ``` -------------------------------- ### Enable Experimental Features Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/11-configuration.md Enable view name recording and visibility tracking for experimental features. ```java config.experimental.viewNameRecordingEnabled = true; config.experimental.visibilityTrackingEnabled = true; ``` -------------------------------- ### Track Direct Attribution Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/INDEX.txt Tracks direct attribution for a campaign. This is typically used when a user installs the app directly from a campaign link. ```java Countly.trackDirectAttribution("campaign_name", "campaign_id"); ``` -------------------------------- ### Cancel Trace Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/08-feedback-apm-modules.md Cancels a trace without recording its duration or metrics. Returns true if the trace was cancelled successfully, and false if the trace was not started. ```APIDOC ## cancelTrace(String traceName) ### Description Cancels a trace without recording it. ### Method `cancelTrace` ### Parameters #### Path Parameters - **traceName** (String) - Yes - Name of trace to cancel ### Return Type - `boolean` - true if cancelled, false if not started ### Example ```java Countly.sharedInstance().apm().startTrace("download"); if (userCancelled) { Countly.sharedInstance().apm().cancelTrace("download"); } ``` ``` -------------------------------- ### End Trace (Basic) Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/08-feedback-apm-modules.md Ends timing a trace and records its duration. Returns true if the trace was ended successfully, and false if the trace was not started. ```APIDOC ## endTrace(String traceName) ### Description Ends timing a trace and records the duration. ### Method `endTrace` ### Parameters #### Path Parameters - **traceName** (String) - Yes - Name of operation ### Return Type - `boolean` - true if ended, false if not started ``` -------------------------------- ### Initialize Countly SDK Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/README.md Initialize the Countly SDK in your Application class's onCreate() method. ```java // In Application.onCreate() Countly.sharedInstance().init(config); ``` -------------------------------- ### Fragment View Tracking Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/05-sessions-views-modules.md For Fragment-based navigation, manually record views using startView() and stopView() in onViewCreated() and onDestroyView() respectively. ```java public class MyFragment extends Fragment { @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); Countly.sharedInstance().views().startView("MyFragment"); } @Override public void onDestroyView() { Countly.sharedInstance().views().stopView("MyFragment"); super.onDestroyView(); } } ``` -------------------------------- ### Cancel a Timed Event Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/03-events-module.md Discards a timed event that was started but should not be recorded. Use this if the event's conditions change or it's no longer relevant. ```java public boolean cancelEvent(@NonNull final String key) ``` ```java Countly.sharedInstance().events().startEvent("download"); if (userCancelled) { Countly.sharedInstance().events().cancelEvent("download"); } ``` -------------------------------- ### Sessions and Views Module Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/INDEX.txt Documentation for managing the session lifecycle, including manual control modes and timers. Covers view recording methods (`recordView`, `startView`, `stopView`), automatic activity-based tracking, and fragment support. ```APIDOC ## Sessions and Views Module ### Description This module manages the lifecycle of user sessions and tracks user engagement through views. It supports both automatic and manual session control, along with detailed view tracking, including automatic activity-based tracking and manual view recording. Fragment support and orientation tracking are also covered. ### Session Management - **Session Lifecycle**: Sessions are automatically managed based on application activity, but can be controlled manually. - **Manual Session Control**: Start, update, and end sessions explicitly. - `Countly.sharedInstance().sessions().beginSession();` - `Countly.sharedInstance().sessions().endSession();` ### View Tracking - **Automatic View Tracking**: If enabled, the SDK automatically tracks screen views based on Activity lifecycle callbacks. - **Manual View Recording**: Record specific views or screen transitions. - `Countly.sharedInstance().views().recordView("MyCustomViewName");` - `Countly.sharedInstance().views().startView("DetailedView");` - `Countly.sharedInstance().views().stopView("DetailedView");` - **Global View Segmentation**: Apply segmentation data to all recorded views. ### Fragment Support - Patterns and guidance for tracking views within Android Fragments. ### Orientation Tracking - The SDK can track device orientation changes. ``` -------------------------------- ### Get Remote Config String Value Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/INDEX.txt Retrieves a remote configuration value as a String. Returns null if the key does not exist or the value is not a string. ```java String configValue = Countly.getConfigAsString("my_config_key"); ``` -------------------------------- ### Retrieve Remote Config Value as String Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/07-consent-remoteconfig-modules.md Get a remote configuration value by its key, returned as a String. Returns null if the key is not found. ```java public String getRemoteConfigValueAsString(@NonNull final String key) ``` ```java String welcomeMessage = Countly.sharedInstance().remoteConfig() .getRemoteConfigValueAsString("welcome_message"); ``` -------------------------------- ### Create Countly SDK Configuration Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/README.md Configure the Countly SDK with essential parameters and enable specific features like crash reporting and automatic view tracking. ```java CountlyConfig config = new CountlyConfig(application, "app_key", "https://countly.example.com") .setLoggingEnabled(true) .enableCrashReporting() .enableAutomaticViewTracking(true); ``` -------------------------------- ### Get Remote Config Value as String Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/07-consent-remoteconfig-modules.md Retrieves a specific remote configuration value, identified by its key, as a String. Returns null if the key is not found. ```APIDOC ## getRemoteConfigValueAsString(String key) ### Description Gets a configuration value as a String. ### Method `public String getRemoteConfigValueAsString(@NonNull final String key)` ### Parameters #### Path Parameters * None #### Query Parameters * None #### Request Body * None ### Parameters Table | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | key | `String` | Yes | Configuration key | ### Response #### Success Response - **Return Type**: `String` - Configuration value or null if not found ### Request Example ```java String welcomeMessage = Countly.sharedInstance().remoteConfig() .getRemoteConfigValueAsString("welcome_message"); ``` ``` -------------------------------- ### Change Device ID without Server Merge Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/09-other-modules.md Change the device ID without merging data on the server. Suitable for fresh installs or anonymization. ```java // For a fresh install or anonymization Countly.sharedInstance().deviceId().changeDeviceIdWithoutMerge(UUID.randomUUID().toString()); ``` -------------------------------- ### Download Remote Config with Callback Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/07-consent-remoteconfig-modules.md Downloads specific remote config keys and provides a callback for the result. If no keys are specified, all configurations are downloaded. ```APIDOC ## downloadRemoteConfigCallback(String[] keys, RemoteConfigCallback callback) ### Description Downloads specific remote config keys with a callback. ### Method `public void downloadRemoteConfigCallback(@Nullable final String[] keys, @Nullable final RemoteConfigCallback callback)` ### Parameters #### Path Parameters * None #### Query Parameters * None #### Request Body * None ### Parameters Table | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | keys | `String[]` | No | Specific keys to download (null = all) | | callback | `RemoteConfigCallback` | No | Callback for result | ### Request Example ```java Countly.sharedInstance().remoteConfig().downloadRemoteConfigCallback( new String[]{"welcome_message", "feature_enabled"}, new RemoteConfigCallback() { @Override public void onRemoteConfigLoaded(boolean downloadSuccessful) { if (downloadSuccessful) { // Config updated } } } ); ``` ### Response #### Success Response This method returns void. The result is delivered via the `RemoteConfigCallback`. ``` -------------------------------- ### Initialize Countly SDK Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/01-countly-main.md Initializes the Countly SDK using a `CountlyConfig` object. This must be called before any other SDK methods. The method is thread-safe and can be called from `onCreate`. ```java public synchronized Countly init(CountlyConfig config) ``` ```java CountlyConfig config = new CountlyConfig(context, "app_key", "https://countly.example.com") .setLoggingEnabled(true) .enableCrashReporting(); Countly.sharedInstance().init(config); ``` -------------------------------- ### Retrieve Remote Config Value as JSON Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/07-consent-remoteconfig-modules.md Get a remote configuration value by its key, returned as a JSONObject. Returns null if the key is not found or is not valid JSON. ```java public JSONObject getRemoteConfigValueAsJSON(@NonNull final String key) ``` ```java JSONObject config = Countly.sharedInstance().remoteConfig() .getRemoteConfigValueAsJSON("ui_config"); ``` -------------------------------- ### isInitialized() Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/01-countly-main.md Returns whether the SDK has been initialized. This is useful for checking the SDK's state before performing operations that depend on initialization. ```APIDOC ## isInitialized() ### Description Checks if the Countly SDK has been successfully initialized. ### Method Signature `public boolean isInitialized()` ### Return Value - **boolean** - True if `init()` has been called and completed successfully, false otherwise. ``` -------------------------------- ### Retrieve Remote Config Value as Boolean Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/07-consent-remoteconfig-modules.md Get a remote configuration value by its key, returned as a Boolean. Returns null if the key is not found or cannot be parsed as a Boolean. ```java public Boolean getRemoteConfigValueAsBoolean(@NonNull final String key) ``` ```java Boolean featureEnabled = Countly.sharedInstance().remoteConfig() .getRemoteConfigValueAsBoolean("new_feature_enabled"); ``` -------------------------------- ### Experimental Features Configuration Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/02-countly-config.md Configuration object for enabling and managing experimental features. ```java public ConfigExperimental experimental = new ConfigExperimental(); ``` -------------------------------- ### Retrieve Remote Config Value as Double Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/07-consent-remoteconfig-modules.md Get a remote configuration value by its key, returned as a Double. Returns null if the key is not found or cannot be parsed as a Double. ```java public Double getRemoteConfigValueAsDouble(@NonNull final String key) ``` ```java Double discountPercent = Countly.sharedInstance().remoteConfig() .getRemoteConfigValueAsDouble("discount_percentage"); ``` -------------------------------- ### Retrieve Remote Config Value as Integer Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/07-consent-remoteconfig-modules.md Get a remote configuration value by its key, returned as an Integer. Returns null if the key is not found or cannot be parsed as an Integer. ```java public Integer getRemoteConfigValueAsInt(@NonNull final String key) ``` ```java Integer maxRetries = Countly.sharedInstance().remoteConfig() .getRemoteConfigValueAsInt("max_retries"); ``` -------------------------------- ### Handle Missing Application Class Warning Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/12-errors.md A warning is logged if the application class is not provided during SDK initialization. This impacts functionality like activity lifecycle tracking and session management. Provide the application class using `setApplication()` to enable these features. ```text [Init] Initialising the SDK without providing the application class. Some functionality will not work. ``` -------------------------------- ### Present NPS Question with Callback Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/08-feedback-apm-modules.md Shows an NPS question and provides a callback for when the user responds. The callback receives the variant name if applicable. ```java Countly.sharedInstance().feedback().presentNPS( MainActivity.this, new RCVariantCallback() { @Override public void onVariantReceived(String variantName) { // User responded to NPS } } ); ``` -------------------------------- ### Record Direct Attribution Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/09-other-modules.md Records direct campaign attribution data, specifying the provider and campaign details. Useful for tracking installs from specific marketing campaigns. ```java public void recordDirectAttribution(@NonNull final String provider, @NonNull final String data) ``` ```java Countly.sharedInstance().attribution().recordDirectAttribution( "google_analytics", "utm_source=google&utm_medium=cpc&utm_campaign=promo" ); ``` -------------------------------- ### RemoteConfigCallback Interface Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/10-types.md Callback invoked when remote configuration download is completed. Implement this to handle the success or failure of the download. ```java public interface RemoteConfigCallback { void onRemoteConfigLoaded(boolean downloadSuccessful); } ``` -------------------------------- ### End Trace with Metrics Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/08-feedback-apm-modules.md Ends a trace and records its duration along with custom performance metrics. Returns true if the trace was ended successfully, and false if the trace was not started. ```APIDOC ## endTrace(String traceName, Map metrics) ### Description Ends a trace with custom metrics. ### Method `endTrace` ### Parameters #### Path Parameters - **traceName** (String) - Yes - Name of operation - **metrics** (Map) - No - Custom performance metrics ### Example ```java Map metrics = new HashMap<>(); metrics.put("rows_returned", "500"); metrics.put("query_type", "select"); Countly.sharedInstance().apm().endTrace("database_query", metrics); ``` ``` -------------------------------- ### Cancel APM Trace Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/08-feedback-apm-modules.md Cancels a trace that was started but not yet ended, preventing it from being recorded. Returns true if the trace was successfully cancelled, false if it was not found or already ended. ```java public void cancelTrace(@NonNull final String traceName) ``` ```java Countly.sharedInstance().apm().startTrace("download"); if (userCancelled) { Countly.sharedInstance().apm().cancelTrace("download"); } ``` -------------------------------- ### initMessaging Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/02-countly-config.md Initializes push notification handling for the Countly SDK. ```APIDOC ## initMessaging(CountlyMessagingMode mode, CountlyMessagingProvider provider) ### Description Initializes the push notification handling capabilities of the Countly SDK. ### Method `public synchronized CountlyConfig initMessaging(CountlyMessagingMode mode, CountlyMessagingProvider provider)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters * **mode** (`CountlyMessagingMode`) - Required - Specifies whether to use TEST or PRODUCTION mode for messaging. * **provider** (`CountlyMessagingProvider`) - Required - Specifies the push notification provider, such as FCM or HMS. ### Request Example ```java // Example usage: countlyConfig.initMessaging(CountlyMessagingMode.PRODUCTION, CountlyMessagingProvider.FCM); ``` ### Response #### Success Response (200) Returns `this` for method chaining. #### Response Example ```java // Returns the CountlyConfig object for chaining ``` ``` -------------------------------- ### Get Remote Config Value as JSON Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/07-consent-remoteconfig-modules.md Retrieves a specific remote configuration value, identified by its key, as a JSONObject. Returns null if the key is not found or cannot be parsed as a JSONObject. ```APIDOC ## getRemoteConfigValueAsJSON(String key) ### Description Gets a configuration value as a JSONObject. ### Method `public JSONObject getRemoteConfigValueAsJSON(@NonNull final String key)` ### Parameters #### Path Parameters * None #### Query Parameters * None #### Request Body * None ### Parameters Table | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | key | `String` | Yes | Configuration key | ### Response #### Success Response - **Return Type**: `JSONObject` - Configuration value or null if not found ### Request Example ```java JSONObject config = Countly.sharedInstance().remoteConfig() .getRemoteConfigValueAsJSON("ui_config"); ``` ``` -------------------------------- ### ConfigContent Object Source: https://github.com/countly/countly-sdk-android/blob/master/_autodocs/10-types.md Configuration object for content widget settings. ```APIDOC ## Configuration Object: ConfigContent ### Description Content widget configuration. ### Properties * `enableLogging` (boolean) - Enables or disables logging for the content widget. * `contentStorageProvider` (Map) - Provides configuration for content storage. ```