What happened?
In Android all lifecycleInit method don't complete the Future, java needs a result like iOS do.
iOS
|
- (void)lifecycleInit:(FlutterMethodCall *)call withResult:(FlutterResult)result { |
- (void)lifecycleInit:(FlutterMethodCall *)call withResult:(FlutterResult)result {
[OneSignal.Notifications addForegroundLifecycleListener:self];
[OneSignal.Notifications addPermissionObserver:self];
result(nil);
}
Android
|
private void lifecycleInit() { |
private void lifecycleInit() {
OneSignal.getNotifications().addForegroundLifecycleListener(this);
OneSignal.getNotifications().addPermissionObserver(this);
}
Steps to reproduce?
this Future never completes on Android
await OneSignal.Notifications.lifecycleInit();
What did you expect to happen?
complete the Future
OneSignal Flutter SDK version
Release 5.2.3
Which platform(s) are affected?
Relevant log output
No response
Code of Conduct
What happened?
In Android all lifecycleInit method don't complete the Future, java needs a result like iOS do.
iOS
OneSignal-Flutter-SDK/ios/Classes/OSFlutterNotifications.m
Line 106 in 7e921f0
Android
OneSignal-Flutter-SDK/android/src/main/java/com/onesignal/flutter/OneSignalNotifications.java
Line 195 in 7e921f0
Steps to reproduce?
What did you expect to happen?
complete the Future
OneSignal Flutter SDK version
Release 5.2.3
Which platform(s) are affected?
Relevant log output
No response
Code of Conduct