搜索插件、代码仓与 APP 分类

插件详情v2.0.5

wp_notify

使用 Firebase Cloud Messaging 从 WordPress 发送推送通知。此包会自动将您的 FCM 令牌推送到 WordPress 以开始发送通知。功能包括将 WordPress 用户与 FCM 令牌关联,并通过 WordPress 中的我们的 API 向 iOS/Android 设备发送推送通知。

AndroidiOSmacOS
近 30 天下载
41
喜欢数
23
Pub 分数
130

安装插件

flutter pub add wp_notify

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

wp_notify 包使 Flutter 应用能够通过 Firebase Cloud Messaging (FCM) 从 WordPress 接收推送通知。它会自动将设备的 FCM 令牌注册到 WordPress,从而实现无缝的双向通信。开发者可以将 FCM 令牌分配给 WordPress 用户,并使用 WordPress API 向 Android 和 iOS 设备发送定向通知。该包支持在 Android、iOS 和 macOS 上进行跨平台部署,非常适合将原生推送功能集成到基于 WordPress 的应用中。它通过处理令牌同步和通知传递,简化了设置流程。

适合场景

  • 从 WordPress 管理员发送应用通知
  • Flutter 应用中的用户特定推送警报
  • 移动客户端的实时更新
  • 跨平台通知传递
  • 自动 FCM 令牌注册

主要特点

  • 与 WordPress 的自动 FCM 令牌同步
  • 支持 Android 和 iOS 设备
  • 与 WordPress REST API 集成
  • 按WordPress用户分配令牌
  • 跨平台兼容性(Android、iOS、macOS)

适合对象

  • 基于WordPress的移动应用
  • 需要实时通知的应用
  • 使用 Firebase 的 WordPress 开发人员
  • 需要自动化令牌管理的项目
  • 多设备通知系统

使用建议

  • 需要 WordPress 插件以提供后端支持
  • 需要在 Firebase 中进行正确的 FCM 配置
  • 后端 API 必须可访问
  • iOS 需要为后台通知进行额外设置
  • 令牌注册需要网络连接

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

WP Notify for Flutter - Send push notifications from WordPress using Firebase Cloud Messaging

Official WooSignal package

API features:

Notifications

  • Automatically sends the device token to your WordPress site for a given user/device
  • You can assign a token to a WordPress user
  • Send notifications from WordPress with our API

To use this Flutter package you must have the WP Notify Plugin installed first on your WordPress site, you can download it via the WooSignal website.

Getting Started

In your flutter project add the dependency:

dependencies:
  ...
  wp_notify: ^2.0.5
Usage example

Import wp_notify.dart

import 'package:wp_notify/wp_notify.dart';
Example using WP Notify
import 'package:wp_notify/wp_notify.dart';
...

void main() {

WPNotifyAPI.instance.initWith(baseUrl: "https://mysite.com");

...
Available API Requests
WordPress - wpNotifyStoreToken
  • Used for storing an FCM token
WPStoreTokenResponse wpStoreTokenResponse;
try {
    wpStoreTokenResponse = WPNotifyAPI.instance.api((request) => request.wpNotifyStoreToken(token: token, userId: usersId));
} on Exception catch (e) {
    print(e);
}
WordPress - Updating a tokens status (e.g. if you want to turn off notifications)
  • Used for updating the status of an FCM token
WPUpdateTokenResponse wpUpdateTokenResponse;
try {
     wpUpdateTokenResponse = WPNotifyAPI.instance.api((request) => request.wpNotifyUpdateToken(token: token, status: true));
} on Exception catch (e) {
    print(e);
}

For help getting started with WooSignal, view our online documentation, which offers a more detailed guide.

Usage

To use this plugin, add wp_notify as a dependency in your pubspec.yaml file.

Note

Install WordPress plugin "WP Notify" 2.0.x or later for version 2.0.0

Disclaimer: This plugin is not affiliated with or supported by Automattic, Inc. All logos and trademarks are the property of their respective owners.

所属分类

依赖

依赖清单 2 项

源码仓库

使用此插件的项目

暂无相关数据。