Determine Android Device Performance

Unlike iOS, Android devices is relatively fragmented, and varies in term of it’s performance. Hence when developing our App, at times we would like to based on the Device’s performance to device if we would should perform a more intensive processing (e.g. better image resolution, deeper algorithm processing etc). Below are 3 variable checking recommended.

Device Processor count.

Java provided a very handy API to provide the device’s processor count.

Runtime.getRuntime().availableProcessors()

As of today, most devices should have 4 processors to be consider the norm. Anything lower than that would be consider a slower processing device.

Device Memory

Android provides a System Service API, isLowRamDevice() for you to check if a device is consider low memory devices or not

(context.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager).isLowRamDevice()

As per the document, this generally checks and return true for devices with lower than 1GB memory. However be cautious is you support device older than KITKTA (version 19), this API will always return false for those devices, as per this Stackoverflow.

If you think 1GB is not a good measure of memory…

--

--