Releases: matinzd/react-native-health-connect
Releases · matinzd/react-native-health-connect
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
v1.2.0
v1.1.0
v1.0.4
v1.0.3
What's Changed
- chore(docs): fix small typos in getting started & aggregate record by @aarlin in #22
- chore: app expo plugin configuration by @matinzd in #24
- fix(types): request permission return type by @matinzd in #25
From now on, you can utilize the Expo plugin bundled with the library, thus eliminating the need for androidManifestPlugin.js
. You can edit app.json
file like this:
{
"expo": {
"plugins": ["react-native-health-connect"]
}
}
New Contributors
Full Changelog: v1.0.2...v1.0.3
v1.0.2
1.0.2 (2023-05-09)
Bug Fixes
- randomize request code for onActivityResult (0ddb47b)
- remove starting activity from app context (cef36fc)
What's Changed
- chore(docs): add documentation for handling permissions in Expo projects by @kader1303 in #20
New Contributors
- @kader1303 made their first contribution in #20
Full Changelog: v1.0.1...v1.0.2