Dieser Stringwert ist der für Nutzer sichtbare Name eines Labels. Die Namen der Systemlabels (z. B. „Posteingang“, „Gesendet“, „Entwürfe“) werden lokalisiert.
Typ: TEXT
Konstanter Wert:
"name"
public
static
final
String
NUM_CONVERSATIONS
Dieser Ganzzahlwert ist die Anzahl der Konversationen in diesem Label.
Typ: INTEGER
Konstanter Wert:
"numConversations"
public
static
final
String
NUM_UNREAD_CONVERSATIONS
Dieser Ganzzahlwert ist die Anzahl der ungelesenen Konversationen in diesem Label.
Typ: INTEGER
Konstanter Wert:
"numUnreadConversations"
public
static
final
String
TEXT_COLOR
Dieser Ganzzahlwert ist die Textfarbe des Labels im Vordergrund im 32-Bit-Format 0xAARRGGBB.
Typ: INTEGER
Konstanter Wert:
"text_color"
public
static
final
String
URI
Dieser Stringspaltenwert ist der URI, der in nachfolgenden Aufrufen von android.content.ContentProvider#query() verwendet werden kann, um Informationen zu dem einzelnen Label abzufragen, das durch diese Zeile dargestellt wird.
Typ: TEXT
Konstanter Wert:
"labelUri"
Public Methods
public
static
URI
getLabelsUri(String account)
Gibt einen URI zurück, der bei der Abfrage die Liste der Labels für ein Konto zurückgibt.
Damit Sie die Labels API verwenden können, muss eine App zuerst die E-Mail-Adresse eines gültigen Gmail-Kontos finden, um Labelinformationen abzufragen. Der AccountManager kann diese Informationen zurückgeben (Beispiel).
Parameter
Konto
Name eines gültigen Google-Kontos.
Rückgaben
Die URL, die abgefragt werden kann, um die Labelliste abzurufen.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2024-09-03 (UTC)."],[[["`GmailContract.Labels` provides access to label information within a Gmail account, including color, name, and unread conversation counts."],["This class offers constants to query specific label attributes like `BACKGROUND_COLOR`, `NAME`, and `NUM_UNREAD_CONVERSATIONS`."],["The `getLabelsUri` method helps retrieve the URI for querying the list of labels associated with a Gmail account."],["Developers need a valid Gmail account to access label information using the Account Manager."]]],["The `GmailContract.Labels` class manages label information within a Gmail account. Key data includes the label's `BACKGROUND_COLOR`, `CANONICAL_NAME`, `NAME`, `TEXT_COLOR`, and URIs (`CONTENT_ITEM_TYPE`, `CONTENT_TYPE`, `URI`). It also tracks `NUM_CONVERSATIONS` and `NUM_UNREAD_CONVERSATIONS`. The `getLabelsUri` method retrieves the URI for accessing a specific account's label list, requiring a valid Google account name as input. This table will give information on the label list.\n"]]