Listener of the Volume buttons and switch off &; on
I want to do tha background applications and I would add the listener for the Volume buttons and light switch off & on. Please help me how I can do this.
Thanks in advance.
Thanks peter & simon. Its has helped for the my requirement.
public MyApp() {}
Push a screen onto the stack in the user interface for rendering.
pushScreen (new MyScreen());
addKeyListener (new ShortcutHandler());
}
private class ShortcutHandler implements KeyListener {
{} public boolean keyChar (key char, int status, int time)
Returns false;
}
{} public boolean keyDown (keycode, int, int times)
If (Keypad.KEY_VOLUME_DOWN is {Keypad.key (keycode))}
Returns true;
{} Else if (Keypad.KEY_VOLUME_UP == {Keypad.key (keycode))}
Returns true;
{} Else if (Keypad.KEY_LOCK == {Keypad.key (keycode))}
Returns true;
}
Let the system to pass the event to another auditor.
Returns false;
}
{public boolean keyRepeat (keycode int, int times)
Returns false;
}
{public boolean keyStatus (keycode int, int times)
Returns false;
}
{} public boolean keyUp (keycode int, int times)
Returns false;
}
}
Tags: BlackBerry Developers
Similar Questions
-
Given that I have install iOS 9.3.1 my iPhone 6 Plus is very slow, in the speakers and keyboard, I can't watch videos in YouTube or Facebook and sometimes do not work the volume buttons and the lock. I rebooted my phone like 10 times and it does not work, I need help,
Have you tried a forced reboot? Hold down the home and Sleep/Wake buttons simultaneously for about 15-20 seconds , until the Apple logo appears. You won't lose anything.
If this does not help, I would like to try a restore:
-
I have a computer laptop lenovo, but a red cross that pop up on the volume button and it, s say no audio device is intall
I want to know how can I solve this problem
The following link might be worth a visit:
No sound in Windows
http://Windows.Microsoft.com/en-us/Windows/help/no-sound-in-Windows
(Win XP / Vista / 7) -
This may seem like a strange question, but im trying to encode two buttons Flash Adobe, next and previous, however, when I put the thumb to the next scene and play on the next button and the previous scene and play on the previous button, it keeps switching autour.
If you have symbols of button on the stage to the next and previous, each of these symbols has an instance name with a listener event attached to it. The event listener is linked to a mandate. You can have a single event point to a function. So for example, if you have a next button and a click event that points to a function that says something like nextFrame(); and then you want to use the next button to point to a function that says something like nextScene(); you will need to use another instance of this next button and have this different instance to use a different event handler to point to a different function. Who help me?
-
I use a Brother MFC-7420. Usually, it works under Windows 7, but from time to time (maybe 1 in 20 times) he will not print and I have to unload the coil and switch off the printer before Relighting. It is not always the case, but it is enough times to be a nuisance.
Ideas, people?
Hello
This problem occurs when you make changes to the computer?
Method 1: Diagnose and automatically fix problems printing and printer
http://support.Microsoft.com/mats/printing_problems/
Method 2: Refer to this link: I can not print from my computer via the USB port.
If you have problems, I haveinstall updated printer drivers, see this link:
http://www.brother-USA.com/downloads/default.aspx?PgId=5&R3ModelID=MFC7420Refer to this: update the drivers for hardware that does not work properly.
http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly
See also: printer in Windows problems
http://Windows.Microsoft.com/en-us/Windows/help/printer-problems-in-WindowsI hope this helps!
-
I'm having difficulty trying to restart and update my iPhone 7 using the Home button and the sleep/wake button at the same time, when I do my phone takes a screenshot of the home screen.
Should I turn off my Touch ID?
Basically my home button button and / standby works not together at the same time.
You need hold the House and turn off the button for 20 seconds, until the Apple logo appears.
-
I a s 6 more and when using the phone, if my face touches the screen it clicks on the logout button and the phone hangs up the call. Is it possible to prevent this without holding the phone away from my face when calling?
iPhones have a proximity sensor which is supposed to automatically turn off the screen when you hold it in your face. If this is not the case you can take the phone and have it checked.
-
Satellite 1005: Push the power button, will turn off the AC power.
Laptop: Toshiba Satellite 1005
Problem: When I press the power button and let go, the laptop immediately loses all power.
I use the power cord plugged into the laptop, the power supply light is green, but when I press the power button and let go, as soon as the power light goes black(turns off), nothing happens.
Howerver, if I PRESS the power button without letting go, power LED lights, but the laptop won't boot at all, no Startup logo, no sound no matter what.
It's the second time this has happened, the first time, I let stand overnight and the next day she booted up fine.
Currently, the laptop is cold, it did not work, but always the same thing as described above.
There are no changes made to the laptop.
Any ideas?
It seems that the contact, the power button is faulty. Better to elevate the laptop to a Toshiba service station for a check.
I n ' t´t think that it is a software failure.
Good bye
-
Satellite U500 - the volume buttons do not work
Hello
I just bought a Toshiba Satellite U500 two days ago and already problems :(
It has a control buttons sensitive contact, which includes the eco, the media buttons and the volume control utility (+ and -)
The volume buttons do not work, and sometimes the computer crashes to their contact. Once I touch the-, he begins to turn volume down until it reaches zero, and even if I turn it up using windows, back to zero (as if the button is still depressed). The + does not work.Help, please. Is it possible to re-install the drivers?
The only solution I found is to disable them using HWSetup...Great news. Thanks for the comments!
-
Re: Qosmio F60 - how to make the volume buttons to only work with Media Player?
Hello.
I was wondering if I could make the Volume up and Volume down button keys compatible with my AIMP3 Media Player software.
I tried to press on them, only to realize the right controls the overall volume of Windows.
I tried the assignment of the keys to the keyboard shortcut list in the software. But he continued to play with the volume of Windows.No idea how to fix this to make it work with my Player volume only?
My OS is Windows 7 64 bit
Thanks in advance.
> No idea how to fix this to make it work with my Player volume only?
AFAIK you cannot fix it. These buttons are for the Windows level volume only.
But I don't see why it is so important. Set the volume level in WMP to the maximum level and simply change the level of Windows. In General, the result is the same. Or not? -
I put my Thinkpad T400 hibernation, but the next morning I couldn't start. When I press the power button, the lights under the screen turn on and I hear the sound of the hard drive and get it out. I don't even see anything on the screen. It is only black. The process continues to repeat in a loop, except if I press the power button to turn off.
I tried the static load, remove the thing.
I also removed the hard drive, put it back again, but not working anymore.
Help, please.
Solved the problem myself.
Removed the internal battery and reinstalled after 30 s.
It worked perfectly. Typing of him now.
-
How to switch on and Switch Off LED using lab view
How to switch on and Switch Off LED using lab view, I need to Switch on and off material LED, not the soft LED.
I need to know the different ways to Switch On and Off the LED
Hello
I need to control the LED on my laptop which is to have labview, kindly tell the different ways that my laptop a serial port, is possible to control using that.
-
T60 thinkvantage key works but the volume buttons don't work do not
Hello, I have just reinstalled my Lenovo T60 8741-HAM with Windows Vista business and the volume buttons do not work. I installed the latest drivers, hotkey, but who got the thinkvantage and Fn key combos work well, the volume buttons still nothing doing.
Can anyone help?
It worked! I need to install the lenovo system interface driver
I also found this very useful page of the most common T60 drivers. Here I found only a few days when I started to reinstall my machine.
-
When I press the volume buttons, I get the error {has only "System-UI"} and the screen goes black.
I have tried factory reset already - did not work.
Interestingly, the error doesn't occure while watching videos.
Pls help its really annoying
Well the new update solved the problem for me
-
Computer froze cannot open any programs or even to use the Start button to turn off.
Original title: the computer froze.
Original title: my computer (Windows XP) has frozen. -Big problem -)
Hello
Last night, I used my computer to open a load of bunch of programs of MS Access (probably asked to run a marathon when he can only walk!)
Now, I can't open any programs or even to use the Start button to turn off. How can I fix this problem or you have lost everything :-(
Thank you
Thanks - all of a sudden he started working again! Maybe this was a vacation - but I tried F8 and safe option is not come to the top.
Very old computer - but it is useful to use to return to historical documents that I don't want on my new computer.
Tnanks for the long and dedicated response :-)
Maybe you are looking for
-
Recommendation of the battery for Satellite C660
Can anyone recommend a spare battery?My only now realize only a paltry 16 minutes:) Preference value for the money farm. I saw one of those listed on Amazon, a Lenoge for a little over £10. Has anyone tried this before?Thanks a lot for your help.
-
Sattalite Pro 6100: Very slow Windows Installation
I have a series of Sattalite Pro 6100.The hard drive crashed, so I bought a new. It is 40 GB / 5700 rpm, so supposed to be slightly faster than the original equipment.When I placed it, BIOS did not.I removed it, put it back and BIOS saw him.I placed
-
Satellite L500 LCD replacement screen (PSLJ0A - 01 K 013)
Hello I need to replace the LCD for my Satellite L500 PSLJ0A - 01 K 013, but I have trouble finding a LCD 15.6 "appropriate. I am trying to find online, but it seems that the Web sites that sell screens LCD do not have my laptop model. It will be the
-
USB ports not working on DV6149US
I have a DV6149US which is under Widows XP SP3 and was fine, but suddenly my 4 USB ports no longer work, even for the memory card port When I connect a device or a memory card, I have the typical noise that the device is recognized but it never appea
-
Satellite A100-409 restarts a lot due to BSOD
I have a Toshiba A100-409, before I had the M70 - 163, the great laptop, incidentally, but 409 restarts a lot. If the 409 go in mode sleep and whenever I start it again, I get a blue screen with the error.Sometimes the 409 is the same and when it is