public interface

CarClimateProfileCallback

 androidx.car.app.hardware.climate.CarClimateProfileCallback

Gradle dependencies

compile group: 'androidx.car.app', name: 'app', version: '1.7.0-beta01'

  • groupId: androidx.car.app
  • artifactId: app
  • version: 1.7.0-beta01

Artifact androidx.car.app:app:1.7.0-beta01 it located at Google repository (https://maven.google.com/)

Overview

A callback for the car climate profiles returned from the car hardware, for example, Fan speed, Temperature etc.

Summary

Methods
public voidonCabinTemperatureProfileAvailable(CabinTemperatureProfile cabinTemperatureProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_CABIN_TEMPERATURE is available.

public voidonCarZoneMappingInfoProfileAvailable(CarZoneMappingInfoProfile carZoneMappingInfoProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_CAR_ZONE_MAPPING is available.

public voidonDefrosterProfileAvailable(DefrosterProfile defrosterProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_HVAC_DEFROSTER is available.

public voidonElectricDefrosterProfileAvailable(ElectricDefrosterProfile electricDefrosterProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_HVAC_ELECTRIC_DEFROSTER is available.

public voidonFanDirectionProfileAvailable(FanDirectionProfile fanDirectionProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_FAN_DIRECTION is available.

public voidonFanSpeedLevelProfileAvailable(FanSpeedLevelProfile fanSpeedLevelProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_FAN_SPEED is available.

public voidonHvacAcProfileAvailable(HvacAcProfile hvacAcProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_HVAC_AC is available.

public voidonHvacAutoModeProfileAvailable(HvacAutoModeProfile hvacAutoModeProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_HVAC_AUTO_MODE is available.

public voidonHvacAutoRecirculationProfileAvailable(HvacAutoRecirculationProfile hvacAutoRecirculationProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_HVAC_AUTO_RECIRCULATION is available.

public voidonHvacDualModeProfileAvailable(HvacDualModeProfile hvacDualModeProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_HVAC_DUAL_MODE is available.

public voidonHvacMaxAcModeProfileAvailable(HvacMaxAcModeProfile hvacMaxAcModeProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_HVAC_MAX_AC is available.

public voidonHvacPowerProfileAvailable(HvacPowerProfile hvacPowerProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_HVAC_POWER is available.

public voidonHvacRecirculationProfileAvailable(HvacRecirculationProfile hvacRecirculationProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_HVAC_RECIRCULATION is available.

public voidonMaxDefrosterProfileAvailable(MaxDefrosterProfile maxDefrosterProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_HVAC_MAX_DEFROSTER is available.

public voidonSeatTemperatureLevelProfileAvailable(SeatTemperatureProfile seatTemperatureProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_SEAT_TEMPERATURE_LEVEL is available.

public voidonSeatVentilationLevelProfileAvailable(SeatVentilationProfile seatVentilationProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_SEAT_VENTILATION_LEVEL is available.

public voidonSteeringWheelHeatProfileAvailable(SteeringWheelHeatProfile steeringWheelHeatProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_STEERING_WHEEL_HEAT is available.

Methods

public void onHvacPowerProfileAvailable(HvacPowerProfile hvacPowerProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_HVAC_POWER is available.

Applications will get multiple callbacks if the car climate system can control the HVAC power independently in multiple zones. Returns an empty list if the car can not support the feature.

Parameters:

hvacPowerProfile: an object of HvacPowerProfile class containing information about the feature's supported zones

public void onHvacAcProfileAvailable(HvacAcProfile hvacAcProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_HVAC_AC is available.

Applications will get multiple callbacks if the car climate system can control the HVAC AC mode independently in multiple zones. Returns an empty list if the car can not support the feature.

Parameters:

hvacAcProfile: an object of HvacAcProfile class containing information about the feature's supported zones

public void onHvacMaxAcModeProfileAvailable(HvacMaxAcModeProfile hvacMaxAcModeProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_HVAC_MAX_AC is available.

Applications will get multiple callbacks if the car climate system can control the HVAC MAX AC mode independently in multiple zones. Returns an empty list if the car can not support the feature.

Parameters:

hvacMaxAcModeProfile: an object of HvacMaxAcModeProfile class containing information about the feature's supported zones

public void onCabinTemperatureProfileAvailable(CabinTemperatureProfile cabinTemperatureProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_CABIN_TEMPERATURE is available.

Applications will get a single callback containing a list of different temperatures in Celsius and Fahrenheit for different groups of zones. Returns empty lists if the car can not support the feature. s

Parameters:

cabinTemperatureProfile: an object of CabinTemperatureProfile class containing information about the feature's supported values

public void onFanSpeedLevelProfileAvailable(FanSpeedLevelProfile fanSpeedLevelProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_FAN_SPEED is available.

Applications will get a single callback containing a list of different fan speed levels for different groups of zones. Returns empty lists if the car cannot support the feature.

Parameters:

fanSpeedLevelProfile: an object of FanSpeedLevelProfile class containing information about the feature's supported values

public void onFanDirectionProfileAvailable(FanDirectionProfile fanDirectionProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_FAN_DIRECTION is available.

Applications will get a single callback containing a list of different fan directions for different groups of zones. Returns empty lists if the car cannot support the feature.

Parameters:

fanDirectionProfile: an object of FanDirectionProfile class containing information about the feature's supported values

public void onSeatTemperatureLevelProfileAvailable(SeatTemperatureProfile seatTemperatureProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_SEAT_TEMPERATURE_LEVEL is available.

Applications will get a single callback containing a list of different seat temperature levels for different groups of zones. Returns empty lists if the car cannot support the feature.

The return list can have negative and positive values. Negative values indicate cooling level. Positive values indicates heating level.

Parameters:

seatTemperatureProfile: an object of SeatTemperatureProfile class containing information about the feature's supported values

public void onSeatVentilationLevelProfileAvailable(SeatVentilationProfile seatVentilationProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_SEAT_VENTILATION_LEVEL is available.

Applications will get a single callback containing a list of different seat ventilation levels for different groups of zones. Returns empty lists if the car cannot support the feature.

Parameters:

seatVentilationProfile: an object of SeatVentilationProfile class containing information about the feature's supported values

public void onSteeringWheelHeatProfileAvailable(SteeringWheelHeatProfile steeringWheelHeatProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_STEERING_WHEEL_HEAT is available.

Parameters:

steeringWheelHeatProfile: an object of SteeringWheelHeatProfile class containing information about the feature's supported values

public void onHvacRecirculationProfileAvailable(HvacRecirculationProfile hvacRecirculationProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_HVAC_RECIRCULATION is available.

Applications will get multiple callbacks if the car climate system can control the HVAC recirculation independently in multiple zones. Returns an empty list if the car can not support the feature.

Parameters:

hvacRecirculationProfile: an object of HvacRecirculationProfile class containing information about the feature's supported zones

public void onHvacAutoRecirculationProfileAvailable(HvacAutoRecirculationProfile hvacAutoRecirculationProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_HVAC_AUTO_RECIRCULATION is available.

Applications will get multiple callbacks if the car climate system can control the HVAC AUTO recirculation independently in multiple zones. Returns an empty list if the car can not support the feature.

Parameters:

hvacAutoRecirculationProfile: an object of HvacAutoRecirculationProfile class containing information about the feature's supported zones

public void onHvacAutoModeProfileAvailable(HvacAutoModeProfile hvacAutoModeProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_HVAC_AUTO_MODE is available.

Applications will get multiple callbacks if the car climate system can control the HVAC AUTO mode independently in multiple zones. Returns an empty list if the car can not support the feature.

Parameters:

hvacAutoModeProfile: an object of HvacAutoModeProfile class containing information about the feature's supported zones

public void onHvacDualModeProfileAvailable(HvacDualModeProfile hvacDualModeProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_HVAC_DUAL_MODE is available.

Applications will get multiple callbacks if the car climate system can control the HVAC DUAL mode independently in multiple zones. Returns an empty list if the car can not support the feature.

Parameters:

hvacDualModeProfile: an object of HvacDualModeProfile class containing information about the feature's supported zones

public void onDefrosterProfileAvailable(DefrosterProfile defrosterProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_HVAC_DEFROSTER is available.

Applications will get multiple callbacks if the car climate system can control the defroster independently in multiple zones. Returns an empty list if the car can not support the feature.

A CarZone with CarZone#CAR_ZONE_ROW_FIRST indicates the front window. The rear window's zone will have row value as CarZone#CAR_ZONE_ROW_EXCLUDE_FIRST.

Parameters:

defrosterProfile: an object of DefrosterProfile class containing information about the feature's supported zones

public void onMaxDefrosterProfileAvailable(MaxDefrosterProfile maxDefrosterProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_HVAC_MAX_DEFROSTER is available.

Applications will get multiple callbacks if the car climate system can control the HVAC max defroster independently in multiple zones. Returns an empty list if the car can not support the feature.

A CarZone with CarZone#CAR_ZONE_ROW_FIRST indicates the front window. The rear window's zone will have row value as CarZone#CAR_ZONE_ROW_EXCLUDE_FIRST.

Parameters:

maxDefrosterProfile: an object of MaxDefrosterProfile class containing information about the feature's supported zones

public void onElectricDefrosterProfileAvailable(ElectricDefrosterProfile electricDefrosterProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_HVAC_ELECTRIC_DEFROSTER is available.

Applications will get multiple callbacks if the car climate system can control the HVAC electric defroster independently in multiple zones. Returns an empty list if the car can not support the feature.

A CarZone with CarZone#CAR_ZONE_ROW_FIRST indicates the front window. The rear window's zone will have row value as CarZone#CAR_ZONE_ROW_EXCLUDE_FIRST.

Parameters:

electricDefrosterProfile: an object of ElectricDefrosterProfile class containing information about the feature's supported zones

public void onCarZoneMappingInfoProfileAvailable(CarZoneMappingInfoProfile carZoneMappingInfoProfile)

Notifies that the profile information for ClimateProfileRequest.FEATURE_CAR_ZONE_MAPPING is available.

Applications will get multiple callbacks. For each callback, it returns a CarZone seatsGroupedZone and a List which contains all individual seats in thisseatsGroupedZone.

Parameters:

carZoneMappingInfoProfile: an object of CarZoneMappingInfoProfile class containing information about the feature's supported zones

Source

/*
 * Copyright 2022 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package androidx.car.app.hardware.climate;

import androidx.annotation.NonNull;
import androidx.car.app.annotations.CarProtocol;
import androidx.car.app.annotations.ExperimentalCarApi;
import androidx.car.app.annotations.RequiresCarApi;

/**
 * A callback for the car climate profiles returned from the car hardware, for example, Fan speed,
 * Temperature etc.
 */
@CarProtocol
@RequiresCarApi(5)
@ExperimentalCarApi
public interface CarClimateProfileCallback {
    /**
     * Notifies that the profile information for
     * {@link ClimateProfileRequest#FEATURE_HVAC_POWER} is available.
     *
     * <p>Applications will get multiple callbacks if the car climate system can control the HVAC
     * power independently in multiple zones. Returns an empty list if the car can not support the
     * feature.
     *
     * @param hvacPowerProfile an object of {@code HvacPowerProfile} class containing
     *                         information about the feature's supported zones
     */
    default void onHvacPowerProfileAvailable(@NonNull HvacPowerProfile hvacPowerProfile) {
    }

    /**
     * Notifies that the profile information for
     * {@link ClimateProfileRequest#FEATURE_HVAC_AC} is available.
     *
     * <p>Applications will get multiple callbacks if the car climate system can control the HVAC
     * AC mode independently in multiple zones. Returns an empty list if the car can not support the
     * feature.
     *
     * @param hvacAcProfile an object of {@code HvacAcProfile} class containing information
     *                      about the feature's supported zones
     */
    default void onHvacAcProfileAvailable(@NonNull HvacAcProfile hvacAcProfile) {
    }

    /**
     * Notifies that the profile information for
     * {@link ClimateProfileRequest#FEATURE_HVAC_MAX_AC} is available.
     *
     * <p>Applications will get multiple callbacks if the car climate system can control the HVAC
     * MAX AC mode independently in multiple zones. Returns an empty list if the car can not
     * support the feature.
     *
     * @param hvacMaxAcModeProfile an object of {@code HvacMaxAcModeProfile} class containing
     *                             information about the feature's supported zones
     */
    default void onHvacMaxAcModeProfileAvailable(
            @NonNull HvacMaxAcModeProfile hvacMaxAcModeProfile) {
    }

    /**
     * Notifies that the profile information for
     * {@link ClimateProfileRequest#FEATURE_CABIN_TEMPERATURE} is available.
     *
     * <p>Applications will get a single callback containing a list of different temperatures in
     * Celsius and Fahrenheit for different groups of zones. Returns empty lists if the car can
     * not support the feature.
     *s
     * @param cabinTemperatureProfile   an object of {@code CabinTemperatureProfile} class
     *                                  containing information about the feature's supported values
     */
    default void onCabinTemperatureProfileAvailable(
            @NonNull CabinTemperatureProfile cabinTemperatureProfile) {
    }

    /**
     * Notifies that the profile information for
     * {@link ClimateProfileRequest#FEATURE_FAN_SPEED} is available.
     *
     * <p>Applications will get a single callback containing a list of different fan speed levels
     * for different groups of zones. Returns empty lists if the car cannot support the feature.
     *
     * @param fanSpeedLevelProfile   an object of {@code FanSpeedLevelProfile} class
     *                               containing information about the feature's supported values
     */
    default void onFanSpeedLevelProfileAvailable(
            @NonNull FanSpeedLevelProfile fanSpeedLevelProfile) {
    }

    /**
     * Notifies that the profile information for
     * {@link ClimateProfileRequest#FEATURE_FAN_DIRECTION} is available.
     *
     * <p>Applications will get a single callback containing a list of different fan directions
     * for different groups of zones. Returns empty lists if the car cannot support the feature.
     *
     * @param fanDirectionProfile    an object of {@code FanDirectionProfile} class containing
     *                               information about the feature's supported values
     */
    default void onFanDirectionProfileAvailable(@NonNull FanDirectionProfile fanDirectionProfile) {
    }

    /**
     * Notifies that the profile information for
     * {@link ClimateProfileRequest#FEATURE_SEAT_TEMPERATURE_LEVEL} is available.
     *
     * <p>Applications will get a single callback containing a list of different seat temperature
     * levels for different groups of zones. Returns empty lists if the car cannot support the
     * feature.
     * <p>The return list can have negative and positive values. Negative values indicate
     * cooling level. Positive values indicates heating level.
     *
     * @param seatTemperatureProfile    an object of {@code SeatTemperatureProfile} class
     *                                  containing information about the feature's supported values
     */
    default void onSeatTemperatureLevelProfileAvailable(
            @NonNull SeatTemperatureProfile seatTemperatureProfile) {
    }

    /**
     * Notifies that the profile information for
     * {@link ClimateProfileRequest#FEATURE_SEAT_VENTILATION_LEVEL} is available.
     *
     * <p>Applications will get a single callback containing a list of different seat ventilation
     * levels for different groups of zones. Returns empty lists if the car cannot support the
     * feature.
     *
     * @param seatVentilationProfile   an object of {@code SeatVentilationProfile} class
     *                                 containing information about the feature's supported values
     */
    default void onSeatVentilationLevelProfileAvailable(
            @NonNull SeatVentilationProfile seatVentilationProfile) {
    }

    /**
     * Notifies that the profile information for
     * {@link ClimateProfileRequest#FEATURE_STEERING_WHEEL_HEAT} is available.
     *
     * @param steeringWheelHeatProfile an object of {@code SteeringWheelHeatProfile} class
     *                                 containing information about the feature's supported values
     */
    default void onSteeringWheelHeatProfileAvailable(
            @NonNull SteeringWheelHeatProfile steeringWheelHeatProfile) {
    }

    /**
     * Notifies that the profile information for
     * {@link ClimateProfileRequest#FEATURE_HVAC_RECIRCULATION} is available.
     *
     * <p>Applications will get multiple callbacks if the car climate system can control the HVAC
     * recirculation independently in multiple zones. Returns an empty list if the car can not
     * support the feature.
     *
     * @param hvacRecirculationProfile an object of {@code HvacRecirculationProfile} class
     *                                 containing information about the feature's supported zones
     */
    default void onHvacRecirculationProfileAvailable(
            @NonNull HvacRecirculationProfile hvacRecirculationProfile) {
    }

    /**
     * Notifies that the profile information for
     * {@link ClimateProfileRequest#FEATURE_HVAC_AUTO_RECIRCULATION} is
     * available.
     *
     * <p>Applications will get multiple callbacks if the car climate system can control the HVAC
     * AUTO recirculation independently in multiple zones. Returns an empty list if the car can not
     * support the feature.
     *
     * @param hvacAutoRecirculationProfile an object of {@code HvacAutoRecirculationProfile}
     *                                    class containing information about the feature's
     *                                     supported zones
     */
    default void onHvacAutoRecirculationProfileAvailable(
            @NonNull HvacAutoRecirculationProfile hvacAutoRecirculationProfile) {
    }

    /**
     * Notifies that the profile information for
     * {@link ClimateProfileRequest#FEATURE_HVAC_AUTO_MODE} is available.
     *
     * <p>Applications will get multiple callbacks if the car climate system can control the HVAC
     * AUTO mode independently in multiple zones. Returns an empty list if the car can not
     * support the feature.
     *
     * @param hvacAutoModeProfile an object of {@code HvacAutoModeProfile} class containing
     *                            information about the feature's supported zones
     */
    default void onHvacAutoModeProfileAvailable(@NonNull HvacAutoModeProfile hvacAutoModeProfile) {
    }

    /**
     * Notifies that the profile information for
     * {@link ClimateProfileRequest#FEATURE_HVAC_DUAL_MODE} is available.
     *
     * <p>Applications will get multiple callbacks if the car climate system can control the HVAC
     * DUAL mode independently in multiple zones. Returns an empty list if the car can not
     * support the feature.
     *
     * @param hvacDualModeProfile an object of {@code HvacDualModeProfile} class containing
     *                            information about the feature's supported zones
     */
    default void onHvacDualModeProfileAvailable(@NonNull HvacDualModeProfile hvacDualModeProfile) {
    }

    /**
     * Notifies that the profile information for
     * {@link ClimateProfileRequest#FEATURE_HVAC_DEFROSTER} is available.
     *
     * <p>Applications will get multiple callbacks if the car climate system can control the
     * defroster independently in multiple zones. Returns an empty list if the car can not
     * support the feature.
     * <p>A CarZone with CarZone#CAR_ZONE_ROW_FIRST indicates the front window.
     * The rear window's zone will have row value as CarZone#CAR_ZONE_ROW_EXCLUDE_FIRST.
     *
     * @param defrosterProfile an object of {@code DefrosterProfile} class containing information
     *                        about the feature's supported zones
     */
    default void onDefrosterProfileAvailable(@NonNull DefrosterProfile defrosterProfile) {
    }

    /**
     * Notifies that the profile information for
     * {@link ClimateProfileRequest#FEATURE_HVAC_MAX_DEFROSTER} is available.
     *
     * <p>Applications will get multiple callbacks if the car climate system can control the HVAC
     * max defroster independently in multiple zones. Returns an empty list if the car can not
     * support the feature.
     * <p>A CarZone with CarZone#CAR_ZONE_ROW_FIRST indicates the front window.
     * The rear window's zone will have row value as CarZone#CAR_ZONE_ROW_EXCLUDE_FIRST.
     *
     * @param maxDefrosterProfile an object of {@code MaxDefrosterProfile} class containing
     *                            information about the feature's supported zones
     */
    default void onMaxDefrosterProfileAvailable(@NonNull MaxDefrosterProfile maxDefrosterProfile) {
    }

    /**
     * Notifies that the profile information for
     * {@link ClimateProfileRequest#FEATURE_HVAC_ELECTRIC_DEFROSTER} is available.
     *
     * <p>Applications will get multiple callbacks if the car climate system can control the HVAC
     * electric defroster independently in multiple zones. Returns an empty list if the car can not
     * support the feature.
     * <p>A CarZone with CarZone#CAR_ZONE_ROW_FIRST indicates the front window.
     * The rear window's zone will have row value as CarZone#CAR_ZONE_ROW_EXCLUDE_FIRST.
     *
     * @param electricDefrosterProfile an object of {@code ElectricDefrosterProfile} class
     *                                 containing information about the feature's supported zones
     */
    default void onElectricDefrosterProfileAvailable(
            @NonNull ElectricDefrosterProfile electricDefrosterProfile) {
    }

    /**
     * Notifies that the profile information for
     * {@link ClimateProfileRequest#FEATURE_CAR_ZONE_MAPPING} is available.
     *
     * <p>Applications will get multiple callbacks. For each callback, it returns a {@code
     * CarZone seatsGroupedZone} and a {@code List<CarZone>} which contains all individual seats in
     * this{@code seatsGroupedZone}.
     *
     * @param carZoneMappingInfoProfile   an object of {@code CarZoneMappingInfoProfile} class
     *                                    containing information about the feature's supported zones
     */
    default void onCarZoneMappingInfoProfileAvailable(
            @NonNull CarZoneMappingInfoProfile carZoneMappingInfoProfile) {
    }
}