Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
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 ()

Query the infrared transmitter's supported carrier frequencies

Returns

public boolean hasIrEmitter ()

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)

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.