Dev.to Security 🔐 Cybersecurity 👁 0 📖 10 min read

Why Does My OnePlus Phone Stop the Camera App With the Screen Off? Battery Optimization That Resets Itself, Sleep Standby and Recents Lock

You set up an old OnePlus phone as a camera. It worked on the first night. You fixed the battery settings, the camera app recorded with the screen off, and the live view loaded on your laptop. A few days later it stops

You set up an old OnePlus phone as a camera. It worked on the first night. You fixed the battery settings, the camera app recorded with the screen off, and the live view loaded on your laptop.

A few days later it stops again. You open Settings and find the battery setting you changed is back to how it was. You did not touch it.

That is not your memory playing tricks. It is a known OnePlus behaviour, and it is the reason this guide is different from the others in our series. On a OnePlus phone, fixing the settings once is not enough. You also need a way to keep them fixed.

This guide shows the settings that stop a screen-off camera on a OnePlus phone, the one that turns off the network at night, how to stop the battery setting from flipping back, and how to test the phone. It is written for a simple setup: one spare Android phone, no cloud account, no subscription, often no SIM card and only home or shop Wi-Fi.

Why does my OnePlus phone stop the camera app when the screen is off?

Because a camera with the screen off is exactly the kind of app that battery features are built to stop: it runs for hours while nobody looks at the phone.

The volunteer site Don't Kill My App tracks how phone brands treat background apps and gives each brand a problem score out of 5. At the time of writing, OnePlus scores 5, the worst score on the list, together with Xiaomi, Samsung and Huawei. Plain Android (AOSP) scores 0.

The page explains why. It says OnePlus phones are known for a near-stock look, but:

"This may be true on the UX front but the exact opposite is valid for background process limits."

And about the OnePlus 5 and 6 generation:

"OnePlus introduced one of the most severe background limits on the market to date, dwarfing even those performed by Xiaomi or Huawei."

Under its section for app developers, the page says: "No known solution on the developer end."

That line matters. An app can ask Android to keep running with the screen off. That is what a foreground service is, and it is why a screen-off camera app shows a notification while it records. But the OnePlus switches below are not something an app can change for you. Only the person holding the phone can.

Why do my OnePlus battery settings keep changing back?

This is the OnePlus problem that other brands do not have in the same way.

Don't Kill My App gives two reasons the fix does not stay fixed:

  1. Updates reset it. The page says the extra settings "even got reset with firmware updates", so "apps break again and users are required to re-enable those settings on a regular basis".
  2. The phone flips it by itself. About the Battery optimization setting, the page warns: "Recently, OnePlus phones started reverting this setting randomly for random apps. So if you set it to be not optimized, the next day it may be back to optimized." It links a bug report on the OnePlus forum with the same complaint.

The page's answer is to do two things together: set the app to not optimized, and lock it in the Recent apps screen. It says locking "may prevent the app from being killed in the background and the Battery optimisation setting from being reverted", but also: "This is however, not 100%. You may have to check system settings every once in a while."

So the plan for a OnePlus camera phone is: fix the settings, lock the app, and then check again on a schedule. The weekly check is at the end of this guide.

The six settings that stop a screen-off camera on OnePlus

Menu names change between OnePlus models and software versions. If a step does not match your phone, use the search box at the top of Settings and type the bold words. You may not have every one of these. Do the ones you find, in this order.

1. Lock the camera app in Recent apps

Do this first, because it is what helps the next setting stay put.

  • Open the camera app.
  • Open Recent apps: swipe up from the bottom and hold.
  • Long-press the camera app's window and tap Lock.
  • Check that the window now shows a closed padlock icon.

Leave it locked. Do not use "clear all" on this phone. A locked app is skipped when you clear the list.

2. Battery optimization: Don't optimize

Don't Kill My App gives two paths. Use whichever your phone has:

  • Settings → Apps → (gear icon) → Special access → Battery optimization, or
  • Settings → Battery → Battery optimization, then switch the list to All apps (menu at the top right).

Find your camera app and choose Don't optimize (it may say Not optimized afterwards).

Then write down today's date. You will check this exact screen again in the weekly check, because this is the setting the page says can flip back.

3. Deep optimization or Adaptive Battery: off

On the OnePlus 6 and later, the page points to:

  • Settings → Battery → Battery optimization → (three dots) → Advanced optimization

There are two options there, and the page says both are on by default. The first is Deep optimization (on some versions it is called Adaptive Battery). The page is blunt about it:

"This is the main app killer. If you need any apps to run in the background, disable it."

Turn it off. On a phone that lives on a charger and does only one job, there is little to lose.

4. Sleep standby optimization: off (this one cuts the network)

The second option on the same screen is Sleep standby optimization. This is the one that matters most if you watch the camera remotely. The page describes it like this:

"OnePlus tries to learn when you are usually asleep, and in those times it will then disable the phone's network connections."

Think about what that means for a camera phone. The hours the phone "learns" as your sleep are usually the hours you most want the camera working. If the phone turns its network off in that window, then a live view over Wi-Fi and a YouTube Live stream both need the network, so both can drop, even if nothing else looks wrong when you check the phone in the morning.

