Diego Esteban Osorio Zaldivia
Posts: 0
Joined: Thu Jul 25, 2013 10:18 pm

How I can do so that pressing the "back button" in the telephone doesn't return to the previous page?

How I can do so that pressing the "back button" in the telephone doesn't return to the previous page?

In Android I could remove the activities from stack in which the screens are stacked, but here I do not know how.

I want to do this because I have 2 screens of settings and when you get to the third, the user can work. But if user is in the third screen and hit the "back button", shouldn't longer show the settings screens but simply leave.

Thanks in advance.

Diego Esteban Osorio Zaldivia
Posts: 0
Joined: Thu Jul 25, 2013 10:18 pm

How I can do so that pressing the "back button" in the telephone doesn't return to the previous page?

I would also like that if the user closes the application and even restarted the phone, and then re-open the application, not shown the config screens again and only sent to the third screen.

Do you know if I can handle this just using LocalStorage, or closing the application and / or restart the phone erases data stored in LocalStorage?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How I can do so that pressing the "back button" in the telephone doesn't return to the previous page?

Are you creating a mobile web app or a hybrid app (PhoneGap)?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How I can do so that pressing the "back button" in the telephone doesn't return to the previous page?

For Android, there is a 'backbutton' event that you can use to do something. Check PhoneGap docs, it might work for other platforms as well.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How I can do so that pressing the "back button" in the telephone doesn't return to the previous page?

I think there is an event that is fired when the app launches (check PhoneGap events). If such event exists, you could use that.

Local storage is just a storage -- you can use it for really anything. Local storage is not erased even if you restart the phone. It's standard browser API: https://developer.mozilla.org/en-US/d...

Return to “Issues”