diff --git a/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java b/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java index 9639738210c35..0a7bf20fd5af3 100644 --- a/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java +++ b/shell/platform/android/io/flutter/app/FlutterActivityDelegate.java @@ -289,6 +289,11 @@ public BinaryMessenger messenger() { return flutterView; } + @Override + public FlutterView view() { + return flutterView; + } + /** * Publishes a value associated with the plugin being registered. * diff --git a/shell/platform/android/io/flutter/plugin/common/PluginRegistry.java b/shell/platform/android/io/flutter/plugin/common/PluginRegistry.java index 45f4c078b5de0..96c75bb70cb30 100644 --- a/shell/platform/android/io/flutter/plugin/common/PluginRegistry.java +++ b/shell/platform/android/io/flutter/plugin/common/PluginRegistry.java @@ -6,6 +6,7 @@ import android.app.Activity; import android.content.Intent; +import io.flutter.view.FlutterView; /** * Registry used by plugins to set up interaction with Android APIs. @@ -73,6 +74,12 @@ interface Registrar { */ BinaryMessenger messenger(); + /** + * Returns the {@link FlutterView} that's instantiated by this plugin's + * {@link #activity() activity}. + */ + FlutterView view(); + /** * Publishes a value associated with the plugin being registered. *