Smartphone Location Data and HIV Risk in Rural South Africa

Where do young adults go, how often, and for how long? In rural KwaZulu-Natal, South Africa, highly mobile people face a greater risk of acquiring HIV, and people living with HIV who move frequently are less likely to stay on treatment. Surveys can ask people where they have been, but recall has its limits. Smartphone location data can reveal where people travel, how often they visit different places, and how long their movement patterns persist over time.

The Sesikhona study tested whether smartphone-based location tracking could work in a rural, resource-limited setting. Between June 2021 and May 2023, 207 young adults enrolled in a six-month study using a custom-branded version of the Avicenna app, then known as Ethica. Called Sesikhona, the app recorded participants’ phone locations every 30 minutes and uploaded the data hourly. Because participants did not need to answer surveys or actively record their movements, the study offered a way to observe everyday mobility with little ongoing input from participants.

But passive data collection still depends on working phones, reliable uploads, and sustained engagement. The study showed what it took to keep location data flowing over six months.

The study was conducted by the Africa Health Research Institute (AHRI) in the uMkhanyakude district of northern KwaZulu-Natal. Participants were recruited through AHRI’s long-running population-based cohort.

Passive data collection still depends on participants staying engaged with the app.

Study at a Glance

Study feature Detail
Population Young adults aged 20 to 30 in a rural area with a high HIV burden
Sampling frame Random selection of participants in AHRI’s 2019 population-based survey
Enrolled 207 participants: 163 in phase I and 44 in phase II
Provided location data 204 participants
Data collection Phase I: June 2021 to July 2022. Phase II: July 2022 to May 2023
Follow-up 26 weeks per participant
Phones Phase I: study-provided Android phones. Phase II: participants’ own Android phones
Location sampling Every 30 minutes, adjusted from every 5 minutes during phase I; uploads scheduled hourly
Data collected 27.6 million location points; median of 74,865 per participant
Engagement strategies A reverse-billed connector app for uploads without mobile data and a daily in-app lottery game
Tools Avicenna (then Ethica), branded as Sesikhona; REDCap for troubleshooting records; a reverse-billing connector from Datafree Technologies
Ethical approval Biomedical Research Ethics Committee of the University of KwaZulu-Natal (ref. BE460/15)
Funding National Institutes of Health (R01HD084233), Academy of Medical Sciences Newton Advanced Fellowship, and German Research Foundation (BA2067/14-1)

How the Study Worked

Enrollment at Home

Fieldworkers called people selected from the random sample to introduce the study and assess their eligibility and interest. Those who wanted to participate received a home visit. During the visit, a short animated video explained how GPS works, what the study would record, and how the data would be protected. The video addressed privacy and confidentiality concerns raised in earlier focus groups with young adults from the same area.

After providing written consent, participants registered in the app using an alias, an AHRI internal number, and a study-specific email address. The app did not collect names or other direct personal identifiers. The fieldworker helped with setup, including granting location permissions, enabling location services, and excluding the app from battery optimization.

Six Months of Location Data

The app used Android location services to estimate the phone’s position using GPS satellites, Wi-Fi routers, and cell towers. During each collection cycle, it recorded location readings over 60 seconds until it obtained three sufficiently precise location points. The collected data were uploaded hourly to a secure server hosted by Avicenna and then transferred to a database at AHRI.

The team initially set the collection interval to five minutes, then changed it to 30 minutes during phase I to reduce the collection burden while targeting at least 48 location points per day. Study configuration changes could be sent from the researcher platform to participants’ phones in the background, without reinstalling the app. These updates required an internet connection.

Participants received mobile data bundles at enrollment and monthly afterward. In phase II, continued monthly data bundles were conditional on participants providing location data on at least 10 days.

Watching for Gaps

The team monitored incoming data. If a participant’s location data were missing for 48 to 72 hours, a fieldworker called or visited to check the app’s permissions, battery settings, and internet connection. The checks were recorded in REDCap. Fieldworkers could also share their tablet’s internet connection so the app could resume uploading.

A weekly operations meeting reviewed recruitment, follow-up, and technical issues. The team’s notes helped inform subsequent changes to the study setup and support procedures.

What Kept the Data Arriving

On average, participants provided 28.4% of the expected location points each week: 95.3 out of 336 possible half-hour intervals. The study showed that collecting location data over six months was feasible, but technical and connectivity problems substantially limited data completeness.

Three adaptations offer practical lessons for similar studies.

Uploads without mobile data: Many phase I participants exhausted their prepaid data bundles within the first month, preventing recorded locations from being uploaded while internet access was unavailable. The team partnered with Datafree Technologies to introduce a reverse-billed connector app, allowing Sesikhona to upload data without an active mobile data balance. Installing the connector required additional fieldwork support. Phase II used the connector from the start.

