In-App Home Button to Navigate to MainPage allowed? - windows-phone-7

I was wondering about the implementation of an In-App Home Button that takes you back from any Page to the MainPage. As far as I remember this is not allowed by the WP7 Development Guidelines. But I can't find any written Information about that.
Does anyone know where this is written?

Home button is generally discouraged, msdn source:
Placing a Home button in your user interface deviates from the Windows Phone navigation model.
Implementing a Home button in your app may also cause a second issue, one that has a much more severe implications for your app: it might inadvertently create a scenario where a user can get stuck in an infinite (or near infinite) loop when he or she uses both your Home button and the hardware Back button to navigate. This loop may get worse if they use the Back button to move from one app back through your app just to get to another. Ensure that these issues don’t affect your app.
However, try to keep the architecture of your app as shallow as possible, and make use of lists and pivots so that the user can navigate back to the landing screen with few steps back and from there to previous launched apps.
But there will be applications that cannot have shallow navigation and require a home button, for example google drive or dropbox folders browser - after going deep in the folder structure user will want to quickly navigate to main page. Guidelines, msdn source:
If your app lets users pin pages, consider whether a home button is required to let the user get back to the root of the app quickly. A home button navigates to the home page of the app and then clears the entire navigation back stack.
For example, if the pinned page is a shopping cart, the user may want to complete the purchases in the shopping cart and then start shopping again. In this case, giving the user a home button improves the user experience by reducing the number of taps they need to get back to the start of the app.
In your MainPage:
protected override void OnNavigatedTo(NavigationEventArgs e)
{
while (NavigationService.BackStack.Any())
NavigationService.RemoveBackEntry();
base.OnNavigatedTo(e);
}

It's permitted but not recommended. As a general rule you should rely on the back button for navigation to return to the main page.
If you do want to implement this behaviour you should test carefully with actual users who are familiar with the phone. Don't invalidate your UX test by having users who aren't familiar with the phone. Your actual users will be and will expect your app to follow the conventions of the native apps and almost all others.
If you do need to implement this you will probably want to use the NonLinear Navigation Service to correctly manage the back button behaviour.

I don't think it is disallowed, however, doing this could cause navigation loops that will annoy the user when he / she tries to exit your app using the back button.
For instance, imagine an app with 3 pages, A, B & C. Say page C contains a 'home' button to get back to page A directly. So your navigation stack may end up looking like this:
A -> B -> C -> A -> B -> C -> A ....
That requires a lot of back button presses to get the user back to the start page and exit the app. There are a few ways to avoid this, the most obvious, of course, being, do not provide a 'home' button. But if you decide that is a must-have for your app, you can
Use the non-linear navigation service to manage the circular navigation
Use a more naive method where you maintain a global flag, when the user presses the home button set this flag and call NavigationService.GoBack(). Override the OnNavigatedTo method on each page and if this global flag is set call NavigationService.GoBack() again until you get to the main page.

i believe it is allowed as long as the back button navigation goes back to the last visible page.

Related

MVVM Conditional return navigation in Prism

Here's the business problem I'm trying to solve:
Start with pages: Menu -> Activity -> Connect.
When the user navigates from Menu -> Activity, if there is a specific piece of hardware not connected, I want to immediately Navigate to the Connect page.
When back button is pressed on Connect page and there is still no device connected, we navigate back to Acitivyt. But now I do not want Activity to navigate again to Connect (trapping them in a loop). Rather I want to navigate all the way back to Menu. Prism does not (that I can find) provide a way for me to know if I'm arriving at the Activity page from the Connect page or from some other location.
In reality, Activity may be navigated to from a number of different places in the program, when they hit back on Connect, I want them to return to whatever page they came from before Activity (not necessarily Menu). What I'd like to know is how can I solve this conditional navigation problem in Prism?

Open second window when laravel app opens

I am creating an app with Laravel that is supposed to use GoogleMaps API to show certain data in the map.
What I want to achieve is, that when you browse the root of the app, so when the user hits the main website, a new window is opened that will show a map to work with. So I want to have the ability to work with a second screen that only shows the map and all the information that should be displayed on the map.
How can I open a new window with certain content automatically when I browse to the main page.
Best
Sebastian
All modern browsers prevent this from happening, as it's commonly abused to serve popup advertisements. You'll need to make the new window happen via a user action, like a click on a button.

