Stay organized with collections
Save and categorize content based on your preferences.
BlockedNumbers
open class BlockedNumbers
Constants to interact with the blocked numbers list.
Summary
Constants |
static String |
Phone number to block.
|
static String |
Auto-generated ID field which monotonically increases.
|
static String |
Phone number to block.
|
static String |
The MIME type of a blocked phone number under CONTENT_URI .
|
static String |
The MIME type of CONTENT_URI itself providing a directory of blocked phone numbers.
|
Properties |
static Uri! |
Content URI for the blocked numbers.
|
Constants
COLUMN_E164_NUMBER
static val COLUMN_E164_NUMBER: String
Phone number to block. The system generates it from COLUMN_ORIGINAL_NUMBER
by removing all formatting characters.
Optional in insert
. When not specified, the system tries to generate it assuming the current country. (Which will still be null if the number is not valid.)
TYPE: String
Value: "e164_number"
COLUMN_ID
static val COLUMN_ID: String
Auto-generated ID field which monotonically increases.
TYPE: long
Value: "_id"
COLUMN_ORIGINAL_NUMBER
static val COLUMN_ORIGINAL_NUMBER: String
Phone number to block.
Must be specified in insert
.
TYPE: String
Value: "original_number"
CONTENT_ITEM_TYPE
static val CONTENT_ITEM_TYPE: String
The MIME type of a blocked phone number under CONTENT_URI
.
Value: "vnd.android.cursor.item/blocked_number"
CONTENT_TYPE
static val CONTENT_TYPE: String
The MIME type of CONTENT_URI
itself providing a directory of blocked phone numbers.
Value: "vnd.android.cursor.dir/blocked_number"
Properties
CONTENT_URI
static val CONTENT_URI: Uri!
Content URI for the blocked numbers.
Supported operations
blocked
blocked/ID
- query (selection is not supported)
- delete (selection is not supported)
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# BlockedNumberContract.BlockedNumbers\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBlockedNumbers\n==============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/provider/BlockedNumberContract.BlockedNumbers \"View this page in Java\") \n\n```\nopen class BlockedNumbers\n```\n\n|---|------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.provider.BlockedNumberContract.BlockedNumbers](#) |\n\nConstants to interact with the blocked numbers list.\n\nSummary\n-------\n\n| Constants ||\n|-----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [COLUMN_E164_NUMBER](#COLUMN_E164_NUMBER:kotlin.String) Phone number to block. |\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [COLUMN_ID](#COLUMN_ID:kotlin.String) Auto-generated ID field which monotonically increases. |\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [COLUMN_ORIGINAL_NUMBER](#COLUMN_ORIGINAL_NUMBER:kotlin.String) Phone number to block. |\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CONTENT_ITEM_TYPE](#CONTENT_ITEM_TYPE:kotlin.String) The MIME type of a blocked phone number under [CONTENT_URI](#CONTENT_URI:android.net.Uri). |\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [CONTENT_TYPE](#CONTENT_TYPE:kotlin.String) The MIME type of [CONTENT_URI](#CONTENT_URI:android.net.Uri) itself providing a directory of blocked phone numbers. |\n\n| Properties ||\n|---------------------------------|----------------------------------------------------------------------------------|\n| static [Uri](../net/Uri.html#)! | [CONTENT_URI](#CONTENT_URI:android.net.Uri) Content URI for the blocked numbers. |\n\nConstants\n---------\n\n### COLUMN_E164_NUMBER\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val COLUMN_E164_NUMBER: String\n```\n\nPhone number to block. The system generates it from [COLUMN_ORIGINAL_NUMBER](#COLUMN_ORIGINAL_NUMBER:kotlin.String) by removing all formatting characters.\n\nOptional in `insert`. When not specified, the system tries to generate it assuming the current country. (Which will still be null if the number is not valid.)\n\nTYPE: String \n\n Value: \"e164_number\"\n\n### COLUMN_ID\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val COLUMN_ID: String\n```\n\nAuto-generated ID field which monotonically increases.\n\nTYPE: long \n\n Value: \"_id\"\n\n### COLUMN_ORIGINAL_NUMBER\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val COLUMN_ORIGINAL_NUMBER: String\n```\n\nPhone number to block.\n\nMust be specified in `insert`.\n\nTYPE: String \n\n Value: \"original_number\"\n\n### CONTENT_ITEM_TYPE\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val CONTENT_ITEM_TYPE: String\n```\n\nThe MIME type of a blocked phone number under [CONTENT_URI](#CONTENT_URI:android.net.Uri). \n\n Value: \"vnd.android.cursor.item/blocked_number\"\n\n### CONTENT_TYPE\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val CONTENT_TYPE: String\n```\n\nThe MIME type of [CONTENT_URI](#CONTENT_URI:android.net.Uri) itself providing a directory of blocked phone numbers. \n\n Value: \"vnd.android.cursor.dir/blocked_number\"\n\nProperties\n----------\n\n### CONTENT_URI\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val CONTENT_URI: Uri!\n```\n\nContent URI for the blocked numbers.\n\n### Supported operations\n\n\u003cbr /\u003e\n\nblocked\n\n- query\n- delete\n- insert\n\nblocked/ID\n\n- query (selection is not supported)\n- delete (selection is not supported)"]]