How to keep my accelerometer awake with screen off with Sony SmartwatchMN2

青春壹個敷衍的年華 提交于 2019-12-07 12:28:50

问题


I want to know the method of keeping my accelerometer awake with screen off.
In the developer documentation(SmartWatch_WP_1.pdf in Smart Extension SDK), I read that

  • the sensor is stopped when the control is paused
  • the control is not paused by using ControlExtention#setScreenState(Control.Intents.SCREEN_STATE_OFF).
  • the control is paused by the user operation or time elapses.

So I tried to use ControlExtention#setScreenState(Control.Intents.SCREEN_STATE_OFF).
After one minute, the control was paused and the accelerometer was stopped.
But it was not paused when the power cable connected.
Of course I want to keeping the accelerometer awake when power cable not connected.

I also tried the wakelock(PowerManager.FULL_WAKE_LOCK) and Service#startForeground, but i didn't get well.

Are there ways to resolve this problem?

My Configuration is

  • Device
    • Sony Smartwatch MN2
  • Smartwatch Version
    • 0.1.A.3.7
  • Host Application Version
    • 1.2.37

Thanks!


回答1:


We are looking into this - I will get back to this thread if and when I know more.

Update

An update of the SmartWatch application was published on Google Play on March 14th (2013). This update includes a fix for the above Sensor problem.



来源:https://stackoverflow.com/questions/13602556/how-to-keep-my-accelerometer-awake-with-screen-off-with-sony-smartwatchmn2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!