Device classification
Quickplay player determines the capability class of the Android device based on hardware specifications and codec support, and classifies the device into 3 categories: HIGH_END, MID_RANGE, and LOW_END.
Get device classification
To get device classification, you can use the DevicePerformanceClassifier class.
DevicePerformanceClassifier.getDeviceCapabilities()
It provides the DeviceCapability classification as follows:
| Classification | Detail |
|---|---|
| HIGH_END | Flagship models. |
| MID_RANGE | Good performance mid-range models. |
| LOW_END | Entry-level models with modest processors and others. |
It also provides other supportive APIs to get device specifications.
// Device RAM as Long in MB
DevicePerformanceClassifier.getTotalRAM()
// The number of CPU cores
DevicePerformanceClassifier.getCPUCores()
/**
* The approximate per-application memory class of the current
* device. This gives you an idea of how hard a memory limit you should
* impose on your application to let the overall system work best. The
* returned value is in megabytes; the baseline Android memory class is
* 16 (which happens to be the Java heap limit of those devices); some
* devices with more memory may return 24 or even higher numbers.
*/
DevicePerformanceClassifier.getMemoryClass()
// Returns information for secure AVC decoder.
DevicePerformanceClassifier.getAvcDecoderInfo()
// Returns information for secure HEVC decoder.
DevicePerformanceClassifier.getHevcDecoderInfo()
// Retrieves the maximum supported instances and resolution for secure H.264 and H.265 video decoders.
DevicePerformanceClassifier.getMaxSupportedSecureDecoderInstances()
Capability metrics
| Capability | LOW | MEDIUM | HIGH |
|---|---|---|---|
| CPU CORES | <= 2 | < 8 | > 8 |
| DECODERS | 1 | 2 | > 2 |
| MEMORY CLASS | <= 100 | <= 160 | > 160 |
| RAM | < 2GB | > 2GB | > 2GB |
| CPU FREQUENCY | <= 1250 | <= 2055 | > 2055 |