motion detection - Smartwatch Gear 2 -


i have developed application getting data gear2 accelorometer. devicemotion events managed window event listener such as:

window.addeventlistener('devicemotion', function(e) {         ax = e.accelerationincludinggravity.x / 9.8;         ay = e.accelerationincludinggravity.y / 9.8;         az = e.accelerationincludinggravity.z / 9.8; }); 

i need run application in background if screen switched off. adopted power setup:

 tizen.power.request("screen", "screen_normal");  tizen.power.request('cpu', 'cpu_awake'); 

the problem: when screen switched off (by means of home button) motion event associated window not fired. think if window not active listener not active.

somebody has idea how accelometer data if screen off?

regards v

yes, can still data when app running in background on pressing home key.

please add in config.xml

<tizen:setting background-support="enable"/> 

this enable app collect data in background well. :)


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -