Closed Sjosh-cronJ closed 5 years ago
I think you have to add an additional check
if(registrar.activity()!= null) {
registrar.activity().getApplication().registerActivityLifecycleCallbacks(instance);
};
When a background flutter view tries to register the plugin, the registrar has no activity. Could you please add a check as @Sjosh-cronJ have mentioned above?
Hi, i have the same problem, and the solution worked.
This need to be implemented, to avoid dirty edit :)
How do I fix the problem? The fix needs to be added to this package's code, right? I don't have access to that.
https://github.com/adee42/flutter_keyboard_visibility/blob/981f6794718654cb30b36e403505fe1ff502205b/android/src/main/java/com/github/adee42/keyboardvisibility/KeyboardVisibilityPlugin.java#L107