Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

[XPlat/ExposureNotification] RiskLevel/TransmissionRiskScore mappings are different between both OSs #1040

Open
@tmurakami

Description

@tmurakami

Hi,

In Android, RiskLevel/TransmissionRiskScore mappings are:

transmissionRiskScores[0] when RISK_LEVEL_LOWEST (1)
transmissionRiskScores[1] when RISK_LEVEL_LOW (2)
transmissionRiskScores[2] when RISK_LEVEL_LOW_MEDIUM (3)
transmissionRiskScores[3] when RISK_LEVEL_MEDIUM (4)
transmissionRiskScores[4] when RISK_LEVEL_MEDIUM_HIGH (5)
transmissionRiskScores[5] when RISK_LEVEL_HIGH (6)
transmissionRiskScores[6] when RISK_LEVEL_VERY_HIGH (7)
transmissionRiskScores[7] when RISK_LEVEL_HIGHEST (8)

https://developers.google.com/android/reference/com/google/android/gms/nearby/exposurenotification/ExposureConfiguration#getTransmissionRiskScores()
https://github.com/google/exposure-notifications-internals/blob/7dadb83aa5c4b02ed4ae98cd8cf13f89b96962d2/exposurenotification/src/main/java/com/google/samples/exposurenotification/matching/RiskScoreCalculator.java#L69-L72
https://github.com/google/exposure-notifications-internals/blob/7dadb83aa5c4b02ed4ae98cd8cf13f89b96962d2/exposurenotification/src/main/java/com/google/samples/exposurenotification/matching/RiskScoreCalculator.java#L88-L91

On the other hand in iOS, they are:

transmissionRiskScores[0] for risk level 0
transmissionRiskScores[1] for risk level 1
transmissionRiskScores[2] for risk level 2
transmissionRiskScores[3] for risk level 3
transmissionRiskScores[4] for risk level 4
transmissionRiskScores[5] for risk level 5
transmissionRiskScores[6] for risk level 6
transmissionRiskScores[7] for risk level 7

https://developer.apple.com/documentation/exposurenotification/enexposureconfiguration/3586323-transmissionrisklevelvalues

For example, if TransmissionRiskScores is [1,2,3,4,5,6,7,8] and an exposure's risk level is 1, the resulting TransmissionRiskScore is 1 on Android and 2 on iOS, right?

How can we get the same value on both OSs?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions