public interface ServiceAware
FlutterPlugin that wants to know when it is running within a Service.| Modifier and Type | Interface and Description |
|---|---|
static interface |
ServiceAware.OnModeChangeListener |
| Modifier and Type | Method and Description |
|---|---|
void |
onAttachedToService(ServicePluginBinding binding)
Callback triggered when a
ServiceAware FlutterPlugin is associated with a
Service. |
void |
onDetachedFromService()
Callback triggered when a
ServiceAware FlutterPlugin is detached from a Service. |
void onAttachedToService(@NonNull
ServicePluginBinding binding)
ServiceAware FlutterPlugin is associated with a
Service.void onDetachedFromService()
ServiceAware FlutterPlugin is detached from a Service.
Any Lifecycle listeners that were registered in onAttachedToService(ServicePluginBinding) should be deregistered here to avoid a possible
memory leak and other side effects.