eSIM と SIM カードを検出する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
SIM カードと eSIM を備えた Android 搭載デバイスでは、テレフォニー API(TelephonyManager
や SubscriptionManager
など)で次の ID を使用します。
- サブスクリプション ID: モバイル サブスクリプションの一意の ID です。
- 論理スロット インデックスまたは ID: 論理 SIM スロットを参照する一意のインデックス。
論理スロット ID は 0 から始まり、デバイスでサポートされるアクティブ スロットの数に応じて増えます。たとえば、デュアル SIM デバイスには通常、スロット 0 とスロット 1 があります。デバイスに複数の物理スロットがあり、1 つのアクティブ スロットしかサポートしていない場合、論理スロット ID は 0 のみになります。
- 物理スロット インデックスまたは ID: 物理 SIM スロットを指す一意のインデックス。
物理スロット ID は 0 から始まり、デバイスの物理スロット数に応じて増えます。これは、デバイスにある論理スロットの数とは異なります。つまり、デバイスが使用できるアクティブなスロットの数に相当します。たとえば、デュアル SIM モードとシングル SIM モードを切り替えるデバイスは、物理スロットが常に 2 つある場合でも、シングル SIM モードでは論理スロットが 1 つだけになります。
- カード ID: UiccCard を識別するために使用される一意の ID。

上の図について説明します。
- デバイスには論理スロットが 2 つあります。
- 物理スロット 0 には、アクティブなプロファイルを持つ物理 UICC カードがあります。
- 物理スロット 2 には、アクティブなプロファイルを持つ eUICC があります。
- 物理スロット 1 は現在使用されていません。

上の図について説明します。
- デバイスには論理スロットが 3 つあります。
- 物理スロット 0 には、アクティブなプロファイルを持つ物理 UICC カードがあります。
- 物理スロット 1 には eUICC があり、ダウンロードされた 2 つのプロファイルがあり、どちらも MEP(複数の有効なプロファイル)を使用してアクティブになっています。
Open Mobile API(OMAPI)リーダーのサポート
Android 11 以降では、Open Mobile API(OMAPI)は以下のフラグを持つデバイス上の eSE、SD、UICC サポート ハードウェアのチェックをサポートしています。
これらの値を getSystemAvailableFeatures()
または hasSystemFeature()
とともに使用して、デバイスがサポートされているかどうかを確認します。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は 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,["# Detect eSIMs and SIM cards\n\nAndroid-powered devices with SIM cards and eSIMs use the following IDs in the telephony\nAPIs, including\n[`TelephonyManager`](/reference/android/telephony/TelephonyManager) and\n[`SubscriptionManager`](/reference/android/telephony/SubscriptionManager):\n\n- Subscription ID: unique ID for a mobile subscription.\n- Logical slot index or ID: unique index referring to a logical SIM slot. Logical slot IDs start at 0 and go up depending on the number of supported active slots on a device. For example, a dual-SIM device typically has slot 0 and slot 1. If a device has multiple physical slots but only supports one active slot, it will have only the logical slot ID 0.\n- Physical slot index or ID: unique index referring to a physical SIM slot. Physical slot IDs start at 0 and go up depending on the number of physical slots on the device. This differs from the number of logical slots a device has, which corresponds to the number of active slots a device is capable of using. For example, a device which switches between dual-SIM and single-SIM mode may always have two physical slots, but in single-SIM mode it will have only one logical slot.\n- Card ID: unique ID used to identify a UiccCard.\n\nIn the preceding diagram:\n\n- The device has two logical slots.\n- In physical slot 0 there is a physical UICC card with an active profile.\n- In physical slot 2 is an eUICC with an active profile.\n- Physical slot 1 is not currently in use.\n\nIn the preceding diagram:\n\n- The device has three logical slots.\n- In physical slot 0 there is a physical UICC card with an active profile.\n- In physical slot 1 is an eUICC that has two downloaded profiles, both active using MEP (Multiple Enabled Profiles).\n\nOpen Mobile API (OMAPI) reader support\n--------------------------------------\n\nOn Android 11 and higher, Open Mobile API (OMAPI) supports checking for eSE, SD,\nand UICC support hardware on devices with the following flags:\n\n- [`FEATURE_SE_OMAPI_ESE`](/reference/android/content/pm/PackageManager#FEATURE_SE_OMAPI_ESE)\n- [`FEATURE_SE_OMAPI_SD`](/reference/android/content/pm/PackageManager#FEATURE_SE_OMAPI_SD)\n- [`FEATURE_SE_OMAPI_UICC`](/reference/android/content/pm/PackageManager#FEATURE_SE_OMAPI_UICC)\n\nUse these values with\n[`getSystemAvailableFeatures()`](/reference/android/content/pm/PackageManager#getSystemAvailableFeatures())\nor\n[`hasSystemFeature()`](/reference/android/content/pm/PackageManager#hasSystemFeature(java.lang.String))\nto check for device support."]]