Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle location services disabled when requesting ENs #725

Merged
merged 50 commits into from
Dec 15, 2020

Conversation

devinjameson
Copy link
Contributor

@devinjameson devinjameson commented Dec 2, 2020

Why: some Android devices require location services to be enabled for exposure notifications to work. If someone is on such a device and tries to enable exposure notifications with location services disabled, would like to show an alert that tells them to enable location services.

This commit:

  • Adds LocationOffAndRequired to the list of possible states for the ENPermissionStatus
  • If ENPermissionStatus is LocationOffAndRequired, show an alert to the user telling them to enable location services

Screen Shot 2020-12-02 at 2 22 53 PM

src/locales/en.json Show resolved Hide resolved
src/useRequestExposureNotifications.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@johnschoeman johnschoeman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me.

Copy link
Contributor

@mattThousand mattThousand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, let’s hold off on un-drafting until the android side is pushed

@stale
Copy link

stale bot commented Dec 14, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added wontfix This will not be worked on and removed wontfix This will not be worked on labels Dec 14, 2020
devinjameson and others added 21 commits December 14, 2020 18:27
* Adjust iOS scoring threshold. (#727)

#### Why:
We'd like the scoring threshold check to reflect the original intention and be consistent across platforms.

#### This commit:
This commit brings the scoring threshold check for devices running `iOS 13.7+` in line with the Android implementation; the android implementation appropriately converts the the `weightedDurationSum` to minutes before making the comparison (https://github.com/Path-Check/gaen-mobile/blob/79e4d0091417fb71533edd3195d049b243be1fcd/android/app/src/main/java/org/pathcheck/covidsafepaths/exposurenotifications/ExposureNotificationClientWrapper.java#L229), and this commit performs the identical check in reverse, converting the `triggerThresholdWeightedDuration` value to seconds to perform the check

* Upgrade WorkManager to fix a crash (#726)

* Return bluetooth and location status when EN status is requested

Co-authored-by: Matt Buckley <matt.buckley@rocketinsights.com>
…fications (iOS) #732


Why:
When requesting to enable exposure notifications from the JS layer, we'd like to treat responses other than an Active status as errors.

This commit:
This commit updates the iOS exposure enablement call to vend a success to the JS layer only if the exposureNotificationStatus is Active after the request, and vends and error otherwise
devinjameson and others added 24 commits December 15, 2020 13:14
* Adjust iOS scoring threshold. (#727)

#### Why:
We'd like the scoring threshold check to reflect the original intention and be consistent across platforms.

#### This commit:
This commit brings the scoring threshold check for devices running `iOS 13.7+` in line with the Android implementation; the android implementation appropriately converts the the `weightedDurationSum` to minutes before making the comparison (https://github.com/Path-Check/gaen-mobile/blob/79e4d0091417fb71533edd3195d049b243be1fcd/android/app/src/main/java/org/pathcheck/covidsafepaths/exposurenotifications/ExposureNotificationClientWrapper.java#L229), and this commit performs the identical check in reverse, converting the `triggerThresholdWeightedDuration` value to seconds to perform the check

* Upgrade WorkManager to fix a crash (#726)

* Return bluetooth and location status when EN status is requested

Co-authored-by: Matt Buckley <matt.buckley@rocketinsights.com>
…fications (iOS) #732


Why:
When requesting to enable exposure notifications from the JS layer, we'd like to treat responses other than an Active status as errors.

This commit:
This commit updates the iOS exposure enablement call to vend a success to the JS layer only if the exposureNotificationStatus is Active after the request, and vends and error otherwise
@devinjameson devinjameson merged commit 261f713 into develop Dec 15, 2020
@devinjameson devinjameson deleted the dj-fix-location branch December 15, 2020 21:44
tokumori pushed a commit to AlohaSafe/gaen-mobile that referenced this pull request Dec 31, 2020
Why: some Android devices require location services to be enabled for exposure notifications to work. If someone is on such a device and tries to enable exposure notifications with location services disabled, would like to show an alert that tells them to enable location services.

This commit:
Adds LocationOffAndRequired to the list of possible states for the ENPermissionStatus
If ENPermissionStatus is LocationOffAndRequired, show an alert to the user telling them to enable location services
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.

None yet

4 participants