
Re: "the app detects other devices with AarogyaSetu installed"
>Only if BlueTooth is enabled, I'll wager.
You've hit the nail on the head here. We did a bit of a thought experiment in our team about how we'd do this. Building a data model that (mostly) preserves privacy is relatively easy. You don't need to record who a person is, or where they've been, just that some unique identifier has been in proximity to some other unique identifier at a given time - three fields. That also has the benefit of being perfect for population-scale storage and retrieval in any number of key-value database technologies (e.g. HBase, Cassandra), and likewise can be naturally managed for retention.
To make this work you'd need to have Bluetooth constantly broadcasting and handshaking. This would destroy your phone's battery life. So people wouldn't do it. Hypothetically you can do some of this with Bluetooth LE, but that has device ID scrambling baked into the spec, so it's potentially not even viable. Google used to have whole frameworks for managing this back when beacons were cool (e.g. Google Nearby) but that's apparently now abandonware, and many devices are now engineered explicitly to prevent you doing this - BLE's address randomisation being a good example.
tl;dr the data and privacy are easy, getting people to comply is hard, and the reality is the government can just procure non-private data direct from the telcos and Google and Apple.