Interface ContentProviderControlSurface
-
public interface ContentProviderControlSurfaceControl surface through which aContentProviderattaches to aFlutterEngine.A
ContentProviderthat contains aFlutterEngineshould coordinate itself with theFlutterEngine'sContentProviderControlSurface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidattachToContentProvider(ContentProvider contentProvider, androidx.lifecycle.Lifecycle lifecycle)Call this method from theContentProviderthat is running theFlutterEnginethat is associated with thisContentProviderControlSurface.voiddetachFromContentProvider()Call this method from theContentProviderthat is attached to thisContentProviderControlSurfaces'sFlutterEnginewhen theContentProvideris about to be destroyed.
-
-
-
Method Detail
-
attachToContentProvider
void attachToContentProvider(@NonNull ContentProvider contentProvider, @NonNull androidx.lifecycle.Lifecycle lifecycle)Call this method from theContentProviderthat is running theFlutterEnginethat is associated with thisContentProviderControlSurface.Once a
ContentProvideris created, and its associatedFlutterEngineis executing Dart code, theContentProvidershould invoke this method. At that point theFlutterEngineis considered "attached" to theContentProviderand allContentProviderAwareplugins are given access to theContentProvider.
-
detachFromContentProvider
void detachFromContentProvider()
Call this method from theContentProviderthat is attached to thisContentProviderControlSurfaces'sFlutterEnginewhen theContentProvideris about to be destroyed.This method gives each
ContentProviderAwareplugin an opportunity to clean up its references before theis destroyed.
-
-