wp_notify
Firebase Cloud Messaging を使用して WordPress からプッシュ通知を送信します。このパッケージは、FCM トークンを自動的に WordPress にプッシュし、通知の送信を開始します。WordPress ユーザーに FCM トークンを割り当て、WordPress の API を使用して iOS/Android デバイスにプッシュ通知を送信する機能も含まれます。
Firebase Cloud Messaging を使用して WordPress からプッシュ通知を送信します。このパッケージは、通知の送信を開始するために、FCM トークンを自動的に WordPress に送信します。機能には、WordPress ユーザーを FCM トークンに関連付けること、iOS および Android 用の基本的なプッシュ通知を送信することを含みます。
^6.38.1^1.4.0{"sdk":"flutter"}{"sdk":"flutter"}以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
Notifications
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.
In your flutter project add the dependency:
dependencies:
...
wp_notify: ^2.0.5
Import wp_notify.dart
import 'package:wp_notify/wp_notify.dart';
import 'package:wp_notify/wp_notify.dart';
...
void main() {
WPNotifyAPI.instance.initWith(baseUrl: "https://mysite.com");
...
WPStoreTokenResponse wpStoreTokenResponse;
try {
wpStoreTokenResponse = WPNotifyAPI.instance.api((request) => request.wpNotifyStoreToken(token: token, userId: usersId));
} on Exception catch (e) {
print(e);
}
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.
To use this plugin, add wp_notify as a dependency in your pubspec.yaml file.
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.