CarFeatures


class CarFeatures


Class for checking for whether car related features are available on the system.

Summary

Constants

const String!
FEATURE_BACKGROUND_AUDIO_WHILE_DRIVING = "com.android.car.background_audio_while_driving"

Flag value to check whether or not audio is allowed to play while driving.

Public functions

java-static Boolean
isFeatureEnabled(context: Context, feature: String)

Checks whether the system enables a given CarFeature.

Constants

FEATURE_BACKGROUND_AUDIO_WHILE_DRIVING

Added in 1.7.0-beta03
const val FEATURE_BACKGROUND_AUDIO_WHILE_DRIVING = "com.android.car.background_audio_while_driving": String!

Flag value to check whether or not audio is allowed to play while driving.

Public functions

isFeatureEnabled

Added in 1.7.0-beta03
java-static fun isFeatureEnabled(context: Context, feature: String): Boolean

Checks whether the system enables a given CarFeature.

Parameters
context: Context

The context with which to query for the CarFeature.

feature: String

The CarFeature to query for.

Returns
Boolean

Whether the system enables a given CarFeature.