cordova-plugin-geolocation icon indicating copy to clipboard operation
cordova-plugin-geolocation copied to clipboard

Frequent Locations (Covid19)

Open awatson1978 opened this issue 5 years ago • 2 comments

Feature Request

Would it be possible to expose the Frequent Locations log? We are interested in getting the data that is available via the Frequent Locations page, like so:

https://www.bewebsmart.com/ipod-ipad-iphone/frequent-locations/

Motivation Behind Feature

Hi. My name is Abigail. I have a MS Biomedical Informatics, and am working with HL7, Synthea, and various hospitals and other groups on Covid19 response.

One of the hot topics in bioinformatics right now is contact matching, which is the CDC methodology of tracing R0. We commonly call this "Patient 0" and "Patient 1" and so forth.

The exemplar of contact matching is probably the story of Typhoid Mary, who was a short-order line cook who managed to infect a large number of people. Investigators traced the histories of patients during a typhoid outbreak, and found a common location at a popular dinner. From there, they were able to identify Mary, and put a stop to the epidemic.

Turns out, your iPhone can trace your frequent locations. This, in turn, can help identify hotspots and in testing. We would like to get access to this data for in-app matching to hotspots and quarantine zones; patient routing; notifications to get tested, and so forth.

It takes 18 months to develop subsequent rounds of vaccines and put them through Phase III Clinical Trials. The hospital administrators and epidemiologists who I am in contact with are preparing for 18 to 24 months of Covid19 response. Even if it takes a month or three to implement, that would be 15 to 21 months we could put it in use.

There are people who will be accessing these functionalities directly from the iOS SDK. But it would be a boon to have them available in Cordova also.

Feature Description

navigator.geolocation.getFrequentLocations()

For a truly awesome implementation, if the locations could be returned using the following data schema, that would be ideal. FHIR was approved as an approved interoperability protocol last week by Health and Human Services.

https://www.hl7.org/fhir/location.html

awatson1978 avatar Mar 14 '20 20:03 awatson1978

Apple does have APIs documented so it appears possible to do this, but I'm not sure if it gives you the exact data as shown in the Frequent Locations settings screen, but you may receive the most recent entry given the quote:

When you start the visits location service, a recently cached value may be reported to your delegate immediately

Android does have a similar feature but I don't think Android has any equivalent APIs to receive this information.

I did a quick google search, and found this plugin which already has this feature implemented. I cannot vouch if it actually works or not, but a quick inspection of the source code appears to match the current apple documentation. So in your use case, you might be able to get started immediately with the help of this plugin.

Unfortunately, I don't have easy access to apple hardware to work on this myself.

breautek avatar Mar 15 '20 14:03 breautek

Thank you for the lead! Will give it a try when I'm compiling the cordova pipeline next!

awatson1978 avatar Mar 15 '20 14:03 awatson1978

Closing as stale.

breautek avatar Sep 15 '23 02:09 breautek