# getRecommendation()

> The same, with a callback (Java).

Source: https://docs.tryyoursize.com/reference/android/get-recommendation/

*Method* · `com.tryyoursize:tryyoursize-android`

The same, with a callback (Java).

```kotlin
public fun getRecommendation(product: String, callback: (Result<Recommendation>) -> Unit)
```

## Parameters

- **`product`** (`String`, required): Your product ID or SKU.
- **`callback`** (`(Result<Recommendation>) -> Unit`, required): Called once with the result.

## Example

**Kotlin**

```kotlin
tys.getRecommendation("SKU-123") { result ->
    result.onSuccess { rec -> if (rec.status == Recommendation.Status.READY) selected = rec.size }
}
```
