Skip to content
ExplainedCode

Android 18 Beta 1 Puts Background Apps on a Tighter Memory Budget

Android 18 Beta 1 brings background-service memory limits before you raise your target SDK. Here are the affected apps, supported Pixels and first checks.

By DC Team · · 7 min read

Official Android logo above the headline YOUR BACKGROUND APP GETS LESS ROOM. A phone diagram shows a visible app becoming a background app with a smaller memory allowance.

Android 18 Beta 1 gives developers a reason to test their existing release APK before touching targetSdkVersion: new memory limits can affect background services regardless of the SDK an app targets. Google's release notes list build DP21.261120.006 and date the release December 3, 2026. The first practical question is whether your music player, location tracker or connected-device service still works properly after its screen disappears.

These are soft, role-dependent memory limits, rolling out in stages across beta builds. Crossing one does not automatically kill the app. The system first reclaims cold file-backed pages and compresses idle private heap pages into zRAM. Google's behavior-change documentation says the limits depend on device RAM and process role. Keeping an older target SDK does not exempt an app, and android:largeHeap="true" does not raise the ceiling.

That makes background operation the first regression test worth scheduling. A successful foreground demo tells you little about this change. An app can look healthy while you navigate its screens, then encounter pressure after you press Home and leave its service running.

Android 18 changes the budget before you retarget

The distinction between a foreground service and visible UI matters here. A service can have foreground-service status while its process has no visible activity. Google's scope definition includes that combination. Among the affected roles are mediaPlayback, location, connectedDevice, dataSync, health, mediaProjection and remoteMessaging. Notification-listener services are also covered.

Visible activities, split-screen windows and Picture-in-Picture are exempt. An overlay alone does not provide the same exemption. Initial beta builds also leave roles including camera, microphone and phoneCall unconstrained. When a process has multiple active roles, the most generous applicable limit or unconstrained status wins. These distinctions come from Google's documentation; they are not measurements from our own device.

Here is a test matrix derived from those rules. Its purpose is to expose cases a normal open-the-app smoke test misses.

Test caseExpected scope under Google's current rulesWhat to record
Music plays with its activity visibleVisible UI is exemptBaseline playback and memory
Same player continues after HomeUI-free mediaPlayback is in scopeAudio continuity, active limit, return-to-app delay
Player stays in Picture-in-PictureVisible Picture-in-Picture is exemptWhether the process actually remains visible
Location service continues with no activityUI-free location is in scopeUpdate timing and missed updates
Notification listener runs without UICovered system-bound serviceDelivery timing and process residency
Camera or microphone service runs aloneUnconstrained in initial beta buildsService role and build, rather than a general pass verdict

A clean result is meaningful only if the intended restriction was active. Google says enforcement arrives in stages across RAM tiers, and thresholds can change during the beta. There is no single universal megabyte number to paste into your acceptance criteria. Save the OS build, service role, observed limit and user-visible result together.

Inspect the running release build first

Use an R8-optimized release build for this check. Google warns that debug builds inflate memory residency and active instrumentation tests are exempt from role limits. That means a passing instrumented test can answer a different question from the one you intended. Testing guidance

Start your service through its normal app flow, press Home, and run this read-only collection sequence. Replace the package name first. It records the device, installed app metadata, limiter state, process state and memory report without changing a limit.

APP_PACKAGE=com.example.app
REPORT_DIR="beta-memory-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$REPORT_DIR"

adb shell getprop ro.build.fingerprint > "$REPORT_DIR/build.txt"
adb shell getprop ro.product.model > "$REPORT_DIR/device.txt"
adb shell dumpsys package "$APP_PACKAGE" > "$REPORT_DIR/package.txt"
adb shell am memory-limiter status > "$REPORT_DIR/limiter.txt"
adb shell dumpsys activity processes "$APP_PACKAGE" \
  > "$REPORT_DIR/processes.txt"
adb shell dumpsys meminfo "$APP_PACKAGE" \
  > "$REPORT_DIR/memory.txt"

This is our collection wrapper around Google's documented inspection commands. We have not run a device performance test or measured a regression. Run it once while the activity is visible and again after backgrounding, then keep both directories with your test result. For an app with several processes, inspect each service process rather than treating the package total as the limit of every process.

