TL;DR;
How do I disable everything on windows phone that a user can use to "get out of my app"
Long version
I'm developing a app for a table running windows phone. This tablet will be available to general public so they can choose which kind of service they want (like "open new account", "talk to the manager" and so on). Because of that I would like to disable everything on the tablet (home button, close button...) so a miss guided user wont be able to close my app.
How do I do that? (Of course I intend to provide a "Close app" button that will require a password of some kind...)
There's no way you can do what you want with Windows Phone. There is no ability to, in software, block access to the start or search buttons.
As indicated in other answers, you can override the back button but if you prevented the app from going to the home screen you would be unable to get the application certified (you could still sideload to the device, or distribute through the company store).
You may be better served considering an RT device (with Windows 8.1 in KIOSK mode) or Windows 8 Embedded Handheld (which is based on Windows Phone 8).
It is possible to change the behavior of the back button by doing the following.
Place this in your phone:PhoneApplicationPage tag ie the header of the page.
XAML
BackKeyPress="PhoneApplicationPage_BackKeyPress"
In the code behind.
C#
private void PhoneApplicationPage_BackKeyPress(object sender, CancelEventArgs e)
{
e.Cancel = true;
}
However it is not possible to capture the home key pressed and search key pressed events. You could try messing with the "Application_Deactivated" method in the App.xaml.cs so that when the application is deactivated...it is not? That could get messy and I've never done it before. Just an idea. Good luck.
Related
I'm not a WP8 dev, but I wanted to write a little timer app for my toddler. Thing is, she shouldn't be able to turn it off by clicking 'home','back' or 'search', but by password only. Its for personal use only, so store policies/hackiness dont matter. I know it can be done on android, but how about WP8?
You could programatically block any back-button presses (though it's not compliant with windows phone store requirement), but there's no way to block start and search buttons.
Try encapsulating those buttons with some DuctTape
In iOS, one doesn't need to add a close icon for an app. In the rare event that one wants to kill an app they can do it via the OS.
When looking at the cocos2d-x project that is created by default when using the console (v3.1.1), the sample HelloWorld scene places a button on screen to "close" the app.
Is this actually required in ANY platform ? Does it make sense to add this button at all ?
Apple usually rejects on this and Google and Microsoft don't like it.
You can, however, have close buttons on menus or popovers (say, like a pause screen).
I'm working on a WP8 app that will utilize the camera for a feature. I've read that, as of GDR2, you can now change which app opens with the camera button, but:
it appears that an app needs to be specially written to be used like
this; not every photo or camera app can be configured to launch when
you press the Camera button.
Question: What do I need to do in my app for it to become an available option in the "Pressing the camera button opens: " drop down when navigating to Settings -> Applications -> photos + camera?
Additionally, part 2 of this question would be (if part 1 is possible), when the application is launching, can I determine if the user opened it via the camera button (so that I could go straight to my camera feature)?
I've seen this article but it only describes how to use and handle the shutter button, it doesn't mention how to allow this button to open the app.
Has anyone been able to accomplish this?
This thread (http://forums.wpcentral.com/windows-phone-8/234751-changing-default-camera-app.html) seems to suggest that only manufacturers can create apps that can do this. Not sure if it's definite, but I've never heard of a 3rd party camera app that can do more than register as a lens.
I have a windows 8 app, in which i show the list of students as tiles. When a tile is tapped on, the app bar opens which give the option to edit. My question is; when the tile is tapped, is it fine to go to the Edit window rather than opening the app bar. Does windows 8 app guidelines allow this.
I have gone through the windows 8 guidelines but it has left me confused if its the right way or not.
Thanks in advance.
I think the best way to do this must be that on click of the tile you should open the edit window. And the appbar must have only add button, so that in case the user wants to add a student he can do so through the app bar. I feel this is the correct user experience.
I have this requirement where i have to show a menu when users slide their finger down the screen. Just like viewing notifications in android and iOS.
If not the same thing may be any alternatives that i can use.
I'm new to windows phone development.
Please help.
While it can be done on your own, it's a pain to do well, and Telerik has already done this - check out their Data Bound ListBox control - http://www.telerik.com/products/windows-phone/overview/all-controls/databoundlistbox.aspx