Questions tagged [back-button-control]
65 questions
19
votes
8 answers
how to close android app completely
I created an android application with a logout option in onCreateOptionsMenu. The Logout works perfectly but when I press the back button again it takes me to the previous activity, and when it gets a null value it redirects to login screen. Now my…

Brett
- 431
- 2
- 10
- 26
17
votes
5 answers
Phonegap - navigator.app.backHistory() not working on HTML back button
In my app i am using phonegap 2.6.For back button, I am using the following function
document.addEventListener("backbutton", onBackKeyDown, false);
function onBackKeyDown() {
alert("hello");
…

Iam4fun
- 1,438
- 3
- 14
- 18
15
votes
12 answers
How to handle back button on Ionic 2
How can I handle the back button action on Ionic 2?
I want to be able to know what to do depending on which page is being shown to the user.
I didn't find a good answer to this question, but after a while I figured it out myself a way to do it. I'm…

Alexandre Justino
- 1,716
- 1
- 19
- 28
15
votes
4 answers
How do I disable Android Back button on one page and change to exit button on every other page
I am developing an Android application using Phonegap that interacts with my Drupal site. I have re-assigned the Android "Back" button to prompt the user to log off from the Drupal server however, I just want it disabled on the login page (for…

ObsoletePower
- 153
- 1
- 1
- 6
9
votes
1 answer
Override browser `back` button functionality in Angular?
I have a page in my Angular App where it uses a stepper. When the user is for example on step 3, the first logical thing he will do to get back to the previous step (step 2) is to click on the back button. But obviously, he will get redirected to…

Kasper Juner
- 832
- 3
- 15
- 34
6
votes
1 answer
android:back (device back button) event in Titanium not working
Hi i am working on android application development.I am using Titanium studio for development. I create a simple application.I want to capture the device back button event in my application because I don't want to user android default tabs in…

nilkash
- 7,408
- 32
- 99
- 176
3
votes
2 answers
How do I insert an entry into browsing history via JavaScript
How do I insert an entry into browsing history so back button goes to different page 1st click then original page on 2nd click?
So if you need a good explanation of what I want done, go to:
https://secure.exitjunction.com/howitworks.jsp
I just need…

Sky
- 203
- 4
- 7
3
votes
1 answer
How to exit with stopping the background running from application but, not close services
I have long been looking for a solution on how to close an android application.
Gathering all the posts dealing with the subject, I ended up building a healthy and effective solution that I wanted to share in this post
Please, correct me if I have…

le Mandarin
- 192
- 10
3
votes
3 answers
How to detect Hard/Soft back button on Android device?
I want to know how to detect hard or soft "BACK Button" on device? I searched but mostly I found this code
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount()…

user3555472
- 836
- 3
- 11
- 38
3
votes
1 answer
Not able to exit phonegap application on Back Button of android device
I have used following code to exit from application. For first time it works perfectly. But when I opened some next screens and then came back to screen where I wanted to close my application, it fails to close application.