> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zixflow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Core Features

> User identification, event tracking, and core SDK features for Android.

### User Identification

Identify users to track their activity:

```kotlin theme={null}
// Identify user with ID only
Zixflow.instance().identify(userId = "user@example.com")

// Identify user with additional attributes
Zixflow.instance().identify(
    userId = "user@example.com",
    traits = mapOf(
        "first_name" to "John",
        "last_name" to "Doe",
        "email" to "user@example.com",
        "plan" to "premium"
    )
)
```

**Java:**

```java theme={null}
// Identify user with ID only
Zixflow.instance().identify("user@example.com");

// Identify user with attributes
Map<String, Object> traits = new HashMap<>();
traits.put("first_name", "John");
traits.put("last_name", "Doe");
traits.put("email", "user@example.com");
Zixflow.instance().identify("user@example.com", traits);
```

### Event Tracking

Track custom events:

```kotlin theme={null}
// Simple event
Zixflow.instance().track(name = "Button Clicked")

// Event with properties
Zixflow.instance().track(
    name = "Product Purchased",
    properties = mapOf(
        "product_id" to "123",
        "product_name" to "Widget",
        "price" to 29.99,
        "currency" to "USD"
    )
)

// Event with timestamp
Zixflow.instance().track(
    name = "Order Completed",
    properties = mapOf("order_id" to "ABC123"),
    timestamp = System.currentTimeMillis()
)
```

**Java:**

```java theme={null}
// Simple event
Zixflow.instance().track("Button Clicked");

// Event with properties
Map<String, Object> properties = new HashMap<>();
properties.put("product_id", "123");
properties.put("product_name", "Widget");
properties.put("price", 29.99);
Zixflow.instance().track("Product Purchased", properties);
```

### Screen Tracking

Track screen views:

```kotlin theme={null}
// Manual screen tracking
Zixflow.instance().screen(
    title = "Product Detail",
    properties = mapOf(
        "product_id" to "123",
        "category" to "Electronics"
    )
)

// Enable automatic activity screen tracking (in configuration)
val config = ZixflowConfigBuilder(this, "YOUR_API_KEY")
    .autoTrackActivityScreens(true)
    .build()
```

**Java:**

```java theme={null}
// Manual screen tracking
Map<String, Object> properties = new HashMap<>();
properties.put("product_id", "123");
properties.put("category", "Electronics");
Zixflow.instance().screen("Product Detail", properties);
```

### Profile Attributes

Set user profile attributes:

```kotlin theme={null}
// Set profile attributes
Zixflow.instance().setProfileAttributes(
    mapOf(
        "age" to 30,
        "gender" to "male",
        "subscription_status" to "active"
    )
)
```

**Java:**

```java theme={null}
Map<String, Object> attributes = new HashMap<>();
attributes.put("age", 30);
attributes.put("gender", "male");
Zixflow.instance().setProfileAttributes(attributes);
```

### Device Attributes

Set device attributes:

```kotlin theme={null}
// Set device-specific attributes
Zixflow.instance().setDeviceAttributes(
    mapOf(
        "app_version" to "2.1.0",
        "device_model" to BuildConfig.MODEL,
        "os_version" to Build.VERSION.RELEASE
    )
)
```

### User Logout

Clear user identification when they log out:

```kotlin theme={null}
// Clear identified user
Zixflow.instance().clearIdentify()
```

**Java:**

```java theme={null}
Zixflow.instance().clearIdentify();
```

### Get Device Token

Retrieve the registered push notification device token:

```kotlin theme={null}
val deviceToken = Zixflow.instance().registeredDeviceToken
if (deviceToken != null) {
    println("Device token: $deviceToken")
} else {
    println("Device token not yet registered")
}
```

***
