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
Related
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).
Am working on a windows store winjs application and am trying to force display the touch keyboard on the application screen.
I couldn't find any proper solution over the net for the same.
Is there a way to force display it?(would be great if there are some work arounds)
The touch keyboard show & hide behavior is designed to be controlled by the user and should not be changed easily.
Anyway an easy workaround is to set the focus on an input control in the page programmatically. This will make the keyboard appear, but the the control will be back to the user and he will be able to hide it at any time.
Cheack this article for a more complex workaround if you need a bit more control: How do I hide virtual keyboard for select element in Win8 JavaScript app?
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.
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
I'm developing an app that needs to generate mouse events on a window Win32/WPF which may be minimized or hidden from view on the desktop.
I have tried the user32.dll APIs SendInput, SendMessage, PostMessage etc. These work only if the window is visible on the desktop. Would you know about any methods that work for hidden/inactive windows?
I've also tried .NET's UI Automation library. In this case, a window is brought to the front or I'm not able to get a clickable point for the control.
Any ideas how I can proceed? If I can proceed?
I don't know if you're still interested in an answer (I just stumbled upon this question out of sheer dumb luck), but have you tried making a global windows hook?
I have no honest idea on how to properly go about implementing one; but I know you should be able to add a global windows hook to, well, Windows, to listen for whatever events you want (should include mouse and keyboard events!)
Good luck...