[APP] [4.3+] Hold Back To Kill [ROOT]

Search This thread

elesbb

Senior Member
Jun 20, 2010
7,848
5,307
Here is an app that allows you to hold your back button to kill the currently open application.

If popularity is high enough, I will update it with things like whitelist etc.

If you use a Samsung device, the only problem is that you can't show the MultiWindow bar anymore. I will work on a fix for it. I only made this because xposed doesn't work on Samsung Lollipop yet so this is what I wanted until it is. Once it works, I prolly won't ever touch this app again.

Thanks everyone!

UPDATE:

- Performance improvement
 
Last edited:

ndg1988

Member
Nov 18, 2013
25
7
Having Trouble

I'm having a similar problem where even a single tap on the back button is closing the app. I have a rooted Galaxy S4 running Android 4.4
 

elesbb

Senior Member
Jun 20, 2010
7,848
5,307
Hello, CM12 with standard navbar (3 buttons) doesn't have that setting. It s only implmented in roms with navbars with extra settings like opening an app etc etc

I'm having a similar problem where even a single tap on the back button is closing the app. I have a rooted Galaxy S4 running Android 4.4

So this is happening when using the navbar and not the physical buttons?

It seems like the up action isn't being triggered. I could try to implement maybe a double click back to kill option. Ill try to debug on my 5.0 emulator that uses the navbar and see if i can figure anything out. Weird how that's happening.
 

Droidphilev

Senior Member
Jan 25, 2008
3,464
1,173
OnePlus 9 Pro
So this is happening when using the navbar and not the physical buttons?

It seems like the up action isn't being triggered. I could try to implement maybe a double click back to kill option. Ill try to debug on my 5.0 emulator that uses the navbar and see if i can figure anything out. Weird how that's happening.

hello again,

No, i dont use the navbar In cm12 (disabled) I use hardware buttons. If ndg1988 uses stock then he doesn't have a navbar so i guess he uses the hardware buttons too
 

elesbb

Senior Member
Jun 20, 2010
7,848
5,307
hello again,

No, i dont use the navbar In cm12 (disabled) I use hardware buttons. If ndg1988 uses stock then he doesn't have a navbar so i guess he uses the hardware buttons too

Hm, I truly don't know then. I really would need the device in hand to test with. I could try to do testing by sending you a file with loads of debug information in it. Would you mind that?
 

ndg1988

Member
Nov 18, 2013
25
7
Good News

So this is happening when using the navbar and not the physical buttons?

It seems like the up action isn't being triggered. I could try to implement maybe a double click back to kill option. Ill try to debug on my 5.0 emulator that uses the navbar and see if i can figure anything out. Weird how that's happening.

I was just an idiot that assumed the activation time was in units of seconds, not milliseconds. This may be what most people are having trouble with. It works well now, so thank you and keep up the good work.
 
  • Like
Reactions: elesbb

leechseed

Senior Member
Jun 27, 2012
874
221
Awesome - best thing that can happen to a rooted stock rom.

btw its labled "Main Activity" in App Drawer, not "Hold Back To Kill"
 
Last edited:

elesbb

Senior Member
Jun 20, 2010
7,848
5,307
no, but it will take a while. i need to test multirom on my device and i have have to finish the translation of an app first. :(
What delay are you setting for it in the settings?
Awesome - best thing that can happen to a rooted stock rom.

btw its labled "Main Activity" in App Drawer, not "Hold Back To Kill"

Yup. Realized that after releasing and didn't care too much about it. :p In the next update (if ever one would exist) i'll fix it.
 

elesbb

Senior Member
Jun 20, 2010
7,848
5,307
Did you put in 2 or 2000? (check post #11)

I have tried 2, 3, 4 and 5 seconds

DAMNED!!!!!!!!!!!!!!!!!!!!!!!!!!

Thank you, leechseed! Was making the same mistake.

OP please forget all my postings. Working very well!!!

That is why I asked. :) I have it set to milliseconds because I have mine set to a value of 200 milliseconds :)

