GPO lock screen even when video/radio is playing - gpo

We currently have an active GPO that locks users screens after 5 mins, so they have to relogin.
But unfortunately some users started playing 10+ hours youtube videos to bypass this GPO and then leave their PC unlocked for a long period of time.
Is there any way to handle their "bypass solution"?
Like, their screen would lock after 5 mins of mouse inactivity or something, even when the video/radio is playing?
Perhaps I am not using the right key words, but I can't seem to find any solution on Google.
Need to figure out how to recognize that the user is away, even when the YT video is playing.
Thanks in advance!
David

Related

WebVR mobile browser screen timeout

Every WebVR app on Android I tried become completely useless after 30 second due to screen timeout in the browser. Is there anyway to prevent it?
There is a (somewhat hacky) solution for this that is being used by the webvr-poyfill.
Android doesn't go to sleep when a video is being played back, so even creating an invisble video-element and playing it will disable the inactive-timeout.
On iOS, a page navigation is initiated and immediately stopped every 30 seconds to keep the screen awake.
Also note that this problem will probably go away when chrome for android ships the real WebVR implementation (probably sometime later this year, when the new daydream-compatible pixel/pixel XL-phones are released)
I think you might find that unless you're on desktop the browser itself is unable to keep the screen on. Instead this can only be sustained by a third party app, or more simply by the user directly through settings.
Simplest solution might be to ask user to adjust settings.

Is it normal for Apple to reject an app for using UIApplication to disable screen lock?

I just had an app rejected because I have a user changeable setting which allows the user to disable screen lock via
[UIApplication sharedApplication].idleTimerDisabled = YES;
Apple says I used an undocumented API but it IS indeed documented here: https://developer.apple.com/library/ios/documentation/uikit/reference/UIApplication_Class/index.html#//apple_ref/occ/instp/UIApplication/idleTimerDisabled
My app graphs the barometric pressure and if you want the graph to run longer than a minute or two, it is important to disable screen lock. The default behavior is screen locking as usual, but there's an option in the settings to disable screen lock and this seems to be what Apple took issue with. I've had academic users request this feature, and I have used it in other apps successfully, however this time Apple rejected my app for using it. Is this normal? Is disabling screen lock via UIApplication really now allowed?
I am not sure but I think the issue is that note under the important heading with the documentation you shared;
"You should set this property only if necessary and should be sure to
reset it to NO when the need no longer exists. Most apps should let
the system turn off the screen when the idle timer elapses ..."
You should write into resolution center and confirm this;
We use that capability to prevent idle sleep when we are updating the firmware on a BlueTooth device. Immediately upon completing the update, we restore idle timeout. Apple never said a thing to us about it.
However, in your case, there is no technical reason to disable the idle timer. Your data collection is not going to fail because the system went idle. There is no adverse or unusual customer experience going to be had. That is probably what Apple took exception to.
Three possible paths exist:
1) Gather your data at intervals in the background while the system is idle and update the graph when the app again comes to the front.
2) Add messaging to your app to tell the user that if they want continuous display, they will need to change the idle timeout period in system settings. (With caveats about impact on battery charge duration.)
3) State your case to Apple.
I would go for both 1 & 2

Windows phone 8: Live tile updates in the emulator but not when downloaded from the maket

I have made an app with live tile for windows phone 8. The tile is programmed to refresh every 30 seconds. When the run the app in the emulator or when I deploy the app in my cell (Lumia 920) the tile works fine. But surprisingly when I downloaded the same app from the market and run it on the same device the tile doesn't update.
I did quite a bit of research on this problem and found that a similar problem is observed by many other people which can be found here.
Kindly tell me what is going wrong.
Extra Info : I have tried resizing the tile, pin and unpin the tile and hard reset. I have also tried changing the refresh period (initially the refresh period was 5 seconds). I have also checked that the background task is allowed for the app.
Thanks,
Apurva Pathak
Background agents have certain limitations, as listed below.
Background tasks can minimally be run every 30 minutes. There is a debug-only API to run them more regularly, but this is not available for released apps.
Some low power devices do not support background agents
Background tasks are limited by number on each device and can be enabled or disabled from application settings.
They do not work when power saver mode is activated.
As Mahantesh correctly pointed out your tiles work when you deploy the application because the ScheduledActionService.LaunchForTest() is allowed to run for a 60 seconds period for debugging and testing purposes ONLY.
Therefore this method cannot be called and it wont work with a time limit less than 30 minutes if the application is published to the market and users download it from there.

