ContentResolver.Delete Method

Definition

Overloads

Delete(Uri, Bundle)

Deletes row(s) specified by a content URI.

Delete(Uri, String, String[])

Deletes row(s) specified by a content URI.

Delete(Uri, Bundle)

Deletes row(s) specified by a content URI.

[Android.Runtime.Register("delete", "(Landroid/net/Uri;Landroid/os/Bundle;)I", "", ApiSince=30)]
public int Delete (Android.Net.Uri url, Android.OS.Bundle? extras);
[<Android.Runtime.Register("delete", "(Landroid/net/Uri;Landroid/os/Bundle;)I", "", ApiSince=30)>]
member this.Delete : Android.Net.Uri * Android.OS.Bundle -> int

Parameters

url
Uri

The URL of the row to delete.

extras
Bundle

A Bundle containing additional information necessary for the operation. Arguments may include SQL style arguments, such as ContentResolver#QUERY_ARG_SQL_LIMIT, but note that the documentation for each individual provider will indicate which arguments they support.

Returns

The number of rows deleted.

Attributes

Remarks

Deletes row(s) specified by a content URI.

If the content provider supports transactions, the deletion will be atomic.

Java documentation for android.content.ContentResolver.delete(android.net.Uri, android.os.Bundle).

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.

Applies to

Delete(Uri, String, String[])

Deletes row(s) specified by a content URI.

[Android.Runtime.Register("delete", "(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I", "")]
public int Delete (Android.Net.Uri url, string? where, string[]? selectionArgs);
[<Android.Runtime.Register("delete", "(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I", "")>]
member this.Delete : Android.Net.Uri * string * string[] -> int

Parameters

url
Uri

The URL of the row to delete.

where
String

A filter to apply to rows before deleting, formatted as an SQL WHERE clause (excluding the WHERE itself).

selectionArgs
String[]

Returns

The number of rows deleted.

Attributes

Remarks

Deletes row(s) specified by a content URI.

If the content provider supports transactions, the deletion will be atomic.

Java documentation for android.content.ContentResolver.delete(android.net.Uri, java.lang.String, java.lang.String[]).

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.

Applies to