I have a problem while trying to get the accelerometer data using the HTML 5 interface.
I declare this handler event:
window.addEventListener("devicemotion",getMontionData,true);
to get the data provided by the accelerometer sensor. On the other hand, I have a function called as getMontionData:
getMontionData = function (e)
{
xAcceleration = e.acceleration.x;
yAcceleration = e.acceleration.y;
zAcceleration = e.acceleration.z;
}
to get the accelerometer data. The problem that I have is that the getMontionData function is not called when the device is locked or the screen is on black.
I'm doing this test on a smart watch using Tizen IDE and it is set this property
Could anybody explain me how to enable the application to get data even though the device is locked or the screen is on black?
While the application main window is displayed, the devicemotion event should be called since the getMontionData function is called. The problem happens, when the device screen is on black
Thank you so much