我在 flutter 2.5 上使用 oneSignal 3.2.3, 我可以收到通知,一旦我点击它就不会打开我的应用程序,但通知打开句柄正在工作并从通知加载数据,但不会在屏幕上打开应用程序,但在 IOS 上使用相同的行为它正在工作。
在构建应用程序时我得到了这个:
The plugin `onesignal_flutter` uses a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it
since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.
flutter 医生:
[✓] Flutter (Channel stable, 2.5.0, on macOS 11.4 20F71 darwin-x64, locale en-MA)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.58.0)
[✓] Connected device (2 available)
最佳答案
从3.2.0到3.2.3的问题
使用 3.0.0 我解决了问题:onesignal_flutter: 3.0.0
关注问题:https://github.com/OneSignal/OneSignal-Flutter-SDK/issues/462
关于android - 单击 [仅限 Android],OneSignal 不会打开我的 flutter 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69185527/