# DeviceSpec

# DeviceSpec

[View Source](https://cs.android.com/search?q=file:com/android/build/api/variant/DeviceSpec.kt+class:com.android.build.api.variant.DeviceSpec)  
Added in 8.9.3  

<br />

```
@Incubating
class DeviceSpec
```

<br />

*** ** * ** ***

A class representing device-specific attributes.

## Summary

|                                                                                                          ### Nested types                                                                                                           |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html) `class `[DeviceSpec.Builder](https://developer.android.com/reference/tools/gradle-api/8.9/com/android/build/api/variant/DeviceSpec.Builder) |

|                                        ### Public functions                                        |
|----------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `open operator `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [equals](https://developer.android.com/reference/tools/gradle-api/8.9/com/android/build/api/variant/DeviceSpec#equals(kotlin.Any))`(other: `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`?)` |
| `open `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                  | [hashCode](https://developer.android.com/reference/tools/gradle-api/8.9/com/android/build/api/variant/DeviceSpec#hashCode())`()`                                                                                           |
| `open `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)            | [toString](https://developer.android.com/reference/tools/gradle-api/8.9/com/android/build/api/variant/DeviceSpec#toString())`()`                                                                                           |

|                                                                             ### Public properties                                                                              |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>` | [abis](https://developer.android.com/reference/tools/gradle-api/8.9/com/android/build/api/variant/DeviceSpec#abis()) The ABIs of the device.                                                          |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                     | [apiLevel](https://developer.android.com/reference/tools/gradle-api/8.9/com/android/build/api/variant/DeviceSpec#apiLevel()) The API level of the device.                                             |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?`                                                                                            | [codeName](https://developer.android.com/reference/tools/gradle-api/8.9/com/android/build/api/variant/DeviceSpec#codeName()) The code name of the device.                                             |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?`                                                                                            | [name](https://developer.android.com/reference/tools/gradle-api/8.9/com/android/build/api/variant/DeviceSpec#name()) The name of the device which can be helpful in debugging.                        |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                     | [screenDensity](https://developer.android.com/reference/tools/gradle-api/8.9/com/android/build/api/variant/DeviceSpec#screenDensity()) The screen density of the device.                              |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                                                                             | [supportsPrivacySandbox](https://developer.android.com/reference/tools/gradle-api/8.9/com/android/build/api/variant/DeviceSpec#supportsPrivacySandbox()) Whether the device supports Privacy Sandbox. |

## Public functions

### equals

Added in 8.9.3  

```
open operator fun equals(other: Any?): Boolean
```  

### hashCode

Added in 8.9.3  

```
open fun hashCode(): Int
```  

### toString

Added in 8.9.3  

```
open fun toString(): String
```  

## Public properties

### abis

Added in 8.9.3  

```
val abis: List<String>
```

The ABIs of the device.  

### apiLevel

Added in 8.9.3  

```
val apiLevel: Int
```

The API level of the device.  

### codeName

Added in 8.9.3  

```
val codeName: String?
```

The code name of the device.  

### name

Added in 8.9.3  

```
val name: String?
```

The name of the device which can be helpful in debugging.  

### screenDensity

Added in 8.9.3  

```
val screenDensity: Int
```

The screen density of the device.  

### supportsPrivacySandbox

Added in 8.9.3  

```
val supportsPrivacySandbox: Boolean
```

Whether the device supports Privacy Sandbox.