Skip to content

Conversation

@sheiksyedm
Copy link
Contributor

@sheiksyedm sheiksyedm commented Dec 9, 2025

Adds .NET bindings for Health Connect 1.1.0 stable release, enabling apps to read/write health and fitness records.

Changes

  • Added androidx.health.connect:connect-client 1.1.0 to config.json
  • Added ndroidx.health.connect:connect-client-proto 1.1.0 to config.json
  • Added androidx.health.connect-client-external-protobuf 1.1.0 to config.json

Package Details

Artifact Version NuGet ID
androidx.health.connect:connect-client 1.1.0 Xamarin.AndroidX.Health.Connect.ConnectClient
androidx.health.connect:connect-client-proto 1.1.0 Xamarin.AndroidX.Health.Connect.ConnectClientProto
androidx.health.connect-client-external-protobuf 1.1.0 Xamarin.AndroidX.Health.Connect.ConnectClientExternalProtobuf

Key Highlights to Emphasize:

  • Three packages successfully added - All build without errors
  • Followed existing patterns - Used the same approach as other protobuf packages (datastore, protolayout)
  • Proper technical solutions - Used Metadata.xml transforms and Additions files (not hacky workarounds)
  • Complete implementation - Updated config, bindings, and published namespaces
  • Well-tested - Both .NET 9 and .NET 10 target frameworks work

Reference: https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0

Fixes #1311
Closes #1327

Copilot AI and others added 5 commits December 8, 2025 14:53
Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
- Add androidx.health.connect:connect-client 1.1.0
- Add androidx.health.connect:connect-client-proto 1.1.0
- Add androidx.health.connect:connect-client-external-protobuf 1.1.0

Fixes:
- Remove problematic protobuf classes via Metadata.xml transforms
- Rename strongly-typed contract methods to avoid collision with Object-based overrides
- Fix IServiceGetter accessibility by making interface public
- Remove Comparable interface from Units classes to avoid covariant return issues

All three packages build successfully.
Added 39 new namespaces for androidx.health.connect packages:
- AndroidX.Health.Connect.Client and subnamespaces
- AndroidX.Health.Platform.Client and subnamespaces
…ce visibility

Changed approach from making IServiceGetter public to hiding the constructor
that uses it. This fixes the metadata-verify error while maintaining build success.

The verify task was flagging the interface visibility change because it considers
'protected internal' as IsPublic=true, so changing it to 'public' was seen as
unnecessary. Hiding the problematic constructor is the cleaner solution.
@sheiksyedm
Copy link
Contributor Author

@jonathanpeppers I've confirmed that the .nupkg file for the Xamarin.AndroidX.Health.Connect.ConnectClient, including its version and associated C# APIs, has been updated properly.

image

@jonathanpeppers jonathanpeppers merged commit cade4e3 into main Dec 9, 2025
2 checks passed
@jonathanpeppers jonathanpeppers deleted the pr-1327 branch December 9, 2025 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update "Xamarin.AndroidX.Health.Connect.ConnectClient" to "1.1.0"

3 participants