What is the hype around the Windows Phone 8 back button?

I know how to implement the back button. My question is about the desired behaviour (as I experienced there is a hype around it that the good implementation of back button is required to sell the app in the store).
There is the official source:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff402536(v=vs.105).aspx#BKMK_BackButton
But I have never used a WP8 for more than 5 minutes. I understood that the "Windows" button/key is the same as android home and ios home buttons. Is it true, that the WP8 back should be the same as the android back? (Briefly navigate back through pages (screens/activities), dismiss alerts or cancel confirm popups, or if it is the first/only/final page/activity, the app should exit.)
As I experienced, there is a long-press on the back button, which brings up the app switcher (~ios double home). Is it true that I should not take care about of this button? Is the default behavoiur the same for the remaining buttons (windows, power off, camera (half and full), search)? Should I override them? Can I override them (I think I can use camera, but can I use volume controls for other purposes)?
The certification requirements lay out what the back button should do pretty well. In short, it sounds like how you described the Android back button - here are the relevant requirements:
(5.2.4.1) Pressing the Back button must return the app to the previous page or return to any previous page within the back stack.
(5.2.4.2) Pressing the Back button from the first screen of an app must close the app.
(5.2.4.3) If the current page displays a context menu or a dialog, the pressing of the Back button must close the menu or dialog and return the user to the screen where the context menu or dialog box was opened.
You don't have to handle triggering the long-press, nor do you need to handle navigation specifically (assuming you're using the NavigationService for page navigation.)
You can definitely override the camera button, but search, power, and volume are off limits.

Back button only return in Windows Phone application

Is it allowed by Windows Phone application certification rules, to only have users be able to return to a previous screen with the use of a hardware back button?
In my scenario, a user clicks on a setting button and lands at a settings page. He changes settings if he decides to, and all the changes get saved automatically, like in iOS.
But currently, the only way for the user to get out of the settings screen, is to press a hardware Back button on the phone.
Will such implementation of navigation functionality pass the Windows Phone certification?
Yes - leave the back button as the navigation method to get back to your main page after visiting the settings page. Not only is this allowed, but it is the desired method of back navigation, and it is what Windows Phone users expect. Here is a great article on the subject: http://blogs.msdn.com/b/ptorr/archive/2011/10/06/back-means-back-not-forwards-not-sideways-but-back.aspx
As far as I understand the terms of the navigation guideline is your usage the right way to go.
Back button
Pressing the back button from the first screen of an application must exit the application.
Pressing the back button must return the application to the previous page.
If the current page displays a context menu or a dialog, the pressing the Back button must close the menu or dialog and cancel the
backward navigation to the previous page.
You should only implement back button behaviors that navigate back or dismiss context menus or modal dialog boxes. All other
implementations are prohibited.
See this cheat sheet for more informations on the design guidelines.

Windows Phone 7 and Back button Guidelines

I'm reading the following sumission requirement:
To maintain a consistent user experience, the Back button must only be used for backwards navigation in the application.
a. Pressing the Back button from the first screen of an application must exit the application.
b. Pressing the Back button must return the application to the previous page.
c. If the current page displays a context menu or a dialog, the pressing of the Back button must close the menu or dialog and cancel the backward navigation to the previous page.
d. For games, when the Back button is pressed during gameplay, the game can choose to present a pause context menu or dialog or navigate the user to the prior menu screen. Pressing the Back button again while in a paused context menu or dialog closes the menu or dialog.
My application require LogIn the first time, before entering its MainPage.
The login data will not be asked again (the user can change account from the settings).
I would like to avoid user entering again in the login page by using the backstack.
Pressing back from MainPage will exit the application.
In particular I'm worried about:
a. I show as a first screen the login page which will navigate to the mainpage, but I'm exiting the app with a back from the mainpage
b. I'm skipping a page, so pressing back is not strictly going to the previouspage
Do you think it will satisfy the certification requirements ?
Thanks
This scenario is allowed, what you should do is:
upon entering the MainPage (OnNavigatedTo) - remove one page from the back stack:
NavigationService.RemoveBackEntry();
Read this thread on the Windows Phone forum
The most important part appears to be that you should never disable the back button but I do think that according to this thread that it is allowed to skip the login screen.
On the other hand you might want to rethink the flow of the application when you consider thombstoning and re-activating; should the user login again and what would a natural flow be?

Resources