Android 11 以降を搭載したデバイスの場合、CallScreeningService API を使用する通話スクリーニングアプリとスパムアプリは、通話をスクリーニングする機能にアクセスできるため、ユーザーのプライバシーとデバイスのパフォーマンスが向上します。この API を使用すると、アプリは個々の権限をリクエストする必要がなく、Android 10 以前の標準の権限リクエストでは取得できなかった追加情報にアクセスできます。この API で使用できるデータには次のものがあります。
着信または発信の数
着信の通知と終了
通話中と通話後のスクリーニング情報に関するシステム アラート ウィンドウへのアクセスの制限
着信を拒否する機能
通話時間
通話が切断された理由
STIR/SHAKEN 判定結果
実装
電話アプリ、通話スクリーニング アプリ、スパムアプリは、CallScreeningService API を導入する必要があります。ユーザーがデフォルトの発信者番号およびスパムアプリとしてアプリを選択すると、アプリは getCallerNumberVerificationStatus() メソッドへのアクセスを受け取ります。このメソッドにより、STIR/SHAKEN プロトコルの携帯通信会社の検証メカニズムから STIR/SHAKEN 判定結果が表示されます。これにより、ロボコールの検出が可能になります。
[[["わかりやすい","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,["# Prevent caller ID spoofing\n\nIn Android 11 (API level 30) and higher, the platform supports the [STIR/SHAKEN\nprotocols](https://en.wikipedia.org/wiki/STIR/SHAKEN) to provide a\nsecure and private method of verifying and communicating a caller's number to a\nrecipient when a call is placed. Android 11 and higher provide support for apps,\nsuch as native dialers, call screening, and spam apps, to access the carrier\nverdict data. This lets apps identify spam calls and inform users before\nanswering a call.\n\nFor devices running Android 11 and higher, call screening and spam apps that use\nthe [CallScreeningService API](/reference/android/telecom/CallScreeningService)\ncan access functionality to screen a call, enhancing user privacy and device\nperformance. Using this API, apps don't need to ask for individual permissions\nand can get access to additional information that wasn't available through\nstandard permission requests in Android 10 and lower. The data available in this\nAPI include:\n\n- Number of incoming or outgoing call\n- Notification of an incoming call and termination\n- Limited access to the system alert window for in-call and post-call screening information\n- Ability to reject incoming calls\n- Call duration\n- Call disconnect reason\n- STIR/SHAKEN verdict\n\n| **Note:** On 4G+ networks, because the SIP headers used by carrier networks contain personally identifiable information (PII), the headers aren't shared directly with apps to protect user privacy. The default caller ID and spam app can access the verdict information without accessing the SIP headers. \n|\n| In non-4G networks, the details of the CNAM are shared with dialer and call screening apps. The app can choose to display this data in full to warn users about possible spam calls.\n\nImplementation\n--------------\n\nDialer apps, call screening apps, and spam apps should adopt the\nCallScreeningService API. When a user selects the app as their default caller ID\nand spam app, the app receives access to the\n[`getCallerNumberVerificationStatus()`](/reference/android/telecom/Call.Details#getCallerNumberVerificationStatus())\nmethod, which surfaces the STIR/SHAKEN verdict from the carrier verification\nmechanism for the STIR/SHAKEN protocol. This makes robocall detection possible.\n\nAdditionally, call screening apps can implement a post-call screen by invoking\nthe\n[`ACTION_POST_CALL`](/reference/android/telecom/TelecomManager#ACTION_POST_CALL)\nintent action, which starts an activity that allows the user to mark a call as\nspam or add a number to their list of saved contacts."]]