Skip to content

Most visited

Recently visited

navigation

ConsumerIrManager

public final class ConsumerIrManager
extends Object

java.lang.Object
   ↳ android.hardware.ConsumerIrManager


Class that operates consumer infrared on the device.

To obtain an instance of the system infrared transmitter, call Context.getSystemService() with CONSUMER_IR_SERVICE as the argument.

Summary

Nested classes

class ConsumerIrManager.CarrierFrequencyRange

Represents a range of carrier frequencies (inclusive) on which the infrared transmitter can transmit  

Public methods

CarrierFrequencyRange[] getCarrierFrequencies()

Query the infrared transmitter's supported carrier frequencies

boolean hasIrEmitter()

Check whether the device has an infrared emitter.

void transmit(int carrierFrequency, int[] pattern)

Transmit an infrared pattern

This method is synchronous; when it returns the pattern has been transmitted.

Inherited methods

From class java.lang.Object

Public methods

getCarrierFrequencies

Added in API level 19
CarrierFrequencyRange[] getCarrierFrequencies ()

Query the infrared transmitter's supported carrier frequencies

Returns
CarrierFrequencyRange[] an array of ConsumerIrManager.CarrierFrequencyRange objects representing the ranges that the transmitter can support, or null if there was an error communicating with the Consumer IR Service.

hasIrEmitter

Added in API level 19
boolean hasIrEmitter ()

Check whether the device has an infrared emitter.

Returns
boolean true if the device has an infrared emitter, else false.

transmit

Added in API level 19
void transmit (int carrierFrequency, 
                int[] pattern)

Transmit an infrared pattern

This method is synchronous; when it returns the pattern has been transmitted. Only patterns shorter than 2 seconds will be transmitted.

Parameters
carrierFrequency int: The IR carrier frequency in Hertz.
pattern int: The alternating on/off pattern in microseconds to transmit.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.