搜尋套件、儲存庫與 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 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。