无论如何,是否可以知道该设备何时从Oneingnal接收通知

发布于 2025-01-31 09:47:57 字数 64 浏览 2 评论 0原文

并且在应用程序的通知部分中使用了OneSignal

我已经构建了一个Flutter应用程序, 或背景

I have built a flutter app and I have used oneSignal for the notifications part of the app

but till yet, I could not find a way to listen to know when a new notification is received by the app regardless the state of app being in the foreground or in the background

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

叫思念不要吵 2025-02-07 09:47:57
Future<void> oneSignalInitialise(BuildContext context) async {
  OneSignal.shared.setAppId("$notificationOneSignalAppId");

  ///asking for push notification permission
  OneSignal.shared.promptUserForPushNotificationPermission().then((accepted) {
    print("Accepted permission: $accepted");
  });

  OneSignal.shared.setNotificationOpenedHandler((openedResult) {
    print("notification opened");
  });

  OneSignal.shared.setNotificationWillShowInForegroundHandler((event) {
    print("Notification Forground");
  });
Future<void> oneSignalInitialise(BuildContext context) async {
  OneSignal.shared.setAppId("$notificationOneSignalAppId");

  ///asking for push notification permission
  OneSignal.shared.promptUserForPushNotificationPermission().then((accepted) {
    print("Accepted permission: $accepted");
  });

  OneSignal.shared.setNotificationOpenedHandler((openedResult) {
    print("notification opened");
  });

  OneSignal.shared.setNotificationWillShowInForegroundHandler((event) {
    print("Notification Forground");
  });
往日情怀 2025-02-07 09:47:57

如果您转到signal仪表板 - &gt; messages-&gt;单击要查看数据的消息,然后向下滚动到受众Activity-&gt;确认的交货。

加入我们的社区:

If you go to your OneSignal Dashboard->Messages-> Click on the message you want to see the data->Then scroll down to Audience Activity-> Confirmed Delivery.

enter image description here

Join our community:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文