Megosztás a következőn keresztül:


ContentProvider.Insert Method

Definition

Overloads

Insert(Uri, ContentValues)

Implement this to handle requests to insert a new row.

Insert(Uri, ContentValues, Bundle)

Implement this to handle requests to insert a new row.

Insert(Uri, ContentValues)

Implement this to handle requests to insert a new row.

[Android.Runtime.Register("insert", "(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;", "GetInsert_Landroid_net_Uri_Landroid_content_ContentValues_Handler")]
public abstract Android.Net.Uri? Insert (Android.Net.Uri uri, Android.Content.ContentValues? values);
[<Android.Runtime.Register("insert", "(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;", "GetInsert_Landroid_net_Uri_Landroid_content_ContentValues_Handler")>]
abstract member Insert : Android.Net.Uri * Android.Content.ContentValues -> Android.Net.Uri

Parameters

uri
Uri

The content:// URI of the insertion request.

values
ContentValues

A set of column_name/value pairs to add to the database.

Returns

Uri

The URI for the newly inserted item.

Attributes

Remarks

Implement this to handle requests to insert a new row. As a courtesy, call ContentResolver#notifyChange(android.net.Uri ,android.database.ContentObserver) notifyChange() after inserting. This method can be called from multiple threads, as described in Processes and Threads.

Java documentation for android.content.ContentProvider.insert(android.net.Uri, android.content.ContentValues).

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

Insert(Uri, ContentValues, Bundle)

Implement this to handle requests to insert a new row.

[Android.Runtime.Register("insert", "(Landroid/net/Uri;Landroid/content/ContentValues;Landroid/os/Bundle;)Landroid/net/Uri;", "GetInsert_Landroid_net_Uri_Landroid_content_ContentValues_Landroid_os_Bundle_Handler", ApiSince=30)]
public virtual Android.Net.Uri? Insert (Android.Net.Uri uri, Android.Content.ContentValues? values, Android.OS.Bundle? extras);
[<Android.Runtime.Register("insert", "(Landroid/net/Uri;Landroid/content/ContentValues;Landroid/os/Bundle;)Landroid/net/Uri;", "GetInsert_Landroid_net_Uri_Landroid_content_ContentValues_Landroid_os_Bundle_Handler", ApiSince=30)>]
abstract member Insert : Android.Net.Uri * Android.Content.ContentValues * Android.OS.Bundle -> Android.Net.Uri
override this.Insert : Android.Net.Uri * Android.Content.ContentValues * Android.OS.Bundle -> Android.Net.Uri

Parameters

uri
Uri

The content:// URI of the insertion request.

values
ContentValues

A set of column_name/value pairs to add to the database.

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

Uri

The URI for the newly inserted item.

Attributes

Remarks

Implement this to handle requests to insert a new row. As a courtesy, call ContentResolver#notifyChange(android.net.Uri ,android.database.ContentObserver) notifyChange() after inserting. This method can be called from multiple threads, as described in Processes and Threads.

Java documentation for android.content.ContentProvider.insert(android.net.Uri, android.content.ContentValues, 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