パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v2.2.13

xmpp_plugin

ネイティブチャネルおよびネイティブライブラリ(AndroidのsmackやiOSのxmppframeworkなど)を介してXMPPに接続するのに役立つXmppプラグイン

AndroidiOS
30日間ダウンロード
64
いいね数
96
Pub ポイント
130

パッケージをインストール

flutter pub add xmpp_plugin

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

xmpp_plugin は、Android および iOS のネイティブチャネルを通じて XMPP(拡張メッセージングおよびプレゼンスプロトコル)サーバーに接続することで、リアルタイム通信を可能にする Flutter パッケージです。Android 用の Smack や iOS 用の XMPPFramework などのネイティブライブラリを利用しており、堅牢かつ効率的なメッセージング機能を実現しています。このプラグインは、即時メッセージング、プレゼンス検出、セキュアなチャット機能が必要なアプリケーションに最適です。Flutter とプラットフォーム固有の XMPP 実装との間のブリッジを提供し、既存の XMPP インフラストラクチャとの高いパフォーマンスと互換性を確保します。

用途

  • リアルタイムチャットアプリケーション
  • 存在状況とステータスの追跡
  • セキュアなメッセージングシステム
  • 既存のXMPPサーバーとの統合
  • マルチプラットフォームメッセージアプリ

主な機能

  • Smack および XMPPFramework を通じたネイティブ統合
  • Android および iOS 用のクロスプラットフォーム対応
  • セキュアな接続処理
  • XMPPサーバープロトコルのサポート
  • 軽量で効率的な通信

適している対象

  • XMPP を使ってチャットアプリを開発する開発者
  • XMPPベースのバックエンドサービスを使用するチーム
  • 低遅延メッセージングを必要とするアプリ
  • ネイティブレベルのXMPPパフォーマンスを必要とするプロジェクト
  • Android および iOS をターゲットとしたモバイルアプリ

注意事項

  • 完全な機能を実現するにはネイティブ設定が必要です
  • 外部のXMPPサーバーに依存しています
  • 利用可能なドキュメントは限られています
  • 各プラットフォームで追加の構成が必要になる場合があります
  • 非XMPP通信ニーズには適していません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

xmpp_plugin

status workflow

  1. Connect to the xmpp server
final param = {
      "user_jid":"jid/resource",
      "password": "password",
      "host": "xmpphost",
      "port": "5222",
      "nativeLogFilePath": "filepath",
      "requireSSLConnection": true,
      "autoDeliveryReceipt": true,
      "useStreamManagement": false,
      "automaticReconnection": true,
};

XmppConnection xmppConnection = XmppConnection(param);

await xmppConnection.start(_onError);
await xmppConnection.login();

  1. Send message to one-one chat
await xmppConnection.sendMessageWithType("xyz@domain", "Hi", "MSGID");
await xmppConnection.sendGroupMessageWithType("xyz@conference.domain", "Hi", "MSGID");
  1. Disconnect the xmppConnection
xmppConnection.logout();
  1. Creating a MUC
xmppConnection.createMUC("groupName", true);
  1. Joining MUC
xmppConnection.joinMucGroups(List<String> allGroupsId)

  1. Sending Custom Message
await xmppConnection.sendCustomMessage("xyz@domain", "Hi", "MSGID","customTest");
await xmppConnection.sendCustomGroupMessage("xyz@conference.domain", "Hi", "MSGID","customText");

  1. Sending Delivery Receipt
await flutterXmpp.sendDelieveryReceipt("xyz@domain", "Received-Message-Id", "Receipt-Id");
  1. Adding members to MUC
await flutterXmpp.addMembersInGroup("groupName", List<String> allMembersId);
  1. Adding admins to MUC
await flutterXmpp.addAdminsInGroup("groupName", List<String> allMembersId);
  1. Get member list from the MUC
await flutterXmpp.getMembers("groupName");
  1. Get Admin list from the MUC
await flutterXmpp.getAdmins("groupName");
  1. Get Owner list from the MUC
await flutterXmpp.getOwners("groupName");
  1. Remove members from the MUC
await flutterXmpp.removeMember("groupName", List<String> allMembersId);
  1. Remove admins from group
await flutterXmpp.removeAdmin("groupName", List<String> allMembersId);
  1. Get online member count from group
var onlineCount = await flutterXmpp.getOnlineMemberCount("groupName");
  1. Get last activity of the jid
var lastseen = await flutterXmpp.getLastSeen(jid);
  1. Get the list of my rosters
await flutterXmpp.getMyRosters();
  1. Creating a roster entry
await flutterXmpp.createRoster(jid);
  1. Join single MUC
await flutterXmpp.joinMucGroup(groupId);
  1. Request MAM Messages
await flutterXmpp.requestMamMessages(userJid, requestSince, requestBefore, limit);
  1. Update Typing Status
await flutterXmpp.changeTypingStatus(userJid, typingStatus);
  1. Update Presence Type
await flutterXmpp.changePresenceType(presenceType, presenceMode);
  1. Get Connection status
XmppConnectionState connectionStatus = await flutterXmpp.getConnectionStatus();
  1. Get ErrorResponse Event
void onXmppError(ErrorResponseEvent errorResponseEvent) {
    // TODO : Handle the Error Event
}
  1. Get SuccessResponse Event
void onSuccessEvent(SuccessResponseEvent successResponseEvent) {
    // TODO : Handle the Success Event
}
  1. Get ChatMessage Event
void onChatMessage(MessageChat messageChat) {
    // TODO : Handle the ChatMessage Event
}
  1. Get GroupMessage status
void onGroupMessage(MessageChat messageChat) {
    // TODO : Handle the GroupMessage Event
}
  1. Get NormalMessage status
void onNormalMessage(MessageChat messageChat) {
    // TODO : Handle the NormalMessage Event
}
  1. Get PresenceChange status
void onPresenceChange(PresentModel presentModel) {
    // TODO : Handle the PresenceChange Event
}
  1. Get ChatStateChange status
void onChatStateChange(ChatState chatState) {
    // TODO : Handle the ChatState Event
}
  1. Get ConnectionEvent status
void onConnectionEvents(ConnectionEvent connectionEvent) {
    // TODO : Handle the ConnectionEvent Event
}

Contact

You can reach us via mail(hiren@xrstudio.in) the if you have questions or need support.

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。