Android.App.Activity.StartManagingCursor Method
This method allows the activity to take care of managing the given Android.Database.ICursor's lifecycle for you based on the activity's lifecycle.

Syntax

[Android.Runtime.Register("startManagingCursor", "(Landroid/database/Cursor;)V", "GetStartManagingCursor_Landroid_database_Cursor_Handler")]
[System.Obsolete("deprecated")]
public virtual void StartManagingCursor (Android.Database.ICursor c)

See Also

Activity.ManagedQuery(Android.Net.Uri, System.String[], System.String[], System.String[], System.String[])
Activity.StopManagingCursor(Android.Database.ICursor)

Parameters

c
The Cursor to be managed.

Remarks

This method allows the activity to take care of managing the given Android.Database.ICursor's lifecycle for you based on the activity's lifecycle. That is, when the activity is stopped it will automatically call Android.Database.ICursor.Deactivate on the given Cursor, and when it is later restarted it will call Android.Database.ICursor.Requery for you. When the activity is destroyed, all managed Cursors will be closed automatically. If you are targeting NoType:android/os/Build$VERSION_CODES;Href=../../../reference/android/os/Build.VERSION_CODES.html#HONEYCOMB or later, consider instead using Android.App.LoaderManager instead, available via Activity.LoaderManager.

Warning: Do not call Android.Database.ICursor.Close on cursor obtained from Activity.ManagedQuery(Android.Net.Uri, System.String[], System.String[], System.String[], System.String[]), because the activity will do that for you at the appropriate time. However, if you call Activity.StopManagingCursor(Android.Database.ICursor) on a cursor from a managed query, the system will not automatically close the cursor and, in that case, you must call Android.Database.ICursor.Close.

[Android Documentation]

Requirements

Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1