📄️ Overview
This document is meant for whoever is wiring the B2Metric Android SDK into an app. It covers the setup steps in the order you'll actually hit them: adding the dependency, starting the SDK, sending your first event, and then the details you'll want later, like push notification handling and how the offline queue behaves when the device loses connectivity.
📄️ Installation
Add the Dependency
📄️ Quick Start
Call start() once at app startup, on the main thread — Application.onCreate is the conventional place:
📄️ Configuration
| Option | Type | Required | Default | Range | Description |
📄️ Behavior
Every event is written to the on-device SQLite store at logEvent time, so a process death before delivery loses nothing. Delivery goes out in batches of batchSize, one request per flush attempt, cascading while the queue still holds a full batch.
📄️ Event Tracking
Blank names and names longer than 255 characters are rejected with a warning. Property values must be JSON-compliant. Date values are converted to UTC ISO-8601 strings; unsupported types (custom objects, NaN, infinities) are dropped with a warning.
📄️ User Identification
Logs a useridentify event and attaches the user's attributes to the userproperties of this and every subsequent event. Each call replaces the previous user entirely, and nothing is persisted across restarts, so call it again on every launch.
📄️ Push Notifications
Firebase Cloud Messaging (FCM)
📄️ Lifecycle Management
Flush on Demand
📄️ Debug Mode
| Level | Emits |
📄️ Best Practices
- Use snakecase, action-oriented event names (usersignedup, productaddedtocart)
📄️ Troubleshooting
| Symptom | Resolution |
📄️ API Reference
| Method | Description |
📄️ Support
- B2Metric website
📄️ Release History
v2.0.0