Sleeping data

Hello Team,

I need sleeping data in my application.
As per SleepMonitor Api, I don’t see any method which gives me sleep data.

Please help me.

Thanks in Advance.


I have a same problem

You can read the following documentation. This documentation might help you to solve your problem.
On this page, the following parts show how to collect sleeping data.

To enable the monitor and start collecting data, use the start() method of the HumanActivityMonitorManager interface (in mobile and wearable applications):

function onchangedCB(sleepInfo) {
    console.log('Sleep status: ' + sleepInfo.status);
    console.log('Timestamp: ' + sleepInfo.timestamp + ' milliseconds');

tizen.humanactivitymonitor.start('SLEEP_MONITOR', onchangedCB);

I just followed the code from this website, but it would said the sleepInfo is not defined.
the result

this is my code