패키지, 저장소 및 앱 카테고리 검색

패키지 상세v2.2.13

xmpp_plugin

네이티브 채널 및 네이티브 라이브러리(예: 안드로이드의 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.

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.