Flutter Engine
The Flutter Engine
shell
platform
android
io
flutter
embedding
engine
plugins
service
ServiceAware.java
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
package
io.flutter.embedding.engine.plugins.service;
6
7
import
androidx.annotation.NonNull;
8
9
/**
10
* A {@link io.flutter.embedding.engine.plugins.FlutterPlugin} that wants to know when it is running
11
* within a {@link android.app.Service}.
12
*/
13
public
interface
ServiceAware
{
14
/**
15
* Callback triggered when a {@code ServiceAware} {@link
16
* io.flutter.embedding.engine.plugins.FlutterPlugin} is associated with a {@link
17
* android.app.Service}.
18
*/
19
void
onAttachedToService
(@NonNull
ServicePluginBinding
binding);
20
21
/**
22
* Callback triggered when a {@code ServiceAware} {@link
23
* io.flutter.embedding.engine.plugins.FlutterPlugin} is detached from a {@link
24
* android.app.Service}.
25
*
26
* <p>Any {@code Lifecycle} listeners that were registered in {@link
27
* #onAttachedToService(ServicePluginBinding)} should be deregistered here to avoid a possible
28
* memory leak and other side effects.
29
*/
30
void
onDetachedFromService
();
31
32
interface
OnModeChangeListener
{
33
/**
34
* Callback triggered when the associated {@link android.app.Service} goes from background
35
* execution to foreground execution.
36
*/
37
void
onMoveToForeground
();
38
39
/**
40
* Callback triggered when the associated {@link android.app.Service} goes from foreground
41
* execution to background execution.
42
*/
43
void
onMoveToBackground
();
44
}
45
}
io.flutter.embedding.engine.plugins.service.ServiceAware.OnModeChangeListener
Definition:
ServiceAware.java:32
io.flutter.embedding.engine.plugins.service.ServiceAware.OnModeChangeListener.onMoveToBackground
void onMoveToBackground()
io.flutter.embedding.engine.plugins.service.ServiceAware.OnModeChangeListener.onMoveToForeground
void onMoveToForeground()
io.flutter.embedding.engine.plugins.service.ServiceAware
Definition:
ServiceAware.java:13
io.flutter.embedding.engine.plugins.service.ServiceAware.onAttachedToService
void onAttachedToService(@NonNull ServicePluginBinding binding)
io.flutter.embedding.engine.plugins.service.ServiceAware.onDetachedFromService
void onDetachedFromService()
io.flutter.embedding.engine.plugins.service.ServicePluginBinding
Definition:
ServicePluginBinding.java:12
Generated on Sun Jun 23 2024 21:55:09 for Flutter Engine by
1.9.4