How to add meditation/Mindful minutes data to health connect?

30 Views Asked by At

we are writing code to add user exercise data to google health connect. We are able to write data for Yoga and many other exercises. Now we want to add data for meditation or mindfulness. but we did not find any relevant method to perform so. We are developing app in react native and below is the code we are using for exercise.

 private val healthConnectClient by lazy { HealthConnectClient.getOrCreate(context) }

 healthConnectClient.insertRecords(
      listOf(
        ExerciseSessionRecord(
          startTime = start.toInstant(),
          startZoneOffset = start.offset,
          endTime = end.toInstant(),
          endZoneOffset = end.offset,
          exerciseType = ExerciseSessionRecord.EXERCISE_TYPE_YOGA,
          title = "IshaKriya"
        )
      ) 
    )
  

we have check all record of ExerciseSessionRecord but did not found type for meditation. Is there any way to add mediation or mindfulness to health connect.

Thanks for you help and assistance

0

There are 0 best solutions below