# 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)

*** ** * ** ***


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

<br />

*** ** * ** ***

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

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/car/app/hardware/info/EnergyLevel.Builder` A builder of `https://developer.android.com/reference/androidx/car/app/hardware/info/EnergyLevel`. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/car/app/hardware/info/EnergyLevel#equals(java.lang.Object)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Object.html other)` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/common/CarValue<https://developer.android.com/reference/java/lang/Float.html>` | `https://developer.android.com/reference/androidx/car/app/hardware/info/EnergyLevel#getBatteryPercent()()` Returns the battery percentage remaining from the car hardware. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/common/CarValue<https://developer.android.com/reference/java/lang/Integer.html>` | `https://developer.android.com/reference/androidx/car/app/hardware/info/EnergyLevel#getDistanceDisplayUnit()()` Returns the distance display unit from the car hardware. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/common/CarValue<https://developer.android.com/reference/java/lang/Boolean.html>` | `https://developer.android.com/reference/androidx/car/app/hardware/info/EnergyLevel#getEnergyIsLow()()` Returns if the remaining car energy is low from the car hardware. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/common/CarValue<https://developer.android.com/reference/java/lang/Float.html>` | `https://developer.android.com/reference/androidx/car/app/hardware/info/EnergyLevel#getFuelPercent()()` Returns the fuel percentage remaining from the car hardware. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/common/CarValue<https://developer.android.com/reference/java/lang/Integer.html>` | `@https://developer.android.com/reference/androidx/car/app/annotations/ExperimentalCarApi https://developer.android.com/reference/androidx/car/app/hardware/info/EnergyLevel#getFuelVolumeDisplayUnit()()` Returns the fuel volume display unit from the car hardware. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/common/CarValue<https://developer.android.com/reference/java/lang/Float.html>` | `https://developer.android.com/reference/androidx/car/app/hardware/info/EnergyLevel#getRangeRemainingMeters()()` Returns the range remaining from the car hardware in meters. |
| `int` | `https://developer.android.com/reference/androidx/car/app/hardware/info/EnergyLevel#hashCode()()` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/car/app/hardware/info/EnergyLevel#toString()()` |

## Public methods

### equals

```
public boolean equals(@Nullable Object other)
```

### getBatteryPercent

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

```
public @NonNull CarValue<Float> getBatteryPercent()
```

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)

```
public @NonNull CarValue<Integer> getDistanceDisplayUnit()
```

Returns the distance display unit from the car hardware.

See `https://developer.android.com/reference/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)

```
public @NonNull CarValue<Boolean> getEnergyIsLow()
```

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)

```
public @NonNull CarValue<Float> getFuelPercent()
```

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
public @NonNull CarValue<Integer> getFuelVolumeDisplayUnit()
```

Returns the fuel volume display unit from the car hardware.

See `https://developer.android.com/reference/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)

```
public @NonNull CarValue<Float> getRangeRemainingMeters()
```

Returns the range remaining from the car hardware in meters.

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```