android / android/android-health-connect-codelab

Missing import in the start module

Open
#18 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
63
Forks
41
PR merge metrics
No merged PRs in 30d

Description

Downloaded and ran the start module following the instructions in [Your First Health Connect Integrated App](https://developer.android.com/codelabs/health-connect).

Everything worked correctly until Step 4. Write data (https://developer.android.com/codelabs/health-connect#3).

After copying and pasting code, received error on run at line 106: `metadata = Metadata.manualEntry(),`

However, the finished module worked correctly with the same code.

Finaly compared the 2 modules and identified the following entry was missing from the start module:
`import androidx.health.connect.client.records.metadata.Metadata`

Added code and ran. Everything worked correctly.

Possible Resolutions:
Correct [Your First Health Connect Integrated App] with instructions to include the import;
or
Update code to include the import.

Contributor guide

Open the contributing guide

Research direction

Compare the start module's Step 4 code, especially line 106, with the completed module and the linked Health Connect codelab instructions. Verify whether the metadata import is absent, then run the start module after the correction; done means the Step 4 app builds and runs successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
documentation, mobile-dev
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.