Package io.flutter.view
Class FlutterNativeView
- java.lang.Object
-
- io.flutter.view.FlutterNativeView
-
- All Implemented Interfaces:
BinaryMessenger
@Deprecated public class FlutterNativeView extends Object implements BinaryMessenger
Deprecated.FlutterViewis the new API that now replaces this class. See https://flutter.dev/go/android-project-migration for more migration details.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.flutter.plugin.common.BinaryMessenger
BinaryMessenger.BinaryMessageHandler, BinaryMessenger.BinaryReply, BinaryMessenger.TaskQueue
-
-
Constructor Summary
Constructors Constructor Description FlutterNativeView(Context context)Deprecated.FlutterNativeView(Context context, boolean isBackgroundView)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidassertAttached()Deprecated.voidattachViewAndActivity(FlutterView flutterView, Activity activity)Deprecated.voiddestroy()Deprecated.voiddetachFromFlutterView()Deprecated.DartExecutorgetDartExecutor()Deprecated.static StringgetObservatoryUri()Deprecated.FlutterPluginRegistrygetPluginRegistry()Deprecated.booleanisApplicationRunning()Deprecated.booleanisAttached()Deprecated.BinaryMessenger.TaskQueuemakeBackgroundTaskQueue()Deprecated.Creates a TaskQueue that executes the tasks serially on a background thread.voidrunFromBundle(FlutterRunArguments args)Deprecated.voidsend(String channel, ByteBuffer message)Deprecated.Sends a binary message to the Flutter application.voidsend(String channel, ByteBuffer message, BinaryMessenger.BinaryReply callback)Deprecated.Sends a binary message to the Flutter application, optionally expecting a reply.voidsetMessageHandler(String channel, BinaryMessenger.BinaryMessageHandler handler)Deprecated.Registers a handler to be invoked when the Flutter application sends a message to its host platform.voidsetMessageHandler(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.
-
-
-
Method Detail
-
detachFromFlutterView
public void detachFromFlutterView()
Deprecated.
-
destroy
public void destroy()
Deprecated.
-
getDartExecutor
@NonNull public DartExecutor getDartExecutor()
Deprecated.
-
getPluginRegistry
@NonNull public FlutterPluginRegistry getPluginRegistry()
Deprecated.
-
attachViewAndActivity
public void attachViewAndActivity(FlutterView flutterView, Activity activity)
Deprecated.
-
isAttached
public boolean isAttached()
Deprecated.
-
assertAttached
public void assertAttached()
Deprecated.
-
runFromBundle
public void runFromBundle(FlutterRunArguments args)
Deprecated.
-
isApplicationRunning
public boolean isApplicationRunning()
Deprecated.
-
getObservatoryUri
public static String getObservatoryUri()
Deprecated.
-
makeBackgroundTaskQueue
@UiThread public BinaryMessenger.TaskQueue makeBackgroundTaskQueue()
Deprecated.Description copied from interface:BinaryMessengerCreates a TaskQueue that executes the tasks serially on a background thread.There is no guarantee that the tasks will execute on the same thread, just that execution is serial.
- Specified by:
makeBackgroundTaskQueuein interfaceBinaryMessenger
-
send
@UiThread public void send(String channel, ByteBuffer message)
Deprecated.Description copied from interface:BinaryMessengerSends a binary message to the Flutter application.- Specified by:
sendin interfaceBinaryMessenger- Parameters:
channel- the nameStringof the logical channel used for the message.message- the message payload, a direct-allocatedByteBufferwith 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:BinaryMessengerSends 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:
sendin interfaceBinaryMessenger- Parameters:
channel- the nameStringof the logical channel used for the message.message- the message payload, a direct-allocatedByteBufferwith the message bytes between position zero and current position, or null.callback- aBinaryMessenger.BinaryReplycallback 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:BinaryMessengerRegisters 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:
setMessageHandlerin interfaceBinaryMessenger- Parameters:
channel- the nameStringof the channel.handler- aBinaryMessenger.BinaryMessageHandlerto 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:BinaryMessengerRegisters 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:
setMessageHandlerin interfaceBinaryMessenger- Parameters:
channel- the nameStringof the channel.handler- aBinaryMessenger.BinaryMessageHandlerto be invoked on incoming messages, or null.taskQueue- aBinaryMessenger.TaskQueuethat specifies what thread will execute the handler. Specifying null means execute on the platform thread.
-
-