# GrammaticalInflectionManagerCompat

# GrammaticalInflectionManagerCompat

Artifact:[androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core)  
[View Source](https://cs.android.com/search?q=file:androidx/core/app/GrammaticalInflectionManagerCompat.java+class:androidx.core.app.GrammaticalInflectionManagerCompat)  
Added in[1.12.0](https://developer.android.com/jetpack/androidx/releases/core#1.12.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/app/GrammaticalInflectionManagerCompat "View this page in Java")

<br />

```
class GrammaticalInflectionManagerCompat
```

<br />

*** ** * ** ***

Helper for accessing features in[android.app.GrammaticalInflectionManager](https://developer.android.com/reference/android/app/GrammaticalInflectionManager.html).

## Summary

|                                    ### Constants                                    |
|-------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [GRAMMATICAL_GENDER_FEMININE](https://developer.android.com/reference/kotlin/androidx/core/app/GrammaticalInflectionManagerCompat#GRAMMATICAL_GENDER_FEMININE())` = 2` Constant for grammatical gender: to indicate the terms of address the user preferred in an application is feminine.         |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [GRAMMATICAL_GENDER_MASCULINE](https://developer.android.com/reference/kotlin/androidx/core/app/GrammaticalInflectionManagerCompat#GRAMMATICAL_GENDER_MASCULINE())` = 3` Constant for grammatical gender: to indicate the terms of address the user preferred in an application is masculine.      |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [GRAMMATICAL_GENDER_NEUTRAL](https://developer.android.com/reference/kotlin/androidx/core/app/GrammaticalInflectionManagerCompat#GRAMMATICAL_GENDER_NEUTRAL())` = 1` Constant for grammatical gender: to indicate the terms of address the user preferred in an application is neuter.             |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [GRAMMATICAL_GENDER_NOT_SPECIFIED](https://developer.android.com/reference/kotlin/androidx/core/app/GrammaticalInflectionManagerCompat#GRAMMATICAL_GENDER_NOT_SPECIFIED())` = 0` Constant for grammatical gender: to indicate the user has not specified the terms of address for the application. |

|                                    ### Public functions                                     |
|---------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java-static `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)   | `@`[AnyThread](https://developer.android.com/reference/kotlin/androidx/annotation/AnyThread) [getApplicationGrammaticalGender](https://developer.android.com/reference/kotlin/androidx/core/app/GrammaticalInflectionManagerCompat#getApplicationGrammaticalGender(android.content.Context))`(context: `[Context](https://developer.android.com/reference/android/content/Context.html)`)` Returns the current grammatical gender.                                                                                                                              |
| `java-static `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | `@`[AnyThread](https://developer.android.com/reference/kotlin/androidx/annotation/AnyThread) [setRequestedApplicationGrammaticalGender](https://developer.android.com/reference/kotlin/androidx/core/app/GrammaticalInflectionManagerCompat#setRequestedApplicationGrammaticalGender(android.content.Context,int))`(` ` context: `[Context](https://developer.android.com/reference/android/content/Context.html)`,` ` grammaticalGender: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) `)` Sets the current grammatical gender. |

## Constants

### GRAMMATICAL_GENDER_FEMININE

Added in[1.12.0](https://developer.android.com/jetpack/androidx/releases/core#1.12.0)  

```
const val GRAMMATICAL_GENDER_FEMININE = 2: Int
```

Constant for grammatical gender: to indicate the terms of address the user preferred in an application is feminine.  

|                                                                  See also                                                                   |
|---------------------------------------------------------------------------------------------------------------------------------------------|---|
| [GRAMMATICAL_GENDER_FEMININE](https://developer.android.com/reference/android/content/res/Configuration.html#GRAMMATICAL_GENDER_FEMININE()) |   |

### GRAMMATICAL_GENDER_MASCULINE

Added in[1.12.0](https://developer.android.com/jetpack/androidx/releases/core#1.12.0)  

```
const val GRAMMATICAL_GENDER_MASCULINE = 3: Int
```

Constant for grammatical gender: to indicate the terms of address the user preferred in an application is masculine.  

|                                                                   See also                                                                    |
|-----------------------------------------------------------------------------------------------------------------------------------------------|---|
| [GRAMMATICAL_GENDER_MASCULINE](https://developer.android.com/reference/android/content/res/Configuration.html#GRAMMATICAL_GENDER_MASCULINE()) |   |

### GRAMMATICAL_GENDER_NEUTRAL

Added in[1.12.0](https://developer.android.com/jetpack/androidx/releases/core#1.12.0)  

```
const val GRAMMATICAL_GENDER_NEUTRAL = 1: Int
```

Constant for grammatical gender: to indicate the terms of address the user preferred in an application is neuter.  

|                                                                 See also                                                                  |
|-------------------------------------------------------------------------------------------------------------------------------------------|---|
| [GRAMMATICAL_GENDER_NEUTRAL](https://developer.android.com/reference/android/content/res/Configuration.html#GRAMMATICAL_GENDER_NEUTRAL()) |   |

### GRAMMATICAL_GENDER_NOT_SPECIFIED

Added in[1.12.0](https://developer.android.com/jetpack/androidx/releases/core#1.12.0)  

```
const val GRAMMATICAL_GENDER_NOT_SPECIFIED = 0: Int
```

Constant for grammatical gender: to indicate the user has not specified the terms of address for the application.  

|                                                                       See also                                                                        |
|-------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [GRAMMATICAL_GENDER_NOT_SPECIFIED](https://developer.android.com/reference/android/content/res/Configuration.html#GRAMMATICAL_GENDER_NOT_SPECIFIED()) |   |

## Public functions

### getApplicationGrammaticalGender

Added in[1.12.0](https://developer.android.com/jetpack/androidx/releases/core#1.12.0)  

```
@AnyThread
java-static fun getApplicationGrammaticalGender(context: Context): Int
```

Returns the current grammatical gender. No-op on versions prior to[UPSIDE_DOWN_CAKE](https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#UPSIDE_DOWN_CAKE()).  

|                                         Parameters                                         |
|--------------------------------------------------------------------------------------------|-----------------------------------|
| `context: `[Context](https://developer.android.com/reference/android/content/Context.html) | Context to retrieve service from. |

|                                   Returns                                   |
|-----------------------------------------------------------------------------|-------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | the grammatical gender if device API level is greater than 33, otherwise, return 0. |

### setRequestedApplicationGrammaticalGender

Added in[1.12.0](https://developer.android.com/jetpack/androidx/releases/core#1.12.0)  

```
@AnyThread
java-static fun setRequestedApplicationGrammaticalGender(
    context: Context,
    grammaticalGender: Int
): Unit
```

Sets the current grammatical gender. No-op on versions prior to[UPSIDE_DOWN_CAKE](https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#UPSIDE_DOWN_CAKE()).  

|                                            Parameters                                            |
|--------------------------------------------------------------------------------------------------|------------------------------------------------------------|
| `context: `[Context](https://developer.android.com/reference/android/content/Context.html)       | Context to retrieve service from.                          |
| `grammaticalGender: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | the terms of address the user preferred in an application. |