An API for using the IR (Infrared) blaster that is available in selected Android devices, in Codename One.
This library provides access to the ConsumerIrManager Android class in Codename One, which provides an API to control the IR blaster on supported devices.
Install through Codename One settings.
If you haven’t activated any cn1libs before in your Codename One projects, see this tutorial which explains the process.
if (!IRBlaster.hasIrEmitter()) {
ToastBar.showErrorMessage("This device is not equipped with an Infrared Blaster");
return;
}
IRBlaster.transmit(command.getFrequency(), command.getPattern());
git clone https://github.com/shannah/IRBlaster
cd IRBlaster
sh setup.sh
./antw jar
-
Written by Steve Hannah
-
Built using Codename One