Love seeing everyone helping everyone. :) Thanks guys!!!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 59
    Here is an app that allows you to hold your back button to kill the currently open application.

    If popularity is high enough, I will update it with things like whitelist etc.

    If you use a Samsung device, the only problem is that you can't show the MultiWindow bar anymore. I will work on a fix for it. I only made this because xposed doesn't work on Samsung Lollipop yet so this is what I wanted until it is. Once it works, I prolly won't ever touch this app again.

    Thanks everyone!

    UPDATE:

    - Performance improvement
    4
    I've tried absolutely everything you did, even went as far as the 2.52 beta SuperSU, and still can't get this app to ask for root....... There has to be another way to force the app to ask if it doesn't on its own but I can't figure out how!

    Well, the reason it may never ask for root is because the part that actually does the killing may not be getting triggered due to some inconsistency in the android coding. I will try to take a look at this this weekend. I will hopefully get a debug release posted, meaning you will see a lot of messages and such tracking events so I can better track where the issues are occurring at and squash them.
    4
    I understand everything you're saying, but why would it work and then break? It worked when I first started using my Moto X Pure Edition, asked for root and everything, then broke somehow. It uses nav bar and no physical keys, just like any Nexus device. I'm not adding a vote for "Gesture To Kill" because when I am not 100% focused on the screen (parking my car and want to kill navigation to the place that I just arrived at), I'd rather just hold a button to do the task instead of concentrate on where exactly I'm placing the gesture.

    There's got to be a reason why softkeys work and nav bar keys don't, if that's the issue you think it is. On my Nexus 7's with Chroma, the option is in the ROM's settings, and that sucker has the same nav bar, so maybe there's a way to prompt for root without having to press the back button first, like when most root apps open and then ask for root without any of their root-required actions to prompt it.

    Getting closer, so thanks for all your help with this!!!

    Its not the prompt for root that isn't working. it is the fact it is not detecting when the key is pressed. The nav bar functions differently then normal hardware keys. A ROM including it in its settings has access to ROM source code, so that has nothing to do with my app. If I wrote a ROM, I could just put the code wherever I want. I modded my S5 to show the nav bar and it never hooked the back key, however, my hardware keys did. I feel this is the issue for other devices with a nav bar.

    Also, the gesture thing will be triggered anywhere on the screen. Not just a certain area. So you wouldn't have to "focus" on the screen. Just swipe up, keep your finger on the screen, then swipe down. Done.

    It's really the only option for people having issues.
    4
    I've tried absolutely everything you did, even went as far as the 2.52 beta SuperSU, and still can't get this app to ask for root....... There has to be another way to force the app to ask if it doesn't on its own but I can't figure out how!

    I'm using it on an S6+ 5.1.1 Rom with no problems. Rooted kernel and Super SU installed. Only problem I see is with Multiwindow. It over rides the key press maybe making the time out longer would help but haven't tried yet.



    Sent from my SM-G928T using Tapatalk

    The time out won't affect anything. But my brother has the S6 and he activates multiwindow through long press recents button.

    That's really awesome of you if you aren't concerned with wanting to do anything more on this app! I will be glad to help as much as I can, but I just had surgery this morning and not gonna be 100% throughout the next few days, but I know this is important enough for me to focus some time on if I can

    Well, it seems like this thread is getting a lot more attention than I expected. So I will try to keep up with it. I have chemistry homework that takes on average 5 hours to complete.. so i'm quite busy. especially while working 6 am to 2 pm on days I don't go to class. Plus I have Algebra and Bio homework. lol. Its fun!
    3
    Any update, @elesbb? One week later from your last post on here, just checking on it and seeing if we need to schedule someone to do your chemistry for you so we can get this thing to ask for root again! Haha, thanks in advance

    This made me laugh :D Thank you! You are awesome!!!

    I have looked for my source code and I kind of deleted it xD So I will have to re-create it and will release a new one once I get around to it. I actually just took a chemistry test today.. Don't think I did as well as I would have liked to. But now hopefully I'll have time for some more coding. Been working on a Kernel for the S6 as well.