Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/provider/ContactsContract.DataUsageFeedback#constants) \| [Fields](https://developer.android.com/reference/android/provider/ContactsContract.DataUsageFeedback#lfields) \| [Ctors](https://developer.android.com/reference/android/provider/ContactsContract.DataUsageFeedback#pubctors) \| [Inherited Methods](https://developer.android.com/reference/android/provider/ContactsContract.DataUsageFeedback#inhmethods)

# ContactsContract.DataUsageFeedback

*** ** * ** ***

` public static final class ContactsContract.DataUsageFeedback `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.provider.ContactsContract.DataUsageFeedback |

<br />

*** ** * ** ***

<br />

**This class was deprecated in API level 29.**   

Contacts affinity information is no longer supported as of Android version `https://developer.android.com/reference/android/os/Build.VERSION_CODES#Q`. Both update and delete calls are always ignored.

<br />

API allowing applications to send usage information for each `https://developer.android.com/reference/android/provider/ContactsContract.Data` row to the Contacts Provider. Applications can also clear all usage information.

**Caution:** If you publish your app to the Google Play Store, this field is obsolete, regardless of Android version. For more information, see the [Contacts Provider](https://developer.android.com/guide/topics/providers/contacts-provider#ObsoleteData) page.

With the feedback, Contacts Provider may return more contextually appropriate results for Data listing, typically supplied with `https://developer.android.com/reference/android/provider/ContactsContract.Contacts#CONTENT_FILTER_URI`, `https://developer.android.com/reference/android/provider/ContactsContract.CommonDataKinds.Email#CONTENT_FILTER_URI`, `https://developer.android.com/reference/android/provider/ContactsContract.CommonDataKinds.Phone#CONTENT_FILTER_URI`, and users can benefit from better ranked (sorted) lists in applications that show auto-complete list.

There is no guarantee for how this feedback is used, or even whether it is used at all. The ranking algorithm will make best efforts to use the feedback data, but the exact implementation, the storage data structures as well as the resulting sort order is device and version specific and can change over time.

When updating usage information, users of this API need to use `https://developer.android.com/reference/android/content/ContentResolver#update(android.net.Uri,%20android.content.ContentValues,%20java.lang.String,%20java.lang.String[])` with a Uri constructed from `https://developer.android.com/reference/android/provider/ContactsContract.DataUsageFeedback#FEEDBACK_URI`. The Uri must contain one or more data id(s) as its last path. They also need to append a query parameter to the Uri, to specify the type of the communication, which enables the Contacts Provider to differentiate between kinds of interactions using the same contact data field (for example a phone number can be used to make phone calls or send SMS).

Selection and selectionArgs are ignored and must be set to null. To get data ids, you may need to call `https://developer.android.com/reference/android/content/ContentResolver#query(android.net.Uri,%20java.lang.String[],%20java.lang.String,%20java.lang.String[],%20java.lang.String)` toward `https://developer.android.com/reference/android/provider/ContactsContract.Data#CONTENT_URI`.

`https://developer.android.com/reference/android/content/ContentResolver#update(android.net.Uri,%20android.content.ContentValues,%20java.lang.String,%20java.lang.String[])` returns a positive integer when successful, and returns 0 if no contact with that id was found.

Example:

```
Uri uri = DataUsageFeedback.FEEDBACK_URI.buildUpon()
        .appendPath(TextUtils.join(",", dataIds))
        .appendQueryParameter(DataUsageFeedback.USAGE_TYPE,
                DataUsageFeedback.USAGE_TYPE_CALL)
        .build();
boolean successful = resolver.update(uri, new ContentValues(), null, null) > 0;
```

<br />

Applications can also clear all usage information with:

```
boolean successful = resolver.delete(DataUsageFeedback.DELETE_USAGE_URI, null, null) > 0;
```

<br />

<br />

## Summary

| ### Constants ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.DataUsageFeedback#USAGE_TYPE` <br /> Name for query parameter specifying the type of data usage. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.DataUsageFeedback#USAGE_TYPE_CALL` <br /> Type of usage for voice interaction, which includes phone call, voice chat, and video chat. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.DataUsageFeedback#USAGE_TYPE_LONG_TEXT` <br /> Type of usage for text interaction involving longer messages, which includes email. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/provider/ContactsContract.DataUsageFeedback#USAGE_TYPE_SHORT_TEXT` <br /> Type of usage for text interaction involving shorter messages, which includes SMS, text chat with email addresses. |

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/net/Uri` | `https://developer.android.com/reference/android/provider/ContactsContract.DataUsageFeedback#DELETE_USAGE_URI` The content:// style URI for deleting all usage information. |
| ` public static final https://developer.android.com/reference/android/net/Uri` | `https://developer.android.com/reference/android/provider/ContactsContract.DataUsageFeedback#FEEDBACK_URI` The content:// style URI for sending usage feedback. |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/provider/ContactsContract.DataUsageFeedback#DataUsageFeedback()() ` |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Constants

### USAGE_TYPE

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String USAGE_TYPE
```

<br />

Name for query parameter specifying the type of data usage.

<br />

<br />

Constant Value: "type"

### USAGE_TYPE_CALL

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String USAGE_TYPE_CALL
```

<br />

Type of usage for voice interaction, which includes phone call, voice chat, and video chat.

<br />

<br />

Constant Value: "call"

### USAGE_TYPE_LONG_TEXT

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String USAGE_TYPE_LONG_TEXT
```

<br />

Type of usage for text interaction involving longer messages, which includes email.

<br />

<br />

Constant Value: "long_text"

### USAGE_TYPE_SHORT_TEXT

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String USAGE_TYPE_SHORT_TEXT
```

<br />

Type of usage for text interaction involving shorter messages, which includes SMS, text chat with email addresses.

<br />

<br />

Constant Value: "short_text"

## Fields

### DELETE_USAGE_URI

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Uri DELETE_USAGE_URI
```

The content:// style URI for deleting all usage information. Must be used with `https://developer.android.com/reference/android/content/ContentResolver#delete(android.net.Uri,%20java.lang.String,%20java.lang.String[])`. The `where` and `selectionArgs` parameters are ignored.

<br />

### FEEDBACK_URI

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Uri FEEDBACK_URI
```

The content:// style URI for sending usage feedback. Must be used with `https://developer.android.com/reference/android/content/ContentResolver#update(android.net.Uri,%20android.content.ContentValues,%20java.lang.String,%20java.lang.String[])`.

<br />

## Public constructors

### DataUsageFeedback

```
public DataUsageFeedback ()
```

<br />

<br />