Back key navigation?

startrunner

New member
Jan 21, 2014
24
0
0
Visit site
Hello, fellow developers. I have been wondering about the back-key navigation of a Windows Phone app and how it is supposed to work. I am aware that by pressing the back button my app is supposed to navigate to the previous page i.e the one the user 'came' from but there are a few different ways to implement this and I couldn't find any article on it. Unfortunately, I haven't paid attention to how other apps navigate.

So let's say I have three pages 1, 2, 3 and 4 with 1 being my startup page.
If the user navigates in the following order: 1 > 2 > 3 > 2 > 1 > 3 > 4 and then starts tapping the back key how should my app navigate?
Here are some of my guesses
4 > 3 > 1 > 2 > 3 > 2 > 1 > EXIT APP - This is an obvious solution but doesn't seem right
4 > 3 > 1 > EXIT APP - I simply go back until I'm at the startup page.
4 > 3 > 2 > 1 > EXIT APP This way, every time the user navigates to a page, I add the page to my 'History Stack' only if it isn't already in there. When on page 4, the stack will look like this: 1, 2, 3, 4. When pressing the back button, i will simply remove the page on top of the stack (the current page) and navigate to the one that goes on top next. If the stack is empty, I will terminate the app.

The third one feels right to me but are there any particular requirements or guidelines I should follow? Will my app get accepted with that 'algorithm' of navigation?
 

1101x10

New member
May 27, 2012
181
0
0
Visit site
As long as it exits the app from the first page you are free to do what you want as far as I'm aware. I skip some pages on the back key in my app where it makes sense.
 

drachen23

New member
Nov 5, 2011
86
0
0
Visit site
If the user navigates in the following order: 1 > 2 > 3 > 2 > 1 > 3 > 4

With how Windows 8 and Windows Phone navigation works, it feels wrong to me that a user could do that going forward (putting a page on the backstack) each time. You should keep as little as possible in the app backstack. Most of the apps I design are "hub and spoke": page 1 is a hub page. The hub links to all the spokes, but a spoke does not link directly to another spoke. When the user is done with any detail/action pages, he/she hits the back button. Unless your data is infinitely linkable (for example the IMDB app), it's best to think of the backstack that way and design your app accordingly. Unlike iOS, Windows Phone should not have "back to list" or "back to home" buttons anywhere. That's what the back button is for.

When you consider that the user should actually do this in your app: 1 > 2 > 3 <back> 2 <back> 1 > 3 > 4, then the result of 4 <back> 3 <back> 1 <back> EXIT is exactly what the user expects to happen.
 

zigah

New member
Aug 11, 2011
12
0
0
dawnofplay.com
Depends on your app, but you should go for simple, which means not like the browser does it with the full history back-stack.

We usually go for "back up the UI hierarchy" - your third variant - which is most likely the way user got to here as well. :)
 

Members online

Forum statistics

Threads
326,651
Messages
2,248,704
Members
428,530
Latest member
Phoquer