Once you join a study, Avicenna runs quietly in the background, recording the data your study needs, prompting you for surveys, and uploading everything securely. Your phone, though, is built to close apps it thinks you have stopped using, and when that happens, data collection is interrupted. This guide shows you how to prevent it: a one-time setup, a few daily habits, how to check the app is still working, and what to do if you find a gap.
What Interrupts Collection
Almost every gap comes from one of four things:
| Cause | What it looks like |
|---|---|
| Your phone shut the app down | The most common cause by far. Battery-saving features close apps that look idle |
| A permission is missing or expired | Collection stops for that data source, and the app shows a banner asking for it |
| The app cannot upload | Data is recorded but sits on your phone — offline, no Wi-Fi when set to Wi-Fi-only, or no free storage |
| The app was closed, removed, or left behind | Swiping it closed, uninstalling, or moving to a new phone |
The setup below addresses the first. The habits and checks address the rest.
One-Time Setup
On Android
Android puts apps to sleep to save power, and this is the single most common reason a study stops collecting.
- Open Settings → Apps.
- Find Avicenna and tap Battery (or Battery usage).
- Select Unrestricted or No restrictions.
[!warning] Two different settings share one name
This is your phone’s battery optimization, in Android’s own settings. It is not the same as the GPS Battery Optimization switch inside the Avicenna app, which does something different and is described in Location. Turning the phone setting off helps your study. Leave the in-app switch as your researcher advises.
Most manufacturers add their own restrictions on top, which have to be turned off separately:
| Phone brand | Also do this |
|---|---|
| Samsung | Battery and device care → Battery → Background usage limits: turn off Put unused apps to sleep, remove Avicenna from Sleeping apps and Deep sleeping apps, add it to Never sleeping apps. Under three-dot menu → Automation, turn off Auto-optimize daily and Adaptive battery |
| Xiaomi | Security app → Permissions → Autostart: enable Avicenna. Battery & performance → Manage apps battery usage → Choose apps → Avicenna → No restrictions |
| Huawei | Settings → Battery → Avicenna: turn off Manage automatically, then enable Auto-launch, Secondary launch, and Run in background |
| Oppo | App management → Avicenna: enable Allow Auto Startup, Allow background activity, and Background data |
| OnePlus | Settings → Apps → Avicenna → Battery usage: enable Allow foreground activity, Allow background activity, Allow auto-launch |
| Google Pixel | Settings → Battery → Adaptive Battery: turn off. Confirm Avicenna shows as Not optimized |
| Sony | Settings → Battery: turn off Stamina Mode; set Avicenna to Excepted under Special app access → Power saving feature |
Step-by-step instructions with screenshots, by brand and Android version, are in Android Battery Optimization Workarounds and Android Background Permission Workarounds.
Two more settings worth changing while you are there:
- Turn off “Remove permissions if app isn’t used” (Settings → Apps → Avicenna → Permissions). Otherwise Android quietly strips the app’s permissions after a period of light use, and collection stops without you touching anything.
- Turn off Battery Saver / Power Saving Mode. It overrides everything above.
The Sticky Notification on Android
Android shows a permanent Avicenna notification that cannot be swiped away. It is not a bug or an advert. It is how Android marks an app as doing something important, and it is the main thing keeping the app from being closed.
You can turn it off in the app under Settings → Notifications → Sticky Notifications. But with it off Android is free to shut the app down, and gaps become much more likely. If it bothers you, most phones let you hide it from the lock screen or lower its priority instead of removing it.
On iPhone
| Setting | Where | What to do |
|---|---|---|
| Background App Refresh | Settings → General → Background App Refresh | Make sure it is on for Avicenna |
| Low Power Mode | Settings → Battery | Keep it off during the study. It suspends background activity |
| Software updates | Settings → General → Software Update | Keep the phone reasonably current |
Notifications
Survey prompts are usually time-limited, so a prompt that arrives late is often a session missed.
- Allow Avicenna through Do Not Disturb or Focus.
- iPhone: Settings → Focus → your Focus → Apps → add Avicenna.
- Android: Settings → Notifications → Do Not Disturb → Apps → allow Avicenna.
- Check the notification sound and volume. A prompt you cannot hear is a prompt you will miss.
- Turn on Survey Notifications in the app under Settings → Notifications.
Keeping It Running Day to Day
| Habit | Why it matters |
|---|---|
| Do not swipe the app closed | Force-closing tells your phone you no longer want the app running, and it is treated exactly like a crash. This is the most common self-inflicted cause of missing data |
| Open the app frequently | Gives it a chance to upload, and lets you catch any warning on the home screen |
| Open Avicenna after restarting your phone | A restart stops all background apps until they are launched again |
| Keep the app updated | Updates often contain fixes for new operating system restrictions |
| Keep some free storage | Data waiting to upload is stored on your phone first |
| Charge overnight | A low battery makes both operating systems far more aggressive about closing background apps |
| Connect to Wi-Fi regularly if you use Upload via Wi-Fi Only | With that setting on and no Wi-Fi, data is recorded but never sent |
Checking It Is Still Working
You do not have to take it on trust. A quick look once a day is enough:
| Phone | What to look for |
|---|---|
| Android | The sticky Avicenna notification should still be there. If it has vanished, the app has been shut down |
| iPhone | Open the app and check the Report page, which shows the data points Avicenna has seen |
| Both | Open the app. Sync Data in Settings confirms everything has been sent, and the home screen shows a banner if a permission is missing |
If You Change or Replace Your Phone
This is one of the most common causes of long gaps, and the easiest to avoid.
- Tell your researcher before you switch, not after. They may need to prepare something on their side.
- Open the app on the old phone and use Sync Data in Settings. Anything not yet uploaded exists only on that phone and is lost with it.
- Install the app and sign in on the new phone, then repeat the setup steps above — none of the battery settings carry across.
- Confirm with your researcher that only your new phone is active. A replaced or broken phone can stay linked to your account and make it look as though data is missing.
The same applies if you reinstall the app or reset your device. If your phone breaks before you can sync, tell your researcher.
If You Notice a Gap
| What you notice | What to do |
|---|---|
| A notification saying Avicenna has paused or stopped | Tap it, or just open the app. That is enough to resume |
| A banner in the app asking for a permission | Tap it and grant the permission. Data collection is interrupted until you do |
| The sticky notification has disappeared (Android) | The app has been shut down. Open it, then re-check the Android settings above |
| No survey prompts for a day or more | Check Do Not Disturb, confirm notifications are allowed, then open the app and look for warnings |
| Your researcher says the study changed | Settings → My Studies → Reload studies from server |
Quick Checklist
| Step | |
|---|---|
| 1 | Set Avicenna to Unrestricted in your battery settings |
| 2 | Apply your manufacturer’s extra settings (Android) |
| 3 | Turn off Low Power Mode and turn on Background App Refresh (iPhone) |
| 4 | Leave the sticky notification on (Android) |
| 5 | Allow Avicenna through Do Not Disturb or Focus |
| 6 | Close the app fully and open it once more, so everything starts cleanly |
| 7 | Every few days, check the app is still running |