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

Use Bluetooth for nearby device detection #42

Open
jnebrera opened this issue Apr 2, 2020 · 8 comments
Open

Use Bluetooth for nearby device detection #42

jnebrera opened this issue Apr 2, 2020 · 8 comments

Comments

@jnebrera
Copy link

jnebrera commented Apr 2, 2020

Hi there,

I really like your project.

One point though, in this article I'm showing the advantage of using Bluetooth based nearby detection in order to flag people that needs to undergo testing.

I would suggest you to use the ideas shown in the article to improve the software

Thank you

http://tiny.cc/o8l3lz

@eladnts55
Copy link
Collaborator

Thanks for your contribution!
We want to add Bluetooth too.
We will try to use the same code like https://github.com/covid19cz

Have a nice day!

@juanjo-ramos
Copy link

I might be able to help with this one. I did a tiny POC on this just to play around with the BT stack on iOS https://github.com/juanjo-ramos/CovidApp-iOS. I know this project is built with Ionic though 🙂

How are you guys tracking the future improvements? Is there a public JIRA / Trello, etc. board available? Thanks.

@antonioparraga
Copy link
Collaborator

antonioparraga commented Apr 4, 2020 via email

@juanjo-ramos
Copy link

That was fast 🙂. Great work 👏
I'll keep a look at open PRs but do you mind tagging me on it anyway? I'm not an Ionic expert but I should be able to grab the main concept.

What you describe is pretty accurate. A couple of comments:

  • My idea was that devices would include the userId currently logged in in the advertisement payload. You're probably doing that already!
  • On iOS at least you also have the RSSI (received signal strength indicator). That is important because you're only interest in the peripherals with a strong signals since the device might be seeing other BT devices that haver 20m away that shouldn't count as a contact.

Anyway, please tag me in the PR. I'll be happy to review it. And if there are any improvements to be done afterwards, happy to help there too!

@antonioparraga
Copy link
Collaborator

antonioparraga commented Apr 4, 2020 via email

antonioparraga added a commit that referenced this issue Apr 5, 2020
@martejpad
Copy link

Hello!!

First of all congrats on your project, you've done such a great job!! 💪

I was wondering, what happens when the app goes in background or suspended mode? Is the app able to do Bluetooth scans and therefore detect other devices? I would imagine Apple specially would restrict this quite a lot.

I came across @juanjo-ramos Youtube demo and in the video you can see that the counter is not updated until the app on the second phone is in the foreground.

Many thanks in advance!

@antonioparraga
Copy link
Collaborator

antonioparraga commented May 22, 2020

Hi,

So, the app has a different behaviour in foreground and in background. Whenever the apps goes to background you can check at

is a method that changes the way the app works in order to save lot of battery.

In the other hand, we also use the background fetch in order to restart the scanning (look at https://github.com/open-coronavirus/open-coronavirus/blob/master/app-citizen/src/app/shared/services/background-fetch.service.ts line 23), which forces again to perform a full scan for new devices. It takes no longer than 30 secs but is another way to detect devices. As soon as background fetch happens every 15 minutes (is not as exact as 15 minutes, but it depends on many factors but a kind of().
The think is that in our tests apps in background interchanges their keys, but it takes long than in foreground, but it happens within a 15 minutes window, which is enough according to the ECDC recommendations.

@antonioparraga
Copy link
Collaborator

btw, where is the YouTube video you are talking about?

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

No branches or pull requests

5 participants