Moving to participants’ own phones: The study-provided phones had been purchased in 2019 and stored for two years before the study began. Frozen screens and hardware failures led to 77 phone replacements. Sixteen participants chose to move the app to their own phones during phase I, and phase II adopted personal phones for everyone. The team specified a minimum of 1 GB of RAM and sufficient free storage for the app. Two phase II participants had incompatible phones, illustrating the importance of checking device compatibility before enrollment.

A reason to open the app: Even when permissions and connectivity were correctly configured, phone operating systems sometimes terminated the app in the background. In November 2022, the team added a daily lottery game called Wheel of Fortune to the app’s home screen. Available from 9 a.m. to 4 p.m., with additional plays on Saturdays, it offered prizes such as airtime, data bundles, and shopping vouchers.

The researchers found that the probability of receiving location data on a given day was 77.6% on days when participants played the game, compared with 27.5% on days when they did not. Playing was also associated with 15.7% more location data per day.

These findings show an association, not proof that the game alone caused the improvement. Nevertheless, they point to a useful lesson: passive data collection may benefit from giving participants a regular reason to open the app, alongside technical support that keeps background collection working.

Where Avicenna Fits

Avicenna provided the data collection platform for the study. It was used to:

  • Deliver the study through a custom-branded Android app, Sesikhona, available on Google Play
  • Collect location data in the background at researcher-defined intervals
  • Upload recorded location data to a secure server on an hourly schedule
  • Apply study configuration changes, such as the revised sampling interval, without requiring participants to reinstall the app

AHRI’s research team handled recruitment, consent, phones, mobile data bundles, the reverse-billing connector, and field troubleshooting. The study illustrates how a data collection platform can work alongside locally designed infrastructure and ongoing participant support to address connectivity and device limitations.

In Their Words

We asked Thulile Mathenjwa, the first author of the Sesikhona feasibility study, about running the study.

What advice would you give a researcher planning a similar study?

"My biggest advice would be to start small, invest in intensive troubleshooting, and understand participants’ concerns before scaling up. One of the most important lessons from our study was that technical feasibility does not necessarily translate into successful implementation.

I would recommend starting with a small group of participants to identify technical challenges, understand how the application performs on different devices, and establish effective troubleshooting procedures. Equally important is engaging potential participants early to understand their concerns, particularly around privacy, confidentiality, and location tracking, and addressing these through the study design and informed consent process.

Researchers should also budget sufficient time and resources for ongoing participant support. In our experience, troubleshooting was not a one-off activity but a continuous process that helped us identify challenges and adapt our approach."

Was anything about running the study easier or more difficult than you expected?

"What surprised me most was how challenging it was to maintain consistent location data collection, even when participants had correctly configured the application.

We encountered several unexpected challenges, including smartphones malfunctioning, applications being terminated by the operating system, and limited internet connectivity. These issues often resulted in missing data without participants necessarily being aware of the problem.

We initially underestimated the level of technical support required. However, these challenges pushed us to adapt our approach, including introducing reverse billing to address data costs and gamification to encourage engagement.

On the positive side, participants were generally receptive to using smartphones for research, including installing the application on their personal devices. This reinforced the potential of smartphone-based research in resource-constrained settings when appropriate support is provided."

Looking back, what did Avicenna make possible that would have been difficult to do otherwise?

"Avicenna enabled us to collect high-resolution, longitudinal GPS data from participants over six months, something that would have been extremely difficult to achieve using conventional methods such as travel diaries or retrospective surveys.

The platform allowed us to automate location data collection, remotely monitor data availability, and modify data collection settings as the study progressed. This flexibility was particularly valuable because we had to make several adjustments in response to challenges encountered during implementation.

It also provided an opportunity to integrate engagement strategies, such as the Wheel of Fortune, which helped improve participant engagement and the consistency of data collection.

Ultimately, Avicenna allowed us to move beyond self-reported mobility to capture more detailed patterns of movement, while generating valuable lessons about implementing digital research in rural settings."

Research Team

Thulile Mathenjwa, MA

First and corresponding author

Africa Health Research Institute

Division of Epidemiology & Biostatistics, School of Public Health, University of Cape Town

Adrian Dobra, PhD

Joint senior author

Department of Statistics, University of Washington

Frank Tanser, PhD

Principal investigator and joint senior author

Africa Health Research Institute

Centre for Epidemic Response and Innovation and South African Centre for Epidemiological Modelling and Analysis (SACEMA), Stellenbosch University

Publications

Planning a Similar Study?

Collecting data in the background is only part of running a successful study. Researchers also need to configure data collection, help participants keep the app running, and plan for interruptions caused by device settings or connectivity.

Avicenna supports background data collection and configurable sampling intervals. Explore the documentation for Location, Data Collection Configuration, and Background Data Collection to learn more. The Keep the App Running guide can help participants avoid interruptions, while Custom Apps explains how to create a study-branded app.

For questions about study design, data collection, or the right setup for your research, explore Avicenna’s features and integrations or talk to our team.