How to play sounds periodically?

With the new WP 7.1 they added Background Agent to play sound files from within your application, and TaskScheduler Agent to run tasks periodically.
However:
I want to play sounds periodically even if my application is closed.
TaskScheduler does not allow to play audio via XNA sound effects, BackgroundAudioPlayer or MediaElement (http://msdn.microsoft.com/en-us/library/hh202962%28v=vs.92%29.aspx)
TaskScheduler runs for a specific time with a FIXED interval of 30 seconds. I need to play a sound every hour on the hour.
Alarms can have a sound set to them, but there is no way to customize that dialog to not show and not need snooze or dismiss functionality.
There's no way to play sounds from a Background/Live Agent as there is no way to implement the required UI prompts that would be needed to satisfy the marketplace certification requirements around other music which may be playing on the device at the time.
In theory you could create the functionality you are after with an hour long track that is mostly silent which you play via a background audio player. In reality though this would likely be a big drain on the battery and would prevent the user playing other music.
If you can explain why you want to do this we may be able to make alternative suggestions.
Also note that the length of time a scheduled agent can run for is a MAXIMUM of 15 seconds every 30 minutes (plus or minus 10 minutes).
Is there now a possibility to play the sound on the setting timer even if we close the application ?

Track Accelerometer under lock screen

Is it possible to track the accelerometer value while under the lock screen?
I managed to write a simple application which counts from 1 up to 100 using a timer which fires an event on which I increment a counter.
But when I use register a handler for the ReadingChanged event of the accelerometer it will not be fired anymore once the screen has been locked. Even if I unlock the screen again I will have to readd my handler.
the msdn documentation tells on the one page:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff941090(v=vs.105).aspx
"Valid reasons to disable idle detection in Windows Phone OS 7.1 applications include ones where core functionality continues while the phone is locked (for instance, an exercise tracking app)"
but the sensor api also tells:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202968(v=vs.105).aspx
"The Sensor APIs cannot be used while the application is running under the lock screen. For more information, see Idle Detection for Windows Phone. The Sensor APIs also cannot be used in background agents. For more information, see Background Agents Overview for Windows Phone"
I hope they will change the api soon, because of that it is not possible to write any good sleep tracking / sport tracking applications ... :(
I was helping a guy with this a couple of days ago. He had an app that tracks GPS and accelerometer data under lock screen.
Turned out the app accelerometer data stopped tracking when under manual or auto lock screen.
There may be an issue here to be looked into.
Under lock screen it is a good idea to minimise power usage... disable all uncessary code, like ui updates. My understanding of one the motivations for idle detection and running under lockscreen being opened up during CTP was in response to a lot of feedback from developers of map/tracking apps that basically need this for their app to be of any use.
I'm not sure of the usage case where you'd want to use the accelerometer under the lock screen.
Apps typically run under the lock screen when you need them to do something when you're not interacting with the device. e.g. playing music or downloading a large file.
If you wanted accelerometer data I'd assume that the device is being held and, therefore, presumably, looked at. Given this, why would you therefore want to run under the lock screen?
That being said, if you had a good reason to do so, you should still be aware that:
when your application runs under a locked screen, it ... must minimize
power usage
(from the Marketplace Certification Requirements.)
In my understanding, reading values from sensors is not minimizing power usage.

Resources