Skip to content

Behind the scenes

How AuraDisplay Finds Your Camera and Fits the Ring Around It

By the llcloud team 5 min read

Quick answer

AuraDisplay asks Android where the display cutout is, picks the one nearest the top of the screen as the front camera, and draws its ring around it. Some phone makers report a tall safe zone instead of the camera circle, so AuraDisplay reshapes that into a circle. If the ring still sits a little off, you nudge it once and it remembers. Phones with no cutout use the edge glow.

The first thing people notice about AuraDisplay is the ring around the camera. When it sits right, the punch hole looks like it was always meant to glow. When it sits a few pixels off, you notice every time. So a lot of our work goes into one question: where exactly is your camera? Here is how we answer it.

How does an app know where the camera is?

It asks Android. Since Android 9, the system can describe each display cutout, the part of the panel taken by the camera or sensors, as a rectangle in screen coordinates. Phone makers fill in those numbers for their own hardware, and apps read them through the same system calls they use to keep buttons out from under the notch.

AuraDisplay reads the cutout in two ways. It asks the display directly, which works from Android 10 onward and gives an answer at once. It also listens to the window insets the system hands its overlay, which is how it hears about changes. Both feed one piece of code, so the ring never gets two different answers about where the camera is.

Some phones report more than one cutout. AuraDisplay picks the one nearest the top of the screen, which is the front camera on every phone we have seen.

Why do some phones need a nudge?

Because the rectangle a phone reports is not always the camera. Android only promises a rectangle that covers the cutout. Some makers report exactly the camera circle. Others report a generous area around it.

The most common case we see is a tall, narrow strip that starts at the very top of the screen and ends just below the camera, a safe zone rather than the lens itself. Several Xiaomi models do this. If we centered the ring on that strip, it would float above the camera.

So AuraDisplay checks the shape. A rectangle more than twice as tall as it is wide, or twice as wide as it is tall, gets treated as a safe zone and reshaped into a circle based on its shorter side. When the strip touches the top of the screen, the camera sits at its bottom end, so the center is worked out from the bottom edge instead of the middle.

We picked that threshold with care. Pixel phones report a rectangle that is a little taller than wide, and its center is already correct. A lower threshold would have "fixed" phones that were never broken.

No rule covers every panel, which is why setup ends with a question. After the self-test notification lights the ring, AuraDisplay asks whether it lines up with your camera. If not, you tap Adjust and move it with two sliders, up to 60dp sideways and 40dp up or down, and change its size. The adjustment is saved, and it stays put after a restart.

What happens when you rotate the phone?

Rotation is where a ring that looked perfect can quietly go wrong, so we treat it carefully.

Android reports the cutout in the frame of the current rotation. Turn the phone sideways and the camera's numbers move to a different edge. Our correction for tall safe zones assumes the camera sits on the top edge, though, and your own adjustment was made with the phone upright. Applying either one to sideways numbers puts the ring in the wrong place.

So AuraDisplay first turns the reported cutout back to the upright frame. It applies the safe zone correction there, and then turns the result forward to match the screen. Your saved adjustment turns with it. Holding the phone upright skips all of this, so the everyday case runs the simplest path.

There is one more trap. When you flip a phone straight from one landscape side to the other, Android does not send apps the usual "configuration changed" signal, because the width and height are the same before and after. Only the display itself reports the new rotation. AuraDisplay listens to the display for exactly this reason, so the ring does not stay on the wrong side of the screen.

By default the ring hides while the phone is sideways, because that is usually when you are watching a video or playing a game, and a glowing ring in the middle of the picture is distracting. You can switch it on for landscape in settings. The edge glow follows the border in any rotation and is never hidden.

What if a phone reports no cutout at all?

Then AuraDisplay has nothing to find. That happens on phones without a punch hole or notch, and on many phones running Android 8, before the cutout API existed. AuraDisplay places the ring at the top center of the screen as a starting point, which you can move.

The better answer on those phones is edge mode. It runs a glow along the screen border, and it works on any Android 8.0 or newer phone, cutout or not. Our guide to edge lighting on any Android phone shows how it looks.

The edge glow has its own fitting problem: your screen's corners. A glow drawn as a sharp rectangle sits inside rounded corners and looks wrong. From Android 12, the system tells apps the radius of each corner, and AuraDisplay follows that exact curve, with a square corner where the phone reports none. On older versions there is no such report, so AuraDisplay estimates. Tall screens get a gently rounded corner and shorter screens get a square one.

What does this mean on the Always-On Display?

The ring sits in the same place on the lock screen and the Always-On Display, so the camera you glance at is always the one that glows. What changes on the Always-On Display is motion. The panel redraws about once a second in that mode, so the ring holds a steady glow there and animates again when you wake the phone. Our guide to seeing notifications on Always On Display explains that limit.

Where should you go next?

If you are setting up AuraDisplay on a specific phone, the brand guides walk through the built-in settings that matter alongside it: Pixel, Xiaomi, Redmi and POCO, OnePlus and Samsung. For the bigger picture, start with how to get a notification light on Android.

Sources

Questions

How does AuraDisplay know where my camera is?

Android tells apps where the display cutout is. Since Android 9, the system describes each cutout as a rectangle on the screen, and phone makers fill in those numbers for their own panels. AuraDisplay reads them, picks the cutout closest to the top as the front camera, and centers the ring on it. You do not have to tell it anything.

Why is the ring not centered on my camera?

The numbers come from your phone maker, and some describe a wider area than the camera itself, such as a tall safe zone from the top of the screen. AuraDisplay corrects the most common shape on its own. If yours still sits a little off, the setup screen asks whether the ring lines up, and you can move it and change its size. The adjustment is saved.

Does the ring follow the camera when I rotate the phone?

Yes. AuraDisplay keeps the camera's position in the phone's upright frame and turns it with the screen, including your own adjustment. By default the ring hides while the phone is sideways, since that is usually a video or a game. You can switch it on for landscape, and the edge glow always shows in any rotation.

What if my phone has no punch hole?

Use edge mode. It runs a glow along the screen border and works on any Android 8.0 or newer phone, with or without a cutout. On Android 12 and newer it follows the exact curve of your screen's corners, which the system reports to apps. On older versions AuraDisplay estimates the corner shape from the screen's proportions.

Keep reading