You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the ability to register any object of type FlutterPlugin and ActivityAware in JniPlugin.
We can then use JniPlugin.registerFlutterPlugin to add an implementation of FlutterPlugin that calls its onAttachedToEngine and other methods at the right time.
Note
This could be further simplified to require something like <T extends FlutterPlugin & ActivityAware> JniPlugin.register(T plugin) however we don't yet support intersection types and implementing multiple interfaces – #1021. Alternatively we could create a interface ActivityAwareFlutterPlugin implements FlutterPlugin, ActivityAware and include it.
We might decide to expose the bindings in another package, for example package:flutter_jni, however the Java code must still reside in package:jni until we stop depending on Flutter and use the native assets system – #645.
The text was updated successfully, but these errors were encountered:
Add the ability to register any object of type
FlutterPlugin
andActivityAware
inJniPlugin
.We can then use
JniPlugin.registerFlutterPlugin
to add an implementation ofFlutterPlugin
that calls itsonAttachedToEngine
and other methods at the right time.Note
This could be further simplified to require something like
<T extends FlutterPlugin & ActivityAware> JniPlugin.register(T plugin)
however we don't yet support intersection types and implementing multiple interfaces – #1021. Alternatively we could create ainterface ActivityAwareFlutterPlugin implements FlutterPlugin, ActivityAware
and include it.We might decide to expose the bindings in another package, for example
package:flutter_jni
, however the Java code must still reside inpackage:jni
until we stop depending on Flutter and use the native assets system – #645.The text was updated successfully, but these errors were encountered: