Class FlutterNativeView
- All Implemented Interfaces:
BinaryMessenger
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.flutter.plugin.common.BinaryMessenger
BinaryMessenger.BinaryMessageHandler, BinaryMessenger.BinaryReply, BinaryMessenger.TaskQueue, BinaryMessenger.TaskQueueOptions
-
Constructor Summary
ConstructorDescriptionFlutterNativeView
(Context context) Deprecated.FlutterNativeView
(Context context, boolean isBackgroundView) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.void
attachViewAndActivity
(FlutterView flutterView, Activity activity) Deprecated.void
destroy()
Deprecated.void
Deprecated.void
Deprecated.Disables the ability to queue messages received from Dart.void
Deprecated.Enables the ability to queue messages received from Dart.Deprecated.static String
Deprecated.Deprecated.static String
Deprecated.boolean
Deprecated.boolean
Deprecated.Deprecated.Creates a TaskQueue that executes the tasks serially on a background thread.void
Deprecated.void
send
(String channel, ByteBuffer message) Deprecated.Sends a binary message to the Flutter application.void
send
(String channel, ByteBuffer message, BinaryMessenger.BinaryReply callback) Deprecated.Sends a binary message to the Flutter application, optionally expecting a reply.void
setMessageHandler
(String channel, BinaryMessenger.BinaryMessageHandler handler) Deprecated.Registers a handler to be invoked when the Flutter application sends a message to its host platform.void
setMessageHandler
(String channel, BinaryMessenger.BinaryMessageHandler handler, BinaryMessenger.TaskQueue taskQueue) Deprecated.Registers a handler to be invoked when the Flutter application sends a message to its host platform.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.flutter.plugin.common.BinaryMessenger
makeBackgroundTaskQueue
-
Constructor Details
-
FlutterNativeView
Deprecated. -
FlutterNativeView
Deprecated.
-
-
Method Details
-
detachFromFlutterView
public void detachFromFlutterView()Deprecated. -
destroy
public void destroy()Deprecated. -
getDartExecutor
Deprecated. -
getPluginRegistry
Deprecated. -
attachViewAndActivity
Deprecated. -
isAttached
public boolean isAttached()Deprecated. -
assertAttached
public void assertAttached()Deprecated. -
runFromBundle
Deprecated. -
isApplicationRunning
public boolean isApplicationRunning()Deprecated. -
getObservatoryUri
Deprecated. -
getVMServiceUri
Deprecated. -
makeBackgroundTaskQueue
@UiThread public BinaryMessenger.TaskQueue makeBackgroundTaskQueue(BinaryMessenger.TaskQueueOptions options) Deprecated.Description copied from interface:BinaryMessenger
Creates a TaskQueue that executes the tasks serially on a background thread.BinaryMessenger.TaskQueueOptions
can be used to configure the task queue to execute tasks concurrently. Doing so can be more performant, though users need to ensure that the task handlers are thread-safe.- Specified by:
makeBackgroundTaskQueue
in interfaceBinaryMessenger
-
send
Deprecated.Description copied from interface:BinaryMessenger
Sends a binary message to the Flutter application.- Specified by:
send
in interfaceBinaryMessenger
- Parameters:
channel
- the nameString
of the logical channel used for the message.message
- the message payload, a direct-allocatedByteBuffer
with the message bytes between position zero and current position, or null.
-
send
@UiThread public void send(String channel, ByteBuffer message, BinaryMessenger.BinaryReply callback) Deprecated.Description copied from interface:BinaryMessenger
Sends a binary message to the Flutter application, optionally expecting a reply.Any uncaught exception thrown by the reply callback will be caught and logged.
- Specified by:
send
in interfaceBinaryMessenger
- Parameters:
channel
- the nameString
of the logical channel used for the message.message
- the message payload, a direct-allocatedByteBuffer
with the message bytes between position zero and current position, or null.callback
- aBinaryMessenger.BinaryReply
callback invoked when the Flutter application responds to the message, possibly null.
-
setMessageHandler
@UiThread public void setMessageHandler(String channel, BinaryMessenger.BinaryMessageHandler handler) Deprecated.Description copied from interface:BinaryMessenger
Registers a handler to be invoked when the Flutter application sends a message to its host platform.Registration overwrites any previous registration for the same channel name. Use a null handler to deregister.
If no handler has been registered for a particular channel, any incoming message on that channel will be handled silently by sending a null reply.
- Specified by:
setMessageHandler
in interfaceBinaryMessenger
- Parameters:
channel
- the nameString
of the channel.handler
- aBinaryMessenger.BinaryMessageHandler
to be invoked on incoming messages, or null.
-
setMessageHandler
@UiThread public void setMessageHandler(String channel, BinaryMessenger.BinaryMessageHandler handler, BinaryMessenger.TaskQueue taskQueue) Deprecated.Description copied from interface:BinaryMessenger
Registers a handler to be invoked when the Flutter application sends a message to its host platform.Registration overwrites any previous registration for the same channel name. Use a null handler to deregister.
If no handler has been registered for a particular channel, any incoming message on that channel will be handled silently by sending a null reply.
- Specified by:
setMessageHandler
in interfaceBinaryMessenger
- Parameters:
channel
- the nameString
of the channel.handler
- aBinaryMessenger.BinaryMessageHandler
to be invoked on incoming messages, or null.taskQueue
- aBinaryMessenger.TaskQueue
that specifies what thread will execute the handler. Specifying null means execute on the platform thread.
-
enableBufferingIncomingMessages
public void enableBufferingIncomingMessages()Deprecated.Description copied from interface:BinaryMessenger
Enables the ability to queue messages received from Dart.This is useful when there are pending channel handler registrations. For example, Dart may be initialized concurrently, and prior to the registration of the channel handlers. This implies that Dart may start sending messages while plugins are being registered.
- Specified by:
enableBufferingIncomingMessages
in interfaceBinaryMessenger
-
disableBufferingIncomingMessages
public void disableBufferingIncomingMessages()Deprecated.Description copied from interface:BinaryMessenger
Disables the ability to queue messages received from Dart.This can be used after all pending channel handlers have been registered.
- Specified by:
disableBufferingIncomingMessages
in interfaceBinaryMessenger
-
FlutterView
is the new API that now replaces this class. See https://flutter.dev/go/android-project-migration for more migration details.