성능 등급

성능 등급은 Android 12부터 도입된 표준입니다. 성능 등급은 Android의 기준 요구사항을 넘어서는 일련의 기기 기능을 정의합니다.

각 Android 버전에는 상응하는 자체 성능 등급이 있고 이 등급은 각 버전의 Android 호환성 정의 문서(CDD)에 정의되어 있습니다. Android 호환성 테스트 모음(CTS)은 CDD 요구사항을 확인합니다.

각 Android 지원 기기는 지원하는 성능 등급을 선언합니다. 개발자는 런타임에 기기의 성능 등급을 확인하고 기기의 기능을 최대한 활용하는 업그레이드된 환경을 제공할 수 있습니다.

기기의 성능 등급 수준을 알아보려면 Jetpack Core Performance 라이브러리를 사용하세요. 이 라이브러리는 빌드 버전 정보에 선언된 대로 또는 Google Play 서비스의 데이터를 기반으로 기기의 미디어 성능 등급을 보고합니다.

먼저 Gradle 파일에 관련 모듈의 종속 항목을 추가합니다.

Kotlin

// Implementation of Jetpack Core library.
implementation("androidx.core:core-ktx:1.12.0")
// Enable APIs to query for device-reported performance class.
implementation("androidx.core:core-performance:1.0.0-beta02")
// Enable APIs to query Google Play Services for performance class.
implementation("androidx.core:core-performance-play-services:1.0.0-beta02")

Groovy

// Implementation of Jetpack Core library.
implementation 'androidx.core:core-ktx:1.12.0'
// Enable APIs to query for device-reported performance class.
implementation 'androidx.core:core-performance:1.0.0-beta02'
// Enable APIs to query Google Play Services for performance class.
implementation 'androidx.core:core-performance-play-services:1.0.0-beta02'

Then, create an instance of a DevicePerformance implementation, such as PlayServicesDevicePerformance, in the onCreate() lifecycle event of your Application. This should only be done once in your app.

Kotlin

import androidx.core.performance.play.services.PlayServicesDevicePerformance

class MyApplication : Application() {
  lateinit var devicePerformance: DevicePerformance

  override fun onCreate() {
    // Use a class derived from the DevicePerformance interface
    devicePerformance = PlayServicesDevicePerformance(applicationContext)
  }
}

Java

import androidx.core.performance.play.services.PlayServicesDevicePerformance;

class MyApplication extends Application {
  DevicePerformance devicePerformance;

  @Override
  public void onCreate() {
    // Use a class derived from the DevicePerformance interface
    devicePerformance = new PlayServicesDevicePerformance(applicationContext);
  }
}

그런 다음 mediaPerformanceClass 속성을 가져와서 기기의 기능에 따라 앱 경험을 맞춤설정할 수 있습니다.

Kotlin

class MyActivity : Activity() {
  private lateinit var devicePerformance: DevicePerformance
  override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    // Note: Good app architecture is to use a dependency framework. See
    // https://developer.android.com/training/dependency-injection for more
    // information.
    devicePerformance = (application as MyApplication).devicePerformance
  }

  override fun onResume() {
    super.onResume()
    when {
      devicePerformance.mediaPerformanceClass >= Build.VERSION_CODES.TIRAMISU -> {
        // Performance class level 13 and later.
        // Provide the most premium experience for the highest performing devices.
      }
      devicePerformance.mediaPerformanceClass == Build.VERSION_CODES.S -> {
        // Performance class level 12.
        // Provide a high quality experience.
      }
      else -> {
        // Performance class level 11 or undefined.
        // Remove extras to keep experience functional.
      }
    }
  }
}

Java

class MyActivity extends Activity {
  private DevicePerformance devicePerformance;
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // Note: Good app architecture is to use a dependency framework. See
    // https://developer.android.com/training/dependency-injection for more
    // information.
    devicePerformance = ((MyApplication) getApplication()).devicePerformance;
  }

  @Override
  public void onResume() {
    super.onResume();
    if (devicePerformance.getMediaPerformanceClass() >= Build.VERSION_CODES.TIRAMISU) {
      // Performance class level 13 and later.
      // Provide the most premium experience for the highest performing devices.
    } else if (devicePerformance.getMediaPerformanceClass() == Build.VERSION_CODES.S) {
      // Performance class level 12.
      // Provide a high quality experience.
    } else {
      // Performance class level 11 or undefined.
      // Remove extras to keep experience functional.
    }
  }
}

