# SpellCheckerSession.SpellCheckerSessionParams

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# SpellCheckerSessionParams

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/view/textservice/SpellCheckerSession.SpellCheckerSessionParams "View this page in Java")  

```
open class SpellCheckerSessionParams
```

|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                                                   ||
| ↳ | [android.view.textservice.SpellCheckerSession.SpellCheckerSessionParams](https://developer.android.com/reference/kotlin/android/view/textservice/SpellCheckerSession.SpellCheckerSessionParams#) |

Parameters used to create a[SpellCheckerSession](https://developer.android.com/reference/kotlin/android/view/textservice/SpellCheckerSession).

## Summary

|                                                                                                                                               Nested classes                                                                                                                                               ||
|---|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|   | [Builder](https://developer.android.com/reference/kotlin/android/view/textservice/SpellCheckerSession.SpellCheckerSessionParams.Builder) Builder of[SpellCheckerSessionParams](https://developer.android.com/reference/kotlin/android/view/textservice/SpellCheckerSession.SpellCheckerSessionParams#). |

|                                                                                                                                                                                                                                                                            Public methods                                                                                                                                                                                                                                                                            ||
|----------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)   | [getExtras](https://developer.android.com/reference/kotlin/android/view/textservice/SpellCheckerSession.SpellCheckerSessionParams#getExtras())`()` Returns a bundle containing extra parameters for the spell checker.                                                                                                                                                                                                                                                       |
| open[Locale](https://developer.android.com/reference/kotlin/java/util/Locale.html#)?   | [getLocale](https://developer.android.com/reference/kotlin/android/view/textservice/SpellCheckerSession.SpellCheckerSessionParams#getLocale())`()` Returns the locale in which the spell checker should operate.                                                                                                                                                                                                                                                             |
| open[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [getSupportedAttributes](https://developer.android.com/reference/kotlin/android/view/textservice/SpellCheckerSession.SpellCheckerSessionParams#getSupportedAttributes())`()` Returns a bitmask of[SuggestionsInfo](https://developer.android.com/reference/kotlin/android/view/textservice/SuggestionsInfo)attributes that the spell checker can set in[SuggestionsInfo](https://developer.android.com/reference/kotlin/android/view/textservice/SuggestionsInfo)it returns. |
| open[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [shouldReferToSpellCheckerLanguageSettings](https://developer.android.com/reference/kotlin/android/view/textservice/SpellCheckerSession.SpellCheckerSessionParams#shouldReferToSpellCheckerLanguageSettings())`()` Returns true if the user's spell checker language settings should be used to determine the spell checker locale.                                                                                                                                          |

## Public methods

### getExtras

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun getExtras(): Bundle
```

Returns a bundle containing extra parameters for the spell checker.

This bundle can be used to pass implementation-specific parameters to the[android.service.textservice.SpellCheckerService](https://developer.android.com/reference/kotlin/android/service/textservice/SpellCheckerService.html#)implementation.

|                                                    Return                                                     ||
|----------------------------------------------------------------------------------|-----------------------------|
| [Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#) | This value cannot be`null`. |

**See Also**

- [android.service.textservice.SpellCheckerService.Session#getBundle()](https://developer.android.com/reference/kotlin/android/service/textservice/SpellCheckerService.Session.html#getBundle())  

### getLocale

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun getLocale(): Locale?
```

Returns the locale in which the spell checker should operate.

|                                                   Return                                                   ||
|----------------------------------------------------------------------------------|--------------------------|
| [Locale](https://developer.android.com/reference/kotlin/java/util/Locale.html#)? | This value may be`null`. |

**See Also**

- [android.service.textservice.SpellCheckerService.Session#getLocale()](https://developer.android.com/reference/kotlin/android/service/textservice/SpellCheckerService.Session.html#getLocale())  

### getSupportedAttributes

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun getSupportedAttributes(): Int
```

Returns a bitmask of[SuggestionsInfo](https://developer.android.com/reference/kotlin/android/view/textservice/SuggestionsInfo)attributes that the spell checker can set in[SuggestionsInfo](https://developer.android.com/reference/kotlin/android/view/textservice/SuggestionsInfo)it returns.

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             Return                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ||
|----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | Value is either`0`or a combination of[android.view.textservice.SuggestionsInfo#RESULT_ATTR_IN_THE_DICTIONARY](https://developer.android.com/reference/kotlin/android/view/textservice/SuggestionsInfo#RESULT_ATTR_IN_THE_DICTIONARY:kotlin.Int),[android.view.textservice.SuggestionsInfo#RESULT_ATTR_LOOKS_LIKE_TYPO](https://developer.android.com/reference/kotlin/android/view/textservice/SuggestionsInfo#RESULT_ATTR_LOOKS_LIKE_TYPO:kotlin.Int),[android.view.textservice.SuggestionsInfo#RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS](https://developer.android.com/reference/kotlin/android/view/textservice/SuggestionsInfo#RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS:kotlin.Int),[android.view.textservice.SuggestionsInfo#RESULT_ATTR_LOOKS_LIKE_GRAMMAR_ERROR](https://developer.android.com/reference/kotlin/android/view/textservice/SuggestionsInfo#RESULT_ATTR_LOOKS_LIKE_GRAMMAR_ERROR:kotlin.Int), and[android.view.textservice.SuggestionsInfo#RESULT_ATTR_DONT_SHOW_UI_FOR_SUGGESTIONS](https://developer.android.com/reference/kotlin/android/view/textservice/SuggestionsInfo#RESULT_ATTR_DONT_SHOW_UI_FOR_SUGGESTIONS:kotlin.Int) |

**See Also**

- [android.service.textservice.SpellCheckerService.Session#getSupportedAttributes()](https://developer.android.com/reference/kotlin/android/service/textservice/SpellCheckerService.Session.html#getSupportedAttributes())  

### shouldReferToSpellCheckerLanguageSettings

Added in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun shouldReferToSpellCheckerLanguageSettings(): Boolean
```

Returns true if the user's spell checker language settings should be used to determine the spell checker locale.