ehangurbuz
New member
Greetings Macrodroid Community.
please help me, im using google fit but it wont track sleep automatically so macrodroid can track sleep and send intent to fit but im not good at macrodroid.
I think about on this macro let me introduce you:
Detect sleep (15-85) con: light sensor(10lx) hr(21-12)
Cycle:
If yes start chrono and save "first start time"
If awake stop
If sleep again continue chrono
End of cycle
I dont know how recognize "last awake" and save it
And chrono "duration"
Send intent that 3 values to google fit
Bard ai says:
Choose "Custom Intent."
In the "Action" field, enter "com.google.android.apps.fitness.RECORD_SLEEP."
In the "Extras" field, enter the sleep time data in JSON format. For example, to record 8 hours of sleep starting at 10 PM:
Bard Ai says this is google fit JSON:
{
"startTimeMillis": 1709467200000,
"endTimeMillis": 1709553600000,
"durationMillis": 36000000
}
Best Regards.
Emirhan GÜRBÜZ
please help me, im using google fit but it wont track sleep automatically so macrodroid can track sleep and send intent to fit but im not good at macrodroid.
I think about on this macro let me introduce you:
Detect sleep (15-85) con: light sensor(10lx) hr(21-12)
Cycle:
If yes start chrono and save "first start time"
If awake stop
If sleep again continue chrono
End of cycle
I dont know how recognize "last awake" and save it
And chrono "duration"
Send intent that 3 values to google fit
Bard ai says:
Choose "Custom Intent."
In the "Action" field, enter "com.google.android.apps.fitness.RECORD_SLEEP."
In the "Extras" field, enter the sleep time data in JSON format. For example, to record 8 hours of sleep starting at 10 PM:
Bard Ai says this is google fit JSON:
{
"startTimeMillis": 1709467200000,
"endTimeMillis": 1709553600000,
"durationMillis": 36000000
}
Best Regards.
Emirhan GÜRBÜZ