0

I have a created an app which has a Homescreen/landing page,Now whenever user navigates till last page and clicks the device back button he is redirected back to Homescreen. Now the issue is I have written code to clear all the backstack whenever user lands on the Homescreen in Homescreen OnNavigatedTo block. So whenever user clicks device back button of last page he is navigated to homescreen by creating a new instance of HomeScreen page. On Homescreen the backstack is cleared, so the user can exit the app from homescreen when he clicks the device back button. But according to Microsoft marketplace policy, backbutton must go back or go to previous page in backstack and not navigate to new page. So the question here is should I clear all my backstack and go to homescreen or what I am doing is right?

Kenny
  • 819
  • 1
  • 9
  • 24

2 Answers2

1

As far as I know, they are not so strict as that. They just want you to handle the back button.

I had blocked the back button in some pages of my application and the certification failed. I changed the behavior of the application, to either close the application when navigating back or jump a couple of pages back, and it passed certification.

Just make sure the back button does something...

Dante
  • 3,833
  • 4
  • 38
  • 55
  • Not really do something, but your app must exit using only back button, except for games. – Lukasz Madon Apr 23 '12 at 12:18
  • Thanks Dante for your quick reply. So it is fine if I navigate to a new page instead of going to back to the same page from backstack?. Ofcourse I will clear the backstack. – Kenny Apr 23 '12 at 12:19
  • Yes, app exits on device back button when it is on homescreen or login screen. – Kenny Apr 23 '12 at 12:20
  • 1
    @kanayabhattad If by going back you mean some other page where the user already came from, why not? If you navigate back to a completely new page the user has never seen, then I guess you have a problem. – Dante Apr 23 '12 at 12:30
  • Yes, navigating to a page the user has already seen, not a new page. Also I will clear the backstack incase of homescreen. – Kenny Apr 23 '12 at 12:52
0

The reason they dis-advise you from doing this is because you are using the wrong organisation.

  • Going deeper usually means you get too more specific data, in a way you can go back up one page.
  • Going to the side usually means that you get more data, eg. Panorama / Pivot

I can't see a case where going deeper would disallow the user from going back to pages in between, I would not use your application if I had to start it every time again or when it would go deeper when it is actually supposed to let me scroll through the content.

Trying to surround their certification is definitely not the way you should be going, but rather embrace it.

See this page for layout tips and tricks for the Panorama and Pivot controls.


As per the comments, you might find it a lot easier to ditch having to learn all platforms.

A jQuery Mobile application can do that for you.

jQuery mobile framework takes the "write less, do more" mantra to the next level: Instead of writing unique apps for each mobile device or OS, the jQuery mobile framework allows you to design a single highly-branded web site or application that will work on all popular smartphone, tablet, and desktop platforms.

Tamara Wijsman
  • 12,198
  • 8
  • 53
  • 82
  • Thanks Tom, I too want my UI to be designed accordingly but the issue here is the client wants the look and feel SAME across all platforms(Android, IPhone) which is restricting me. – Kenny Apr 23 '12 at 12:26
  • @kanayabhattad: What about a jQuery Mobile application? – Tamara Wijsman Apr 23 '12 at 12:28
  • Tom, imagine a sequential process: A -> B -> C, which can't be done twice -> D -> Exit. When in D, I don't want the user to go back to C. In my app, the user jumps to B instead. There are multiple workflows that are not linear. – Dante Apr 23 '12 at 12:29
  • @Dante: What if the user wants to correct something on a previous page? – Tamara Wijsman Apr 23 '12 at 12:31
  • Not all apps are data entry apps. I have a Push Up Trainer app, as an example. When the user finishes a workout he goes to a page that records the workout is complete. I don't want him going back to the page where the workout is in progress. I move him two pages back instead, and that makes perfect sense in this scenario. – Dante Apr 23 '12 at 12:34
  • @Dante: Why not do it all on the same page? That's how I see other applications do it. Well, technically you could use different pages for it but in practice you are on the edge of the certification, and loading new pages where you don't really have to. In any case, thanks for clarifying what you are writing. You should really consider the jQuery Mobile approach, because you can write workout stuff in that... – Tamara Wijsman Apr 23 '12 at 12:37
  • I decided to separate each step of my workflow in different xaml pages, but I could have merged some of them and hide/show stuff. I prefer to have more pages with less code and less complexity introduced by Visibility manipulation. – Dante Apr 23 '12 at 12:40
  • @Tom, jQuery mobile runs in the browser, right? My goal was to write a native app, as a learning experience. In some scenarios jQuery Mobile makes perfect sense. – Dante Apr 23 '12 at 12:42
  • @Dante: Yes, but you could write applications that launch the browser (or an in-application browser control if that exists). If it's paid you can do a HTTPS connection instead and POST pass some unique authentication serial generated by your application. If you plan to work this out this would heavily simplify maintenance (you don't need to update the mobile apps) because you just update all the functionality in one place. One caveat though, is that this one requires internet. I doubt if there is an off-line approach to this... – Tamara Wijsman Apr 23 '12 at 12:54
  • Here's an off-line approach, I doubt how easy this is to achieve on other devices though: http://stackoverflow.com/questions/4755127/open-offline-html-file-programmatically-in-windows-phone-7 In any case, I've shared enough knowledge and wish you good luck getting your application out there... :) – Tamara Wijsman Apr 23 '12 at 12:55
  • I know jQuery mobile exists and what it does. Still, it's intended for mobile versions of web sites, not for native apps. And by creating my apps I wanted to learn the Windows Phone development, not jQuery... Do you have a share in the company? :) Cheers mate – Dante Apr 23 '12 at 13:12
  • @Dante: Anyone does, even you, welcome to OSS. Other than that, stop re-iterating my words... :) – Tamara Wijsman Apr 23 '12 at 13:13
  • @TomWijsman- I believe apps which only launch webpages are also against certification rules on Windows Phone. – A-Type Apr 24 '12 at 19:48