locked
Does windows8 care for lesser power of sensors before going to Connected Standby?

    Question

  • if yes, how?
    I mean which part of Sensors Framework informs sensors about CS , Should Sensors Apps developers do smth or it comes as a aprt of inbox?
    Friday, September 21, 2012 10:35 AM

Answers

All replies

  • Mishko,

    I will look into this for you,

    Best Wishes - Eric 

    Friday, September 21, 2012 7:33 PM
    Moderator
  • Mishko,

    I would follow the example in the sensor samples:

    http://code.msdn.microsoft.com/windowsapps/Accelerometer-Sensor-Sample-22982671

    Best Wishes - Eric

    Friday, September 28, 2012 10:06 PM
    Moderator
  • The Sensor framework handles the transition to/from CS on behalf of the app. When going into CS, the app is temporarily disconnected from the sensor driver layer. When exiting CS, the app is automatically reconnected with the same settings as before. The driver layer keeps a count of connected clients (apps) and will go into a low power mode when the client count reaches zero. By the way, for the app, going into CS is no different than being suspended.


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, October 02, 2012 4:38 PM
  • Hi David,

    Question regarding sensors and Connected Standby mode. Are sensor drivers allowed to run during CS mode. Can a service that might be scheduled by OS during a maintenance mode (every 30 seconds I assume) access sensor data. If not is there any way to enforce that.

    Tuesday, May 07, 2013 11:50 PM
  • Sensor drivers can run in CS. In fact, without extra work, sensor drivers are not directly aware of being in CS. Instead, they should manage their power usage based on the number of active client connections (i.e. if zero active client connections, go to the lowest power mode possible). This is independent of the D* power states which still take precedence.

    This posting is provided "AS IS" with no warranties, and confers no rights.

    • Proposed as answer by msdn_patronus Wednesday, May 08, 2013 1:03 AM
    Wednesday, May 08, 2013 12:10 AM
  • Can you explain more about D* power states or provide any reference to it?
    Wednesday, May 08, 2013 12:58 AM
  • Also what happens to the sensor driver in D* state ? I am expecting to use the sensors during the connected standby state, similar to how email gets updated periodically.. I am expecting to read the sensor data periodically during CS and trying to figure out if that is possible via either a service or an app ( any kind of solution)
    Wednesday, May 08, 2013 1:07 AM
  • D* (aka Device) power states are described in this MSDN article:

    http://msdn.microsoft.com/en-us/library/windows/hardware/ff543162(v=vs.85).aspx

    However, from your follow-up questions, I realize that you not really concerned about sensor driver behavior in CS. Instead, you are asking whether you can write an app or service that gets sensor data while in CS. The answer is effectively "no" for most common scenarios. Here are the limitations:

    So, if your scenario requires that your app wake up every 30 seconds when in the background, there is no solution. However, if your scenario is satisfied by one of the available background task triggers, then your app can access sensor data from that background task.

    Note that the same is not true for Geolocation sensor data which is explicitly disabled while in CS.


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, May 09, 2013 5:11 PM