Answered by:
Could I use the timer background task without lock screen permissions?

Question
-
I use the timer trigger background task,and request lock screen permissions.But when I call BackgroundExecutionManager::RequestAccessAsync(),a dialog pop up.Is there anyway that do not pop up the dialog when I use this API?Friday, August 10, 2012 3:27 AM
Answers
-
No. The user gets to control which apps have are on the lock screen. There is no way for an app to force this without the user's permission.
--Rob
- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Monday, August 13, 2012 4:12 PM
- Marked as answer by feeeeeeeeei Wednesday, August 15, 2012 1:48 AM
Friday, August 10, 2012 3:34 AMModerator -
There is no way for an app to set this programmatically. The user has control over which apps appear on the lock screen.
Calling BackgroundExecutionManager::RequestAccessAsync() and letting the user choose to allow the app or not is the appropriate thing to do.
When you set up a system image you can preinstall apps and set this state, but I don't know the details beyond that it cannot be done after the fact. For more information about setting up an image see Service a Windows Image . Doing so isn't an app development topic, so please post any questions you have about how to do this in the appropriate Windows 8 Installation, Setup, and Deployment forum on TechNet.
--Rob
- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Monday, August 13, 2012 4:12 PM
- Marked as answer by Rob Caplan [MSFT]Microsoft employee, Moderator Tuesday, August 14, 2012 10:43 PM
Friday, August 10, 2012 5:09 PMModerator -
No you cannot.
Please review this document to get a good idea of what you can do with background tasks and their requirements:
http://www.microsoft.com/en-us/download/details.aspx?id=27411
Jeff Sanders (MSFT)
- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Monday, August 13, 2012 4:11 PM
- Marked as answer by Jeff SandersMicrosoft employee, Moderator Tuesday, August 14, 2012 11:47 AM
Monday, August 13, 2012 4:11 PMModerator
All replies
-
No. The user gets to control which apps have are on the lock screen. There is no way for an app to force this without the user's permission.
--Rob
- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Monday, August 13, 2012 4:12 PM
- Marked as answer by feeeeeeeeei Wednesday, August 15, 2012 1:48 AM
Friday, August 10, 2012 3:34 AMModerator -
hi,Rob
In my application,I want do something every 15 minutes.So I use the timer background task,but the timer trigger required lock screen permission.When first run my application,I call BackgroundExecutionManager::RequestAccessAsync() to requre this permission,but there always pop a dialog.And in windows 8 RP,the samples pre-installed by miscrosoft had this permission,but I don't see them pop this dialog.So I want to konw how they implement and whether I can do.
How to implementFriday, August 10, 2012 6:05 AM -
There is no way for an app to set this programmatically. The user has control over which apps appear on the lock screen.
Calling BackgroundExecutionManager::RequestAccessAsync() and letting the user choose to allow the app or not is the appropriate thing to do.
When you set up a system image you can preinstall apps and set this state, but I don't know the details beyond that it cannot be done after the fact. For more information about setting up an image see Service a Windows Image . Doing so isn't an app development topic, so please post any questions you have about how to do this in the appropriate Windows 8 Installation, Setup, and Deployment forum on TechNet.
--Rob
- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Monday, August 13, 2012 4:12 PM
- Marked as answer by Rob Caplan [MSFT]Microsoft employee, Moderator Tuesday, August 14, 2012 10:43 PM
Friday, August 10, 2012 5:09 PMModerator -
Thanks,Rob.
I also had some questions about timer trigger background task.Is there anyway that I can use timer trigger background task without lock screen permission?I don't want my application pop the dialog.It's annoying.
It's annoyingMonday, August 13, 2012 6:21 AM -
No you cannot.
Please review this document to get a good idea of what you can do with background tasks and their requirements:
http://www.microsoft.com/en-us/download/details.aspx?id=27411
Jeff Sanders (MSFT)
- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Monday, August 13, 2012 4:11 PM
- Marked as answer by Jeff SandersMicrosoft employee, Moderator Tuesday, August 14, 2012 11:47 AM
Monday, August 13, 2012 4:11 PMModerator -
Thanks,jpsanders.
I got it.
Tuesday, August 14, 2012 12:25 AM