Turn it off.

If your camera only fails at night, and works when you test it in the afternoon, check this setting first.

5. Enhanced optimization (older OnePlus phones)

On phones older than the OnePlus 6, the same menu has one option instead of two:

  • Settings → Battery → Battery optimization → (three dots) → Enhanced optimization → off.

The page also notes that some users said the OnePlus 3 and earlier needed Doze turned off in Developer options. That is a whole-phone change. Only try it on an old phone that does nothing but camera duty, and only if the test below still fails.

6. App Auto-Launch: allow the camera app

The page says App Auto-Launch, on some OnePlus phones, "essentially prevents apps from working in the background". Search Settings for Auto-Launch (or Auto launch) and allow your camera app. If search finds nothing, your phone does not have this screen. Move on.

Also check: what swiping an app away does

On most Android phones, swiping an app away in Recent apps does not stop a running foreground service. The page says OnePlus may be different: its "recent app clear behaviour" can be set so that "swiping the app to close will kill it". With the app locked (step 1) this matters less. But do not swipe the camera app away, and tell anyone else who uses the phone not to.

And check Settings → Battery → Battery Saver is off, and not set to turn on by itself. A camera phone on a charger does not need it. If the battery still drops while plugged in, the charger or cable is the problem, not the settings. We explained that in Why Does My Phone Security Camera's Battery Drop Even Though It Is Plugged In?.

Does this work without internet?

Yes. None of the settings above need internet, a SIM card, or an account. They are local switches on the phone.

That matters for a common setup in shops and homes: the camera phone has no SIM and only joins the local Wi-Fi. Recording to the phone's own storage does not need internet. A live view inside the same Wi-Fi network does not need internet either, but it does need the phone's Wi-Fi to stay connected, which is why step 4 matters even on a network with no internet at all. Streaming to YouTube Live needs a working internet connection.

Why an old OnePlus can still stop

Even with every setting right, two different things can stop a camera:

  1. Battery rules (this guide). These are settings. You can change them, and on OnePlus you have to keep checking them.
  2. Android's low-memory killer. When memory is full, Android itself closes apps, starting with the least important. A foreground service ranks high, but it is not untouchable.

The settings here fix the first one. For the second: use the phone for the camera only, remove apps you do not need, and do not run games or social apps next to the camera. We explained how Android picks what to stop in A Foreground Service Is Not Immortal: What Android's Low Memory Killer Does to a 24/7 Camera on a 2 GB Phone.

The test: 10 minutes, then overnight

Changing settings is not proof. Test the real phone with the real app.

  1. Make the changes above. Restart the phone once, then check the padlock is still on the camera app in Recent apps.
  2. Open the camera app, start recording, and turn the screen off.
  3. Note the time. Put the phone on the charger. Do not touch it.
  4. Wait at least 10 minutes. If your app has a live view over Wi-Fi, open it from a second phone or laptop. Is the picture still moving?
  5. Then do it again overnight, and check the live view once late at night if you can. Sleep standby is built around your sleeping hours, so an afternoon test can pass while the night fails.
  6. In the morning, unlock the camera phone and look at the recordings. Do the files continue past the time you noted, with no long gap?

How to read a failure:

  • A gap within minutes of the screen going off usually means step 2 or step 3 was missed.
  • Recordings are fine, but the live view was dead at night: look at step 4 (Sleep standby).
  • Everything worked last week and fails now: the setting flipped back. Do the weekly check.

The weekly OnePlus check (two minutes)

This is the part other brands do not need as often. Once a week, and after every system update:

  • [ ] Recent apps: camera app still shows the padlock
  • [ ] Battery optimization: camera app still Don't optimize / Not optimized
  • [ ] Advanced optimization: Deep optimization (or Adaptive Battery) still off
  • [ ] Advanced optimization: Sleep standby optimization still off
  • [ ] Battery Saver still off
  • [ ] Open the live view once from another device

If one of them has changed, set it again and run the 10-minute test. If the battery optimization setting keeps flipping even with the app locked, that is the behaviour the OnePlus bug report describes. Keep the weekly check going. It is the only fix the page offers.

If you have a different brand

New to this? Start with Turn an old Android phone into a screen-off security camera (no cloud, LAN-only), then come back to this checklist before you leave the phone alone.

Sources

  • Don't Kill My App — OnePlus (page dated 9 June 2026; score, quotes, App locking, Battery optimization paths and the reverting warning, App Auto-Launch, Advanced optimization with Deep optimization / Adaptive Battery and Sleep standby optimization, Enhanced optimization, recent app clearing behaviour, Doze note for 1+3 and earlier). Scores read from the site's vendor list on 18 November 2026.

Don't Kill My App is a volunteer project, not official OnePlus documentation. Menus differ by model and software version. That is exactly why the test, and the weekly check, matter more than the menu.

Background Camera RemoteStream turns an Android phone into a screen-off camera: it records with the screen off and keeps recordings on the phone, with no cloud account needed. Its Pro tier adds a live browser view over your own Wi-Fi and YouTube Live streaming; check the Play listing for what is free and what is Pro.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.