How do I programmatically disable/enable the physical keyboard in Android?
-
I have an application that I'm developing that uses a USB HID device connected to a Motorola Xoom for some input. However, the majority of the time I still want to use the on-screen keyboard. Is there a way to disable/enable the use of hardware keyboard in Android 3.0+? I'd like the application to behave like it would, had there not been a keyboard connected.
-
Answer:
well one solution you can think of is .. @Override public boolean onKeyDown(int keyCode, KeyEvent event) { return true; } @Override public boolean onKeyLongPress(int keyCode, KeyEvent event) { return true; } @Override public boolean onKeyUp(int keyCode, KeyEvent event) { return true; } this will avoid any actions during keyboard key press. but there is no way you can disable android keyboard since it will use some native methods.
Fredrik Hedberg at Stack Overflow Visit the source
Related Q & A:
- How do I programmatically change the label of a mapped drive?Best solution by Server Fault
- How can I programmatically change the language for non-Unicode programs?Best solution by Super User
- How can I programmatically extract a file quickly and efficiently within Android?Best solution by Stack Overflow
- How do I completely disable Microsoft Outlook?Best solution by answers.microsoft.com
- How do I permanently disable the new yahoo mobile homepage?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.