Android 5.1 API
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
API 수준: 22
Android 5.1(LOLLIPOP_MR1)은 사용자와 앱 개발자를 위한 새로운 기능을 제공하는 Lollipop 출시의 업데이트입니다.
이 문서에서는 가장 주목할 새로운 API를 소개합니다.
새로운 플랫폼 기능을 개략적으로 살펴보려면 Android Lollipop 주요 내용을 참고하세요.
대상 API 레벨 업데이트
Android 5.1용 앱 빌드를 시작하려면 SDK Manager를 사용하여 Android 5.1 SDK 플랫폼 및 시스템 이미지를 다운로드합니다. 그런 다음 "22"
의 targetSdkVersion
를 사용하도록 앱 개발 프로젝트를 설정합니다. Android 5.1 시스템 이미지에 앱을 설치하고 테스트한 후 이 변경사항이 포함된 업데이트된 앱을 게시합니다.
minSdkVersion
에서 지원되지 않는 API를 실행하기 전에 시스템 API 수준을 확인하는 조건을 코드에 추가하여 Android 5.1 API를 사용하면서 이전 버전을 지원할 수 있습니다. 하위 호환성 유지에 관한 자세한 내용은 다양한 플랫폼 버전 지원을 참고하세요.
API 수준의 작동 방식에 관한 자세한 내용은 API 수준이란 무엇인가요?를 참고하세요.
여러 SIM 카드 지원
Android 5.1은 한 번에 두 개 이상의 모바일 이동통신사 SIM 카드 사용에 대한 지원을 추가합니다. 이 기능을 사용하면 사용자가 SIM 카드 슬롯이 2개 이상인 기기에서 추가 SIM을 활성화하고 사용할 수 있습니다.
SubscriptionManager
클래스를 통해 기기가 현재 네트워크에서 로밍 중인지 여부 등 현재 활성 상태인 SIM에 관한 정보에 액세스할 수 있습니다. 이 정보는 데이터 액세스 요금에 민감한 기기 사용자를 위해 앱의 데이터 액세스를 제한하거나 사용 중지하려는 개발자에게 유용합니다. 앱은 READ_PHONE_STATE
권한을 요청하고 SubscriptionManager
객체에 SubscriptionManager.OnSubscriptionsChangedListener
를 설정하여 기기의 현재 네트워크 연결 변경사항에 관해 알림을 받을 수 있습니다.
지원 중단된 HTTP 클래스
org.apache.http
클래스와 android.net.http.AndroidHttpClient
클래스는 Android 5.1에서 지원 중단되었습니다. 이러한 클래스는 더 이상 유지되지 않으며 이러한 API를 사용하는 앱 코드는 최대한 빨리 URLConnection
클래스로 이전해야 합니다.
Carrier Services
Android 5.1은 통신 서비스 제공업체가 Android 기기에서 이동통신사 프로비저닝 작업을 실행할 수 있는 앱을 만들 수 있도록 지원합니다. 이러한 API는 이동통신사 개발 앱이 이러한 작업을 실행하고 Google Play를 통해 배포할 수 있는 안전하고 유연한 방법을 제공합니다. 이러한 함수를 사용하는 앱은 기기의 범용 집적회로 카드 (UICC)의 인증서와 일치하는 인증서로 서명되어야 합니다.
이동통신사 서비스 API가 TelephonyManager
클래스, SmsManager
클래스, 새 CarrierMessagingService
클래스에 추가되었습니다. 앱은 hasCarrierPrivileges()
메서드를 호출하여 이러한 API에 대한 액세스 권한을 확인할 수 있습니다. 액세스 권한 없이 이러한 API를 호출하는 앱은 SecurityException
를 수신합니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# Android 5.1 APIs\n\nAPI Level: 22\n\n\nAndroid 5.1\n([LOLLIPOP_MR1](/reference/android/os/Build.VERSION_CODES#LOLLIPOP_MR1))\nis an update to the Lollipop release that offers new features for users and app developers.\nThis document provides an introduction to the most notable new APIs.\n\n\nFor a high-level look at the new platform features, see the [Android Lollipop highlights](/about/versions/lollipop).\n\n### Update your target API level\n\n\nTo start building apps for Android 5.1, use the\n[SDK Manager](/tools/help/sdk-manager) to download the Android 5.1 SDK\nPlatform and System Images. Then set your app development project to use a\n[`targetSdkVersion`](/guide/topics/manifest/uses-sdk-element#target)\nof `\"22\"`. Install your app on an Android 5.1\nsystem image, test it, then publish the updated app with this change.\n\n\nYou can use Android 5.1 APIs while also supporting older versions by adding\nconditions to your code that check for the system API level before executing APIs not supported\nby your [`minSdkVersion`](/guide/topics/manifest/uses-sdk-element#min). To learn more about maintaining backward compatibility, read [Supporting Different Platform\nVersions](/training/basics/supporting-devices/platforms).\n\n\nFor more information about how API levels work, read [What is API Level?](/guide/topics/manifest/uses-sdk-element#ApiLevels)\n\nMultiple SIM Card Support\n-------------------------\n\n\nAndroid 5.1 adds support for using more than one cellular carrier SIM card at a time. This\nfeature lets users activate and use additional SIMs on devices that have two or more SIM card\nslots.\n\n\nYou can access information about the currently active SIM through the [SubscriptionManager](/reference/android/telephony/SubscriptionManager) class, including whether or not the device is considered\nto be roaming on the current network. This information is useful for developers who want to\nthrottle their apps' data access down or off for device users who are sensitive to data access\ncharges. Your app can be alerted to changes in a device's current network connection by\nrequesting the [READ_PHONE_STATE](/reference/android/Manifest.permission#READ_PHONE_STATE) permission and setting [SubscriptionManager.OnSubscriptionsChangedListener](/reference/android/telephony/SubscriptionManager.OnSubscriptionsChangedListener) on the [SubscriptionManager](/reference/android/telephony/SubscriptionManager) object.\n\nDeprecated HTTP Classes\n-----------------------\n\n\nThe `org.apache.http` classes and the `android.net.http.AndroidHttpClient` class\nhave been deprecated in Android 5.1. These classes are no longer being maintained and you should\nmigrate any app code using these APIs to the [URLConnection](/reference/java/net/URLConnection) classes as soon as\npossible.\n\nCarrier Services\n----------------\n\n\nAndroid 5.1 provides support for telecommunication service providers to create apps that can\nperform carrier provisioning tasks on an Android device. These APIs provide a secure and flexible\nway for carrier-developed apps to perform these tasks and be distributed through Google Play. Apps\nthat use these functions must be signed by a certificate that matches the certificate in the\ndevice's Universal Integrated Circuit Card (UICC).\n\n\nThe carrier service APIs have been added to the [TelephonyManager](/reference/android/telephony/TelephonyManager) class,\nthe [SmsManager](/reference/android/telephony/SmsManager) class, and the new [CarrierMessagingService](/reference/android/service/carrier/CarrierMessagingService) class. Apps can check for access to these APIs\nby calling the [hasCarrierPrivileges()](/reference/android/telephony/TelephonyManager#hasCarrierPrivileges()) method. Apps that\ncall these APIs without access receive a [SecurityException](/reference/java/lang/SecurityException)."]]