Releases: matinzd/react-native-health-connect
Releases · matinzd/react-native-health-connect
Release 2.1.0
2.1.0 (2024-06-30)
Features
Bug fixes
- fix(#90): maximize lib compatibility
Important changes
You don't need to add react-native-health-connect
to app.json
anymore. Adding expo-health-connect
to app.json
should be enough.
Make sure expo-health-connect
is listed under dependencies not devDependencies.
v2.0.3
v2.0.2
v2.0.1
v2.0.0
2.0.0 (2024-02-22)
Bug Fixes
Features
BREAKING CHANGES
For version 2 onwards, please add the following code into your MainActivity.kt
within the onCreate
method:
package com.healthconnectexample
+ import android.os.Bundle
import com.facebook.react.ReactActivity
import com.facebook.react.ReactActivityDelegate
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
import com.facebook.react.defaults.DefaultReactActivityDelegate
+ import dev.matinzd.healthconnect.permissions.HealthConnectPermissionDelegate
class MainActivity : ReactActivity() {
/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
override fun getMainComponentName(): String = "HealthConnectExample"
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ // In order to handle permission contract results, we need to set the permission delegate.
+ HealthConnectPermissionDelegate.setPermissionDelegate(this)
+ }
/**
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
*/
override fun createReactActivityDelegate(): ReactActivityDelegate =
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
}
Ensure you have the latest patch of React Native installed to use v2, and use react-native version 0.71 and higher.
v1.2.3
v1.2.2
v1.2.1
What's Changed
- fix(metadata): add recording method in the metadata object by @sauravexodus in #36
- chore: bump androidx.health.connect:connect-client to alpha04 by @gewfy in #44
New Contributors
- @sauravexodus made their first contribution in #36
- @gewfy made their first contribution in #44
Full Changelog: v1.2.0...v1.2.1