Whenever I press a key, will the Bookmark activity handle it? Is it a default behavior that can *not* be configured?
Taísa Cristina Costa dos Santos Computer Engineer Brazil, SP 55 19 8152-7453 On Tue, May 5, 2009 at 1:55 PM, Dianne Hackborn <[email protected]> wrote: > You can't. > > > On Tue, May 5, 2009 at 9:53 AM, Taísa Cristina <[email protected]>wrote: > >> >> I don't want to handle end call or home keys. I just want to handle >> another key, such as space bar, while my Activity is in background. >> >> Taísa Cristina Costa dos Santos >> Computer Engineer >> Brazil, SP >> 55 19 8152-7453 >> >> >> On Tue, May 5, 2009 at 1:45 PM, Dianne Hackborn <[email protected]>wrote: >> >>> No, you can't do this. The home and end call keys are trapped by the >>> system before being delivered to the application, and handled by itself. >>> >>> On Tue, May 5, 2009 at 5:51 AM, Taísa Cristina >>> <[email protected]>wrote: >>> >>>> >>>> My application behavior is similar to voice call, but I need also to >>>> handle key events. My application is still running in background and the >>>> activity is paused. Is there a way to receive key events in such situation? >>>> When the call screen is paused, it receives "end call" key event. Can I >>>> receive a specific key event in a similar situation? Is there a way to >>>> register my activity (or my application) for that? >>>> >>>> Taísa Cristina Costa dos Santos >>>> Computer Engineer >>>> Brazil, SP >>>> 55 19 8152-7453 >>>> >>>> >>>> On Tue, May 5, 2009 at 8:02 AM, [email protected] < >>>> [email protected]> wrote: >>>> >>>>> >>>>> If what you want is to have a notification that the user can swipe >>>>> down and click to go back to your application, then you don't really >>>>> need to be handling key events whilst your activity is paused. What >>>>> you could do is create a service which displays the notification, and >>>>> then use an intent to launch your activity when the notification is >>>>> clicked. >>>>> >>>>> BUT - I'm not sure that this is good usability design. If the user has >>>>> navigated away from your activity and if you don't need to do any >>>>> continual background processing, then you probably shouldn't show >>>>> anything in the notification panel. The user can always get back to >>>>> your app from the homescreen or via a long press on the home button. >>>>> >>>>> >>>> >>>> >>>> >>> >>> >>> -- >>> Dianne Hackborn >>> Android framework engineer >>> [email protected] >>> >>> Note: please don't send private questions to me, as I don't have time to >>> provide private support, and so won't reply to such e-mails. All such >>> questions should be posted on public forums, where I and others can see and >>> answer them. >>> >>> >>> >>> >>> >> >> >> > > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

