ContactsContract.DataUsageFeedback Class

Definition

API allowing applications to send usage information for each Data row to the Contacts Provider.

[Android.Runtime.Register("android/provider/ContactsContract$DataUsageFeedback", DoNotGenerateAcw=true)]
public sealed class ContactsContract.DataUsageFeedback : Java.Lang.Object
[<Android.Runtime.Register("android/provider/ContactsContract$DataUsageFeedback", DoNotGenerateAcw=true)>]
type ContactsContract.DataUsageFeedback = class
    inherit Object
Inheritance
ContactsContract.DataUsageFeedback
Attributes

Remarks

API allowing applications to send usage information for each Data row to the Contacts Provider. Applications can also clear all usage information.

<p class="caution"><b>Caution: </b>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 page.</p>

With the feedback, Contacts Provider may return more contextually appropriate results for Data listing, typically supplied with ContactsContract.Contacts#CONTENT_FILTER_URI, ContactsContract.CommonDataKinds.Email#CONTENT_FILTER_URI, 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 ContentResolver#update(Uri, ContentValues, String, String[]) with a Uri constructed from 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 ContentResolver#query(Uri, String[], String, String[], String) toward Data#CONTENT_URI.

ContentResolver#update(Uri, ContentValues, String, 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;

</p>

Applications can also clear all usage information with:

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

</p>

This member is deprecated. Contacts affinity information is no longer supported as of Android version android.os.Build.VERSION_CODES#Q. Both update and delete calls are always ignored.

Java documentation for android.provider.ContactsContract.DataUsageFeedback.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

ContactsContract.DataUsageFeedback()

Fields

UsageType

Name for query parameter specifying the type of data usage.

UsageTypeCall

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

UsageTypeLongText

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

UsageTypeShortText

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

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
DeleteUsageUri

The content:// style URI for deleting all usage information.

FeedbackUri

The content:// style URI for sending usage feedback.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to