Installation

Add this code to your Android project to initialize Hardal and start sending events:

Configuration Options

For Android integration, you can customize the following:

  • Custom event properties
  • Event batching
  • Retry logic for failed requests
  • Background thread management

Example Usage

// Initialize the client
val hardalClient = HardalClient()

// Track a custom event
hardalClient.sendEvent(
    eventName = "purchase_completed",
    properties = mapOf(
        "product_id" to "123",
        "price" to 99.99,
        "currency" to "USD"
    )
)

Troubleshooting

Validation

To validate your Android integration:

  1. Monitor Logcat in Android Studio
  2. Use the Network Profiler to inspect requests
  3. Check for successful HTTP responses (200 status code)
  4. Verify events appear in your Hardal dashboard

For development, you can enable detailed logging by setting the log level to VERBOSE in your application’s debug configuration.