0

I defined ConsumerIrManager as following:

ConsumerIrManager irManager = (ConsumerIrManager) getSystemService(CONSUMER_IR_SERVICE);

But for some reason it is null and I can't use functions like .transmit().

asked Oct 14, 2023 at 20:21

1 Answer 1

0

You are not guaranteed to get the service. There are multiple cases which can lead to null you are facing, starting from most obvious one, which is lack of hardware support for IR on the device to missing android.permission.TRANSMIT_IR permission declared in your AndroidManifest.xml file. I'd also inspect logcat and look for any related warning or error.

answered Oct 14, 2023 at 20:36
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.