Can a WinRT app continue to run while Screen Off? - windows-8

Can a WinRT app continue to run while Screen Off?
I know that a WinRT application can create a Background Task that periodically executes even when the application is not running. Handy, but not what I am asking. What I am asking is, when the user clicks the power button and invokes Connected Standby, is there anything an app can do to remain active. Can it ask for some special capability?
Example - in Windows Phone there is a handy Running and Walking app that keeps track of "where you are" while it is running - then tallies your distances, etc. Even when the screen is off! Turn the screen on and the "where was I" map is up-to-date. Is this type of application possible in WinRT?

I've been looking into the same thing recently, and unfortunately it seems that what you want to do isn't possible with WinRT.

Why don't you use Background task to simulate what you are trying to achieve. When the user starts the app again, you could have the info populated to the latest data by looking at the store where the background process updated. Just a thought.

Related

Keep my app as responder while calling activateWithOptions:NSApplicationActivateIgnoringOtherApps

I am making a vim-style "window manager" that takes text input, much like Alfred or Spotlight in Mavericks (in a floating panel).
The problem I'm having is when I call activateWithOptions: on a running application it steals focus from my window. I was hoping the problem would be solved by simply bring my app to the foreground again, however it seems the activation is running on a separate thread, and I end up activating my app before the original app gets activated.
I have tried reactivating when I receive NSWorkspaceDidActivateApplicationNotification, but that doesn't work either.
Ideally I'd like to pause execution until the application is focused for multiple reasons, since that would be the window I manipulate further.
Does anyone have any suggestions?

Windows Phone - know when the screen is on

I'm working on an app that changes the lock screen background, and I would like to know when the user turns on his phone and looks at the lock screen.
The reason for my question is that if I know that the background has been watched, I will be able to replace the background.
There is no way to do what you're describing. When your application isn't running, you have no information whichever about user's activity.
You cannot do that. If your lockscreen is activated you cannot Access to App data, for security reason.
So, as KooKiz said there is no way to do that.

Detect screen shutdown in vb.net

I'm building an application using vb.net that should record some specific user actions, one of these actions is the screen shutdown, is there a way to do that? Maybe a system event or something that i can check periodically to know if the screen is active or not.
I've already found some code to check if the screensaver is running but i want to know if there's a way to detect if the screen is phisically turned off.

How do I programmatically navigate to the start screen from within a Windows 8 javascript app?

I am developing an app that allows the user to make certain changes to tiles on the Windows 8 start screen. When a change has been made within the app, the user will be shown a "View my changes" button. Clicking the button should bring the user back to the start screen.
I have looked into different ways of closing/suspending the app programmatically (and thus taking the user to the start screen), but I have not found a way to achieve this using WinJS. Throwing an exception closes the app, but this seems like a very dirty workaround. Any suggestions?
I'm assuming you are creating secondary tiles and want to show the users what they look like? #mydogisbox is right in that this kind of functionality has probably been deliberatly excluded.
I'd recommend to just do an in-app 'view changes' of whatever changes to secondary tiles the user might have made. In general, I'd argue that this would be a better user experience because you will keep the user engaged within your application and not be essentially kicking them out of the experience.

In WinRT how to create an application that is always visible?

With windows 8, is it possible to create an application that is always visible? For instance, in previous versions of windows, there is the task bar with quick launch icons. Can I create something similar to the quick launch icons that are always on the screen?
If you are referring to a Windows 8 Store app then the answer is no. You can have a live tile and toast notifications that provides updates to the user which may cause the user to launch your application.
A good article to read to understand how your Windows Store apps will run on Windows 8 go here to learn about Application lifecycle (Windows Store apps). This will explain the App execution state.
It is not possible in the RT version, but the same is possible in the desktop version. If you have a desktop app, you can pin it to the taskbar. But any Window store app cannot be pinned to the taskbar. What you can do instead is move the app to the beginning of your Home screen, so anytime you click the Windows button your app will be visible right in front.
Do you mean always visible in the Star Menu screen? If so, you can add tile updating functionality to your application. As long as the user has the application pinned to the Start Menu, he would see the updates. Check the link below for an introductory tutorial.
http://blogs.msdn.com/b/windowsappdev/archive/2012/04/16/creating-a-great-tile-experience-part-1.aspx
"Quick Launch" has a very specific meaning, which you may or may not have been referring to in your question.
Below is the Quick Launch bar in Windows 8 - essentially a toolbar pointing to a location in your %AppData% directory. Prior to Windows 7 it was available by default, but the ability to now pin items directly to the taskbar rather supersedes it. Here's how you can restore Quick Launch if you really want to :)
It's, of course, available only in the Desktop mode and not on the Modern UI, where pinning a tile is the best you can hope for, and it's all up to the user to pin it AND to determine where it shows up on their Start Screen.
Another option worth mentioning (although more like system tray than quick launch) is lock screen presence. If the user chooses so and your app supports that, he can add it to his lock screen:
either as a a badge (up to 7 apps)
or as a tile notification (single app only)
This is not a way for the user to quickly start your app (other answers have already covered these options) but a way to stay visible and keep your user informed.