On Wed, Oct 20, 2010 at 5:20 AM, Marcin Orlowski
<[email protected]> wrote:
> I'd love to prevent hardware buttons from working while user runs my
> app. Perfectly all of them,
> but any number would help :) I am not sure it's doable but maybe I
> miss something, hence my
> question.  For those wondering - "why?" - we got an app that does full
> screen colorful animation
> and users often run it and hand the phone to their babies as they can
> stare at it for hours :)
> but the problem is, kids accidentally press hardware buttons (usually
> camera trigger, but
> also Home or Search - depending on the device model). I'd love to add
> the option to block
> all keys beside one which can hardly be pressed accidentally.

Your activity can override onKeyDown() and intercept what you can.
That will not work for the HOME key in particular.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 3.0.1 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to