You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+41-4Lines changed: 41 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ The CommonHealth Client SDK provides an interface that allows applications to ac
4
4
5
5
The CommonHealth Client SDK is in open beta.
6
6
7
+
If you're interested in developing a production integration with the CommonHealth Client SDK, please reach out to developers [at] commonhealth.org to begin the process of being whitelisted.
8
+
7
9
While we consider the SDK to be relatively stable, this is pre-release software, so the interfaces are subject to change based on evolving requirements and developer feedback. We're currently investigating ways to make it easier to remove configuration dependencies, so if you find anything particularly burdensome or confusing, please let us know by either emailing us or opening a Github issue.
8
10
9
11
## Audience
@@ -25,11 +27,11 @@ Once CommonHealth Developer Edition is installed, you will need to add a sample
25
27
26
28
### Gradle Dependencies
27
29
28
-
The CommonHealth Client SDK consists of two modules: commonhealthclient and common. Commonhealthclient contains the bulk of functionality for the SDK, while common types shared between the CommonHealth application and the CommonHealth Client SDK. You'll need to add the following to your application's list of dependencies:
30
+
The CommonHealth Client SDK consists of two modules: commonhealth-client and commonhealth-common. CommonHealthClient contains the bulk of functionality for the SDK, while common contains types shared between the CommonHealth application and the CommonHealth Client SDK. You'll need to add the following to your application's list of dependencies:
The release artifacts are made avalable via the Maven Central repository, so you will need to have the following in your list of dependency repositories:
@@ -339,10 +341,46 @@ Upon receiving the NEW_DATA_AVAILABLE notification, you can invoke a method on t
339
341
340
342
Using these can help you identify when and if you need to pull data from CommonHealth, or if data has been deleted in CommonHealth and should be removed from your local datastore, if persisted.
341
343
344
+
### Reading Verifiable Credentials (SMART® Health Cards) -- new in v1.3.15 and currently in beta
345
+
346
+
_Note: This feature is currently in beta and should not yet be used in production applications. We'd love your feedback as you start using it; please open a Github issue, or email developers [at] commonhealth.org with any thoughts that you have. Thank you!_
347
+
348
+
Client applications can now request to read Verifiable Credentials (SMART® Health Cards) from CommonHealth. This is a completely separate, independent flow from requesting other types of health data.
349
+
350
+
Client applications simply request access based on a set of Verifiable Credential types, and if the user consents to sharing any SMART® Health Cards that match the requested types, then the data will be returned immediately to the calling application. There is no persistent connection established, and the client application will have to request again (and the user consent again) to access the same data.
351
+
352
+
Invoking the `readVerifiableCredentials` will redirect to CommonHealth, initiating a consent flow where the user can select which SHCs (or none) to share.
353
+
354
+
Here's a snippet demonstrating how the new `readVerifiableCredentials` method can be called to retrieve COVID-19 Vaccination SMART® Health Cards:
355
+
356
+
```
357
+
// Determine which VC types you'd like to read
358
+
// In this case, we're requesting COVID-19 Vaccination records.
359
+
val c19VaxVcTypes = setOf(
360
+
"https://smarthealth.cards#immunization",
361
+
"https://smarthealth.cards#covid19",
362
+
"https://smarthealth.cards#health-card"
363
+
)
364
+
365
+
// Pass the VC Types into the readVerifiableCredentials suspending method
366
+
val smartHealthCards = commonHealthStore.readVerifiableCredentials(
367
+
context,
368
+
c19VaxVcTypes
369
+
)
370
+
```
371
+
372
+
CommonHealth performs SMART® Health Card validation prior to ingesting the cards into the app, including signature validation and checks against the payload contents. However, it is recommended to perform your own validation depending on your use case. The raw JWT can be accessed through the `json` property on each `VerifiableRecordSampleDataQueryResult` object.
373
+
342
374
## Registering with CommonHealth
343
375
344
376
Registering with CommonHealth is not required to begin testing integrations with CommonHealth Developer Edition. However, if you have a client application that you would like to use in staging or production environments, you'll need to register the application with CommonHealth. This is similar to registering an OAuth client, where you would specify information such as required scope, authorization redirect URI, etc. Please reach out to developers [at] commonhealth.org for more information.
345
377
378
+
## Upgrading from v1.1.2 to v1.3.15
379
+
`v1.3.15` introduced a small number of changes:
380
+
381
+
- Support for requesting access to Verifiable Credentials (SMART® Health Cards) is now in beta
382
+
- Updates to support higher Android OS levels (specifically changes to accommodate new restrictions on apps calling into packageManager)
383
+
346
384
## Upgrading from v0.4.8 to v1.1.2
347
385
`v1.1.2` introduced a small number of changes:
348
386
@@ -352,7 +390,6 @@ Registering with CommonHealth is not required to begin testing integrations with
352
390
-`org.thecommonsproject.commonhealth:commonhealthclient` is now `org.thecommonsproject:commonhealth-client`
353
391
- The artifacts are now hosted in Maven Central.
354
392
355
-
356
393
## Upgrading from v0.4.4 to v0.4.8
357
394
`v0.4.8` introduced a number of large changes and enhancements to the API:
Copy file name to clipboardExpand all lines: app/src/main/java/org/thecommonsproject/android/commonhealth/sampleapp/fragments/DataTypeDialogueFragment.kt
0 commit comments