Best Practices
Recommended patterns for integrating WormaCeptor in your Android project.
Best Practices
-
Initialize early -- Call
WormaCeptorApi.init()at the start ofApplication.onCreate()before creating HTTP clients -
Always use
debugImplementation-- Never useimplementationfor persistence/imdb modules -
Redact sensitive data -- Configure
redactHeader()andredactJsonValue()for auth tokens, passwords, and PII before any network calls -
Set content limits -- Keep
maxContentLengthreasonable (250KB-500KB) to avoid excessive memory/storage use -
Use selective features -- Disable features you don't need to reduce initialization overhead
-
Record WebSocket sends -- OkHttp doesn't notify listeners of outgoing messages; always call
recordSentMessage() -
Handle overlay permissions -- Check
canShowFloatingButton()before showing overlays and guide users to settings if needed -
Use deep links for testing -- Deep links let you navigate directly to any tool programmatically
-
Register extension providers early -- Register before network traffic starts to capture metadata from the first request
-
Leverage no-op safety -- All WormaCeptor API calls are safe in release builds; no conditional wrapping needed