This article was translated from Japanese by Claude Code.

I don’t remember why, but I happened to find it while looking at Coil’s code.
The code I found in Coil Extensions.kt was:
internal inline val ActivityManager.isLowRamDeviceCompat: Boolean
get() = SDK_INT < 19 || isLowRamDevicehttps://github.com/coil-kt/coil/blob/master/coil-base/src/main/java/coil/util/Extensions.kt#L45-L46
A function that returns a boolean indicating whether the device has low RAM. In Coil’s case, they check whether the SDK version is less than 19 OR whether this ActivityManager function returns true.
The ActivityManager code is below:
/**
* Returns true if this is a low-RAM device. Exactly whether a device is low-RAM
* is ultimately up to the device configuration, but currently it generally means
* something with 1GB or less of RAM. This is mostly intended to be used by apps
* to determine whether they should turn off certain features that require more RAM.
*/
public boolean isLowRamDevice() {
return isLowRamDeviceStatic();
}https://developer.android.com/reference/android/app/ActivityManager#isLowRamDevice()
As the Javadoc says, you can use it when deciding whether certain memory-heavy features should be turned off. Generally, it returns true for devices with around 1GB or less of RAM.
For example, when you have features that consume a lot of memory, you could display a message like “This feature may not work correctly on this device” or hide the feature navigation. It also seems like it could be useful when creating video-related third-party libraries.