Reputation: 7441
First of all, I'm not an Android dev. I'm actually just developing a program for Raspberry Pi that detects people with their phone's Bluetooth. I've just learned that an Android device is only discoverable when the user is in staring at the Bluetooth settings...
On the other hand, "TousAntiCovid" is a contact tracing app made by the french gov that basically detects every other device with the app installed... without the need to keep the user in their phone's settings. How does this work, then?
Upvotes: 1
Views: 158
Reputation: 2663
There is the Exposure Notifications API Emil posted in the comments, which helps the official Covid Tracing apps to better use the smartphones possibilities e.g. without as many energy saving restrictions we are usually facing when developing a mobile app.
On the other hand:
The restriction you talk about (discoverable only in OS settings) only apply while using Bluetooth Classic. When using Bluetooth Low Energy (BLE) you have to set up a GATT server on your mobile device and start advertising your services. Your device is now discoverable through the advertisements. Have a look at the many BLE guides on the web, such as the one from PunchTrough, to get more informations about the technology.
Upvotes: 1