Android APIs
public final class

ConsumerIrManager

extends Object
java.lang.Object
   ↳ android.hardware.ConsumerIrManager

Class Overview

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)
Tansmit and infrared pattern

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

[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public CarrierFrequencyRange[] getCarrierFrequencies ()

Added in API level 19

Query the infrared transmitter's supported carrier frequencies

Returns

public boolean hasIrEmitter ()

Added in API level 19

Check whether the device has an infrared emitter.

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

public void transmit (int carrierFrequency, int[] pattern)

Added in API level 19

Tansmit and 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 The IR carrier frequency in Hertz.
pattern The alternating on/off pattern in microseconds to transmit.