How can I handle back button long click?

Title says it clear How can I handle back button long click?

1 Like

This is different thing I want to close my application on long back press else I will use move task to back so that user don't have to open the app and consume more battery.

What means "else"?

this is my back button.
I want to close application when user long press back button.

Which "back button"? Devise back button?
If so, there is no device button BackPressed.LongClick event.

Yes I know that's why I have opened this thread.

Then the simple answer is: You you cannot.

1 Like

See: How can I handle back button long click? - #9 by TIMAI2

You will need to write an extension, if it is possible.

1 Like

Then I would be curious if this works, specifically on Android 11+.

1 Like

Btw, how does the user know whether to perform a short or long click with the device back button?
I've never had the idea of trying this.

IDK but in my custom rom I have an option to set force stop on back button long click it works perfectly in every app I am just thinking for other OS users I don't think it's that useful but minor improvements+minor improvements+minor improvements...... = makes app feature rich.