Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

How to intercept the pressure of a physical key (volume /power on), especially during stand by

mcarugatimcarugati Member ✭✭
edited October 2019 in Xamarin.Android


I need to intercept the long press of a physical key (any) at any time.
Through the OnKeyUp and OnKeyDown methods it work properly, but it only works as long as the app is active.
If the device is put on standby or if the lock screen is active, it no longer works.

How can this result be achieved?


Best Answer


  • mcarugatimcarugati Member ✭✭

    We will try to deepen this information to adapt it to our uses.
    Thank you for your suggestion.

  • JarvanJarvan Member, Xamarin Team Xamurai

    Do you have some update? If the reply solved your issue, please mark the helpful reply as answer. If you are facing some issues while implementing, try to post the particular error with the corresponding codes here.

  • mcarugatimcarugati Member ✭✭
    edited October 2019

    Good evening Jarvan,
    I'm sorry but due to contingent problems we haven't yet been able to test the proposed solution for the moment.
    It will be my duty to inform you asap, in the meantime if you need to mark the topic as closed I think it is right.


Sign In or Register to comment.