성능 등급은 향후 버전과 호환됩니다. 기기는 성능 등급을 업데이트하지 않고 최신 플랫폼 버전으로 업그레이드할 수 있습니다. 예를 들어 처음에 성능 등급 12를 지원하는 기기는 Android 13으로 업그레이드하고 등급 13 요구사항을 충족하지 않으면 등급 12를 지원한다고 계속 보고할 수 있습니다. 즉, 성능 등급은 특정 Android 버전에 의존하지 않고 기기를 그룹화하는 방법을 제공합니다.

그림 1. 기기는 Android 버전을 업그레이드하고 원래 지원하는 클래스를 지원한다고 계속 보고할 수 있습니다.

성능 등급 14

성능 등급 14는 성능 등급 13에서 도입된 요구사항을 기반으로 합니다. 구체적인 성능 등급 요구사항은 Android CDD에 게시됩니다. CDD는 성능 등급 13의 항목 요구사항이 늘어나는 것 외에 다음 영역에서 요구사항을 지정합니다.

미디어

  • AV1 하드웨어 디코더에서 필름 입자 효과 지원
  • AVIF 기준 프로필
  • AV1 인코더 성능
  • HDR 동영상 코덱
  • RGBA_1010102 색상 형식
  • YUV 텍스처 샘플링
  • 동영상 인코딩 품질
  • 멀티채널 오디오 믹싱

카메라

  • 야간 모드 확장 프로그램
  • HDR 지원 기본 카메라
  • 얼굴 인식 장면 모드

일반

  • 하드웨어 오버레이
  • HDR 디스플레이

성능 등급 13

성능 등급 13은 성능 등급 12에서 도입된 요구사항을 기반으로 합니다. 구체적인 성능 등급 요구사항은 Android CDD에 게시됩니다. CDD는 성능 등급 12의 항목 요구사항이 늘어나는 것 외에 다음 영역에서 요구사항을 지정합니다.

미디어

  • AV1 하드웨어 디코더
  • 보안 하드웨어 디코더
  • 디코더 초기화 지연 시간
  • 왕복 오디오 지연 시간
  • 유선 헤드셋 및 USB 오디오 기기
  • MIDI 기기
  • 하드웨어가 지원되는 신뢰할 수 있는 실행 환경

카메라

  • 미리보기 손떨림 보정
  • 슬로우 모션 녹화
  • 울트라와이드 카메라의 최소 확대/축소 비율
  • 동시 카메라
  • 논리 다중 카메라
  • 스트림 사용 사례

성능 등급 12

성능 등급 12는 미디어 사용 사례에 중점을 둡니다. 구체적인 성능 등급 요구사항은 Android CDD에 게시됩니다. CDD는 다음 영역에서 요구사항을 지정합니다.

미디어

  • 동시 동영상 코덱 세션
  • 인코더 초기화 지연 시간
  • 디코더 프레임 드롭
  • 인코딩 품질

카메라

  • 해상도 및 프레임 속도
  • 시작 및 캡처 지연 시간
  • FULL 이상의 하드웨어 수준
  • 타임스탬프 소스는 실시간임
  • RAW 기능

일반

  • 메모리
  • 읽기 및 쓰기 성능
  • 화면 해상도
  • 화면 밀도

성능 등급 11

성능 등급 11에는 성능 등급 12 요구사항의 하위 집합이 포함되어 있어 개발자가 이전 기기지만 여전히 성능이 뛰어난 기기에서 맞춤 환경을 제공할 수 있습니다. 구체적인 성능 등급 요구사항은 Android CDD에 게시됩니다.

  • 참고: JavaScript가 사용 중지되어 있으면 링크 텍스트가 표시됩니다.
  • 앱 시작 시간