# EnergyLevel

# EnergyLevel

Artifact:[androidx.car.app:app](https://developer.android.com/jetpack/androidx/releases/car-app)  
[View Source](https://cs.android.com/search?q=file:androidx/car/app/hardware/info/EnergyLevel.java+class:androidx.car.app.hardware.info.EnergyLevel)  
Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/car/app/hardware/info/EnergyLevel "View this page in Java")

<br />

```
@CarProtocol
@RequiresCarApi(value = 3)
class EnergyLevel
```

<br />

*** ** * ** ***

Information of the energy (fuel and battery) levels from the car hardware.

## Summary

|                                                                                                                    ### Nested types                                                                                                                    |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `class `[EnergyLevel.Builder](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/EnergyLevel.Builder) A builder of[EnergyLevel](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/EnergyLevel). |

|                                                                                      ### Public functions                                                                                      |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                                                                            | [equals](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/EnergyLevel#equals(java.lang.Object))`(other: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)`                                                                                                                    |
| [CarValue](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarValue)`<`[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`!>`     | [getBatteryPercent](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/EnergyLevel#getBatteryPercent())`()` Returns the battery percentage remaining from the car hardware.                                                                                                                                   |
| [CarValue](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarValue)`<`[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`!>`         | [getDistanceDisplayUnit](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/EnergyLevel#getDistanceDisplayUnit())`()` Returns the distance display unit from the car hardware.                                                                                                                                |
| [CarValue](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarValue)`<`[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`!>` | [getEnergyIsLow](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/EnergyLevel#getEnergyIsLow())`()` Returns if the remaining car energy is low from the car hardware.                                                                                                                                       |
| [CarValue](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarValue)`<`[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`!>`     | [getFuelPercent](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/EnergyLevel#getFuelPercent())`()` Returns the fuel percentage remaining from the car hardware.                                                                                                                                            |
| [CarValue](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarValue)`<`[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`!>`         | `@`[ExperimentalCarApi](https://developer.android.com/reference/kotlin/androidx/car/app/annotations/ExperimentalCarApi) [getFuelVolumeDisplayUnit](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/EnergyLevel#getFuelVolumeDisplayUnit())`()` Returns the fuel volume display unit from the car hardware. |
| [CarValue](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarValue)`<`[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`!>`     | [getRangeRemainingMeters](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/EnergyLevel#getRangeRemainingMeters())`()` Returns the range remaining from the car hardware in meters.                                                                                                                          |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                                                    | [hashCode](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/EnergyLevel#hashCode())`()`                                                                                                                                                                                                                     |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                                                                                                              | [toString](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/EnergyLevel#toString())`()`                                                                                                                                                                                                                     |

## Public functions

### equals

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

### getBatteryPercent

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)  

```
fun getBatteryPercent(): CarValue<Float!>
```

Returns the battery percentage remaining from the car hardware.  

### getDistanceDisplayUnit

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)  

```
fun getDistanceDisplayUnit(): CarValue<Int!>
```

Returns the distance display unit from the car hardware.

See[CarUnit](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarUnit)for possible distance values.  

### getEnergyIsLow

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)  

```
fun getEnergyIsLow(): CarValue<Boolean!>
```

Returns if the remaining car energy is low from the car hardware.  

### getFuelPercent

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)  

```
fun getFuelPercent(): CarValue<Float!>
```

Returns the fuel percentage remaining from the car hardware.  

### getFuelVolumeDisplayUnit

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)  

```
@ExperimentalCarApi
fun getFuelVolumeDisplayUnit(): CarValue<Int!>
```

Returns the fuel volume display unit from the car hardware.

See[CarUnit](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarUnit)for possible volume values.  

### getRangeRemainingMeters

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)  

```
fun getRangeRemainingMeters(): CarValue<Float!>
```

Returns the range remaining from the car hardware in meters.  

### hashCode

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

### toString

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