Open MichaelIndra opened 7 years ago
@MichaelIndra, Like that?
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_VOLUME_DOWN)){
// Do something
}
return true;
}
it automatically increases the volume of your TV hardware
You should see issuse #1 before saying that.
Thank you for the advice. it's to adjust the volume on the gadget? I want to send the signal volume menggunaka ir blaster. but I wanted to send a signal repeater. whether using google API could send the signal repeater? thank you
@MichaelIndra,
My example shows how to do something when volume down is pressed.
Also, what does menggunaka ir blaster
mean?
Can you be more specific?
ConsumerIrManager mCIR = (ConsumerIrManager) this.getSystemService(Context.CONSUMER_IR_SERVICE); int [] pattern = {9000, 4500, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 1687, 562, 1687, 562, 1687, 562, 1687, 562, 1687, 562, 1687, 562, 1687, 562, 1687, 562,562, 562, 562, 562, 562, 562, 1687, 562, 1687, 562, 1687, 562, 562, 562, 1687, 562, 562, 562, 1687, 562, 1687, 562, 562, 562, 562, 562, 562, 1687, 562, 562, 562, 562, 1687, 562, 40500}; mCIR.transmit(38000, pattern);
this is my code for volume up. in real remote, when we press button volume in long time, volume will increase/decrease so fast. I learn the code for long press in real. there are use signal repeater. its possible android using signal repeater for ir blaster? i have try using long key press and thread for increase/decrease.. thank you. and i am sorry for my bad language
I want to ask you. previously, if you use google API to transmit? then you have to use the repeater as well as a TV remote control where you hold the volume up, it automatically increases the volume of your TV hardware. if ever, can you give me an example?
thanks in advance. I apologize if my speech and inappropriate language