### Build and run the demo app with Gradle Source: https://github.com/azikar24/wormaceptor/blob/master/README.md Commands to build the project, apply code formatting with Spotless, and install the demo app on a connected device or emulator. ```bash ./gradlew build # Build everything ./gradlew spotlessApply # Format code ./gradlew :app:installDebug # Run the demo app ``` -------------------------------- ### WormaCeptorApi.getLaunchIntent Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Get intent to launch WormaCeptor UI. ```APIDOC ## WormaCeptorApi.getLaunchIntent ### Description Get intent to launch WormaCeptor UI. ### Method getLaunchIntent ### Parameters - **context** (Context) - Required - The context. ### Response Returns Intent to launch WormaCeptor UI. ``` -------------------------------- ### WormaCeptorApi.getOverlayPermissionIntent Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Get intent to request overlay permission. ```APIDOC ## WormaCeptorApi.getOverlayPermissionIntent ### Description Get intent to request overlay permission. ### Method getOverlayPermissionIntent ### Parameters - **context** (Context) - Required - The context. ### Response Returns Intent? to request overlay permission. ``` -------------------------------- ### WormaCeptorWebSocket Usage Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Wraps an existing WebSocketListener to monitor WebSocket connections. The example shows creating a monitor, obtaining the wrapped listener, and manually recording an outgoing message. ```kotlin val monitor = WormaCeptorWebSocket.wrap(myListener, "wss://example.com/ws") val webSocket = client.newWebSocket(request, monitor.listener) // Record outgoing messages manually webSocket.send(message) monitor.recordSentMessage(message) ``` -------------------------------- ### WormaCeptorApi.getEnabledFeatures Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Get all enabled features. ```APIDOC ## WormaCeptorApi.getEnabledFeatures ### Description Get all enabled features. ### Method getEnabledFeatures ### Response Returns Set containing all enabled features. ``` -------------------------------- ### RedactionConfig Usage Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Configures redaction of sensitive data from captured traffic. The example chains methods to redact headers, JSON values, and XML values, and sets a custom replacement text. ```kotlin WormaCeptorApi.redactionConfig .redactHeader("Authorization") .redactHeader("Cookie") .redactJsonValue("password") .redactXmlValue("apiKey") .replacement("[REDACTED]") ``` -------------------------------- ### WormaCeptorWebSocket.getConnectionId() Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Gets the unique connection ID for the WebSocket. ```APIDOC ## WormaCeptorWebSocket.getConnectionId() ### Description Gets the unique connection ID for the WebSocket. ### Method Instance method ### Returns Int - The connection ID, or -1 if unavailable ``` -------------------------------- ### WormaCeptorApi.init Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Initializes WormaCeptor with the specified configuration. Call once during application startup. ```APIDOC ## WormaCeptorApi.init ### Description Initializes WormaCeptor with the specified configuration. Call once during application startup. ### Method init ### Parameters - **context** (Context) - Required - Application context - **logCrashes** (Boolean) - Optional, default: true - Enable uncaught exception logging - **features** (Set) - Optional, default: Feature.DEFAULT - Features to enable - **leakNotifications** (Boolean) - Optional, default: true - Show notifications for memory leaks ### Request Example ```kotlin WormaCeptorApi.init( context = context, logCrashes = true, features = Feature.DEFAULT, leakNotifications = true ) ``` ### Response No return value. ``` -------------------------------- ### Initialize WormaCeptor in Application class Source: https://github.com/azikar24/wormaceptor/blob/master/README.md Initializes WormaCeptor in the Application class by calling WormaCeptorApi.init(this) inside onCreate(). ```kotlin import com.azikar24.wormaceptor.api.WormaCeptorApi class App : Application() { override fun onCreate() { super.onCreate() WormaCeptorApi.init(this) } } ``` -------------------------------- ### Launch WormaCeptor with getLaunchIntent Source: https://github.com/azikar24/wormaceptor/blob/master/README.md Opens the WormaCeptor UI from anywhere using the launch intent from WormaCeptorApi. An alternative is WormaCeptorApi.startActivityOnShake(activity) for shake gesture. ```kotlin startActivity(WormaCeptorApi.getLaunchIntent(context)) ``` -------------------------------- ### WormaCeptorApi.startActivityOnShake Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Enable shake gesture to open WormaCeptor. ```APIDOC ## WormaCeptorApi.startActivityOnShake ### Description Enable shake gesture to open WormaCeptor. ### Method startActivityOnShake ### Parameters - **activity** (ComponentActivity) - Required - The activity to start on shake. ### Response No return value. ``` -------------------------------- ### WormaCeptorApi.showPerformanceOverlay Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Show real-time performance metrics overlay. ```APIDOC ## WormaCeptorApi.showPerformanceOverlay ### Description Show real-time performance metrics overlay. ### Method showPerformanceOverlay ### Parameters - **activity** (ComponentActivity) - Required - The activity. ### Response Returns Boolean indicating success. ``` -------------------------------- ### WormaCeptorWebView.createMonitoringClient(webViewId, delegate) Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Creates a monitoring WebViewClient for WebView network requests. ```APIDOC ## WormaCeptorWebView.createMonitoringClient(webViewId: String, delegate: WebViewClient?) ### Description Creates a WebViewClient that monitors network requests. If the WormaCeptor implementation is not available, the delegate is returned as-is (or a no-op WebViewClient if no delegate is provided). ### Method Factory method ### Parameters - **webViewId** (String) - Required - Identifier for the WebView - **delegate** (WebViewClient?) - Optional - The delegate WebViewClient to wrap ### Returns A WebViewClient for monitoring. ### Usage Example ```kotlin webView.webViewClient = WormaCeptorWebView.createMonitoringClient( webViewId = "my_webview", delegate = myWebViewClient, ) ``` ``` -------------------------------- ### WormaCeptorWebView Usage Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Creates a monitoring WebViewClient for a WebView. When the WormaCeptor implementation is unavailable (e.g., release builds), the delegate is returned as-is or a no-op WebViewClient if no delegate is provided. ```kotlin val webView: WebView = ... webView.webViewClient = WormaCeptorWebView.createMonitoringClient( webViewId = "my_webview", delegate = myWebViewClient, ) ``` -------------------------------- ### WormaCeptorWebSocket.wrap(url) Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Factory method to create a monitoring-only WebSocketListener. ```APIDOC ## WormaCeptorWebSocket.wrap(url: String) ### Description Creates a monitoring-only WebSocketListener for the given URL. ### Method Factory method ### Parameters - **url** (String) - Required - The WebSocket URL ### Returns A wrapper object with a `listener` property for OkHttp and monitoring methods. ### Usage Example ```kotlin val monitor = WormaCeptorWebSocket.wrap("wss://example.com/ws") val webSocket = client.newWebSocket(request, monitor.listener) ``` ``` -------------------------------- ### WormaCeptorApi.canShowFloatingButton Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Check if overlay permission is granted. ```APIDOC ## WormaCeptorApi.canShowFloatingButton ### Description Check if overlay permission is granted. ### Method canShowFloatingButton ### Parameters - **context** (Context) - Required - The context. ### Response Returns Boolean indicating if overlay permission is granted. ``` -------------------------------- ### WormaCeptorWebSocket.wrap(delegate, url) Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Factory method to wrap an existing WebSocketListener for monitoring. ```APIDOC ## WormaCeptorWebSocket.wrap(delegate: WebSocketListener, url: String) ### Description Wraps an existing WebSocketListener to enable monitoring of WebSocket connections. ### Method Factory method ### Parameters - **delegate** (WebSocketListener) - Required - The existing listener to wrap - **url** (String) - Required - The WebSocket URL ### Returns A wrapper object with a `listener` property for OkHttp and monitoring methods. ### Usage Example ```kotlin val monitor = WormaCeptorWebSocket.wrap(myListener, "wss://example.com/ws") val webSocket = client.newWebSocket(request, monitor.listener) ``` ``` -------------------------------- ### WormaCeptorApi.showFloatingButton Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Show floating button overlay. ```APIDOC ## WormaCeptorApi.showFloatingButton ### Description Show floating button overlay. ### Method showFloatingButton ### Parameters - **context** (Context) - Required - The context. ### Response Returns Boolean indicating success. ``` -------------------------------- ### WormaCeptorApi.registerExtensionProvider Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Register custom metadata extractor. ```APIDOC ## WormaCeptorApi.registerExtensionProvider ### Description Register custom metadata extractor. ### Method registerExtensionProvider ### Parameters - **provider** (ExtensionProvider) - Required - The provider to register. ### Response No return value. ``` -------------------------------- ### Add mavenCentral() repository in settings.gradle.kts Source: https://github.com/azikar24/wormaceptor/blob/master/README.md Declares mavenCentral() in settings.gradle.kts, required before adding WormaCeptor dependencies. It is already present in the default Android template. ```kotlin dependencyResolutionManagement { repositories { mavenCentral() } } ``` -------------------------------- ### Add WormaCeptorInterceptor to OkHttp client Source: https://github.com/azikar24/wormaceptor/blob/master/README.md Adds WormaCeptorInterceptor to an OkHttpClient.Builder to intercept HTTP/HTTPS traffic. ```kotlin import com.azikar24.wormaceptor.api.WormaCeptorInterceptor val client = OkHttpClient.Builder() .addInterceptor(WormaCeptorInterceptor()) .build() ``` -------------------------------- ### WormaCeptorWebSocket.recordPong(payload) Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Records a pong frame for monitoring. ```APIDOC ## WormaCeptorWebSocket.recordPong(payload: ByteString) ### Description Records a pong frame for monitoring. ### Method Instance method ### Parameters - **payload** (ByteString) - Required - The pong payload ``` -------------------------------- ### Add WormaCeptor dependencies in build.gradle.kts Source: https://github.com/azikar24/wormaceptor/blob/master/README.md Adds the WormaCeptor client and persistence dependencies to the app's build.gradle.kts. The persistence module is added with debugImplementation. ```kotlin dependencies { implementation("com.azikar24.wormaceptor:wormaceptor-client:2.3.1") debugImplementation("com.azikar24.wormaceptor:wormaceptor-persistence:2.3.1") } ``` -------------------------------- ### WormaCeptorApi.getRegisteredExtensionProviders Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md List registered provider names. ```APIDOC ## WormaCeptorApi.getRegisteredExtensionProviders ### Description List registered provider names. ### Method getRegisteredExtensionProviders ### Response Returns List of registered provider names. ``` -------------------------------- ### WormaCeptorApi.isPerformanceOverlayVisible Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Check if overlay is visible. ```APIDOC ## WormaCeptorApi.isPerformanceOverlayVisible ### Description Check if overlay is visible. ### Method isPerformanceOverlayVisible ### Response Returns Boolean indicating if overlay is visible. ``` -------------------------------- ### WormaCeptorInterceptor Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md OkHttp interceptor for capturing HTTP/HTTPS network traffic. ```APIDOC ## WormaCeptorInterceptor ### Description OkHttp interceptor for capturing HTTP/HTTPS network traffic. ### Usage ```kotlin val client = OkHttpClient.Builder() .addInterceptor(WormaCeptorInterceptor()) .build() ``` ### Builder Methods All methods return `WormaCeptorInterceptor` for method chaining. - `showNotification(show: Boolean)` - Enable/disable capture notifications - `maxContentLength(length: Long)` - Set max body size to capture (default: 250KB) - `retainDataFor(period: Period)` - Set data retention period and clean old data - `redactHeader(name: String)` - Add header to redact - `redactBody(pattern: String)` - Add regex pattern to redact in bodies - `redactJsonValue(key: String)` - Redact JSON values by key - `redactXmlValue(tag: String)` - Redact XML values by tag ### Period Enum Data retention periods for `retainDataFor()`: - `ONE_HOUR` - Retain for 1 hour - `ONE_DAY` - Retain for 24 hours - `ONE_WEEK` - Retain for 7 days - `ONE_MONTH` - Retain for 30 days - `FOREVER` - Retain indefinitely ``` -------------------------------- ### WormaCeptorApi.hidePerformanceOverlay Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Hide performance overlay. ```APIDOC ## WormaCeptorApi.hidePerformanceOverlay ### Description Hide performance overlay. ### Method hidePerformanceOverlay ### Response No return value. ``` -------------------------------- ### WormaCeptorWebSocket.recordPing(payload) Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Records a ping frame for monitoring. ```APIDOC ## WormaCeptorWebSocket.recordPing(payload: ByteString) ### Description Records a ping frame for monitoring. ### Method Instance method ### Parameters - **payload** (ByteString) - Required - The ping payload ``` -------------------------------- ### WormaCeptorApi.unregisterExtensionProvider Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Unregister provider by name. ```APIDOC ## WormaCeptorApi.unregisterExtensionProvider ### Description Unregister provider by name. ### Method unregisterExtensionProvider ### Parameters - **name** (String) - Required - The name of the provider. ### Response Returns Boolean indicating success. ``` -------------------------------- ### Redact sensitive data with WormaCeptorInterceptor Source: https://github.com/azikar24/wormaceptor/blob/master/README.md Configure a WormaCeptorInterceptor to redact sensitive data before it reaches the inspector. Use this to strip credentials and PII from headers, JSON values, XML values, and body content matching a regex. For global redaction across all interceptors, use WormaCeptorApi.redactionConfig. ```kotlin val interceptor = WormaCeptorInterceptor() .redactHeader("Authorization") .redactJsonValue("password") .redactXmlValue("apiKey") .redactBody("ssn=\\d{3}-\\d{2}-\\d{4}") ``` -------------------------------- ### RedactionConfig.replacement(text) Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Sets the replacement text for redacted values. ```APIDOC ## RedactionConfig.replacement(text: String) ### Description Sets the replacement text for redacted values (default: "********"). ### Method Instance method ### Parameters - **text** (String) - Required - The replacement text ### Returns RedactionConfig - This instance for chaining ### Usage Example ```kotlin WormaCeptorApi.redactionConfig.replacement("[REDACTED]") ``` ``` -------------------------------- ### RedactionConfig.redactHeader(name) Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Redacts a header by name (case-insensitive). ```APIDOC ## RedactionConfig.redactHeader(name: String) ### Description Redacts a header by name (case-insensitive). ### Method Instance method ### Parameters - **name** (String) - Required - The header name to redact ### Returns RedactionConfig - This instance for chaining ### Usage Example ```kotlin WormaCeptorApi.redactionConfig.redactHeader("Authorization") ``` ``` -------------------------------- ### WormaCeptorApi.hideFloatingButton Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Hide floating button overlay. ```APIDOC ## WormaCeptorApi.hideFloatingButton ### Description Hide floating button overlay. ### Method hideFloatingButton ### Parameters - **context** (Context) - Required - The context. ### Response No return value. ``` -------------------------------- ### WormaCeptorWebSocket.recordSentMessage(bytes) Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Records a sent binary message for monitoring. ```APIDOC ## WormaCeptorWebSocket.recordSentMessage(bytes: ByteString) ### Description Records a sent binary message for monitoring. ### Method Instance method ### Parameters - **bytes** (ByteString) - Required - The binary message to record ``` -------------------------------- ### RedactionConfig.redactBody(pattern) Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Redacts matching regex patterns in the body. ```APIDOC ## RedactionConfig.redactBody(pattern: String) ### Description Redacts matching regex patterns in the body. ### Method Instance method ### Parameters - **pattern** (String) - Required - The regex pattern to redact ### Returns RedactionConfig - This instance for chaining ``` -------------------------------- ### RedactionConfig.redactXmlValue(tag) Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Redacts XML element content by tag. ```APIDOC ## RedactionConfig.redactXmlValue(tag: String) ### Description Redacts XML element content by tag. ### Method Instance method ### Parameters - **tag** (String) - Required - The XML tag to redact ### Returns RedactionConfig - This instance for chaining ### Usage Example ```kotlin WormaCeptorApi.redactionConfig.redactXmlValue("apiKey") ``` ``` -------------------------------- ### RedactionConfig.redactJsonValue(key) Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Redacts JSON values by key. ```APIDOC ## RedactionConfig.redactJsonValue(key: String) ### Description Redacts JSON values by key. ### Method Instance method ### Parameters - **key** (String) - Required - The JSON key to redact ### Returns RedactionConfig - This instance for chaining ### Usage Example ```kotlin WormaCeptorApi.redactionConfig.redactJsonValue("password") ``` ``` -------------------------------- ### WormaCeptorWebSocket.recordSentMessage(text) Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Records a sent text message for monitoring. ```APIDOC ## WormaCeptorWebSocket.recordSentMessage(text: String) ### Description Records a sent text message for monitoring. ### Method Instance method ### Parameters - **text** (String) - Required - The text message to record ### Usage Example ```kotlin webSocket.send(message) monitor.recordSentMessage(message) ``` ``` -------------------------------- ### WormaCeptorApi.isFeatureEnabled Source: https://github.com/azikar24/wormaceptor/blob/master/api/client/PUBLIC_API.md Check if a specific feature is enabled. ```APIDOC ## WormaCeptorApi.isFeatureEnabled ### Description Check if a specific feature is enabled. ### Method isFeatureEnabled ### Parameters - **feature** (Feature) - Required - The feature to check. ### Response Returns Boolean indicating whether the feature is enabled. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.