In the Memory Budget section, look for the Limit row and a Limit Source of Process role. A result of none can mean default role limits have not activated on that build. Google's memory inspection guide also says the new section rolls out gradually and may not appear on every Beta 1 device. Missing output is a reason to investigate the environment, rather than evidence that your app is exempt.

For a controlled budget sweep, follow Google's candidate-budget procedure. Its manual shell override sets both a soft limit and a hard limit, so setting it below the working set can terminate the process. The behavior page explicitly requires an MB suffix and clearing the override before returning to the UI. Treat that as a separate destructive test on disposable app data, rather than adding it blindly to a smoke-test script.

Which Pixels can run Beta 1?

Google's installation page lists the following supported devices. Pixel 6a is absent from this official list. Use this page when choosing hardware, rather than assuming every phone named in an early rollout post has a supported image.

Device groupListed models
Pixel 7Pixel 7, Pixel 7 Pro, Pixel 7a
Tablet and original foldablePixel Tablet, Pixel Fold
Pixel 8Pixel 8, Pixel 8 Pro, Pixel 8a
Pixel 9Pixel 9, Pixel 9 Pro, Pixel 9 Pro XL, Pixel 9 Pro Fold, Pixel 9a
Pixel 10Pixel 10, Pixel 10 Pro, Pixel 10 Pro XL, Pixel 10 Pro Fold, Pixel 10a
Pixel 11Pixel 11, Pixel 11 Pro, Pixel 11 Pro XL, Pixel 11 Pro Fold

The same page supports testing through the Android Emulator and describes phone, tablet and resizable-device configurations. That gives teams without spare supported hardware a route into compatibility work. It does not make an emulator a substitute for checking real audio, Bluetooth or location behavior on the devices your customers use.

There is an enrollment decision for existing testers, too. The release notes say the new beta runs alongside the conclusion of the previous QPR beta. If you are on the Android 17 QPR3 beta and want its stable release without wiping data, Google says not to install Beta 1. Instead, opt out, ignore the downgrade OTA and wait for stable QPR3. Check that path before accepting an update on your only test phone.

Two other traps in the first build

Memory is our first priority, but Google's release notes identify another change that reaches existing apps: MessageQueue now uses its lock-free implementation regardless of target SDK. Apps targeting API level 36 or lower, and SDKs inspecting private fields such as mMessages, can receive null. Teams with custom main-thread watchdogs or frame monitors should audit those dependencies and move to supported facilities such as public Looper logging.

Do that audit separately from an SDK migration. Retargeting and runtime compatibility are different test jobs, and combining them in one branch makes a failure harder to attribute.

There is also a known build problem: the release notes say builds against beta SDK 38 fail with build tools 38.0.0 rc1, with an older build-tools version such as 37.0.2 offered as the workaround. Record the build-tools version before blaming your project for an SDK-build failure. You can begin by installing your existing release APK while investigating the new toolchain separately.

What to do

Test the background flow that earns your app its place on the phone. For a player, that means uninterrupted audio with the screen gone. For a tracker, it means timely location updates. For a connected-device app, it means the peripheral keeps working while the user does something else.

Keep your existing target SDK for that first run. Capture the reports above, verify the service role and active limit, then reproduce the real user journey long enough to observe pressure. Google's recommended repair order starts with replacing persistent services where an OS alternative fits, then releasing hidden UI memory. For example, it points dataSync transfers toward WorkManager or user-initiated transfer jobs.

If you retain caches from hidden screens, review cleanup in Activity.onStop or the process lifecycle's stop event. Google notes that TRIM_MEMORY_UI_HIDDEN is suppressed while an active foreground service keeps the process alive. A cleanup handler waiting only for that callback can therefore miss the moment you expected it to run.

Do not split the app into extra processes merely because the beta adds a limit. Google's guidance keeps services sharing UI state, players, maps or a database together, and considers isolation for genuinely lightweight, long-lived UI-free work. Change architecture only after a release-build test identifies active pressure, such as audio glitches, delayed updates or sluggish resume.

The useful exit criterion for this first Android 18 test is specific: your existing APK completes its important background job under a verified active budget, and it resumes without a user-visible regression. If the budget has not reached your device, record that gap and schedule the controlled test. A green foreground demo cannot close it.

Artwork attribution: The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License. Android is a trademark of Google LLC.