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

패키지 상세v0.19.0

quickblox_sdk

Quickblox는 애플리케이션 내부에 채팅, 비디오 통화, 사용자, 푸시 알림 등을 포함한 모든 기능을 제공합니다.

AndroidiOS
30일 다운로드
237
좋아요
49
Pub 점수
110

패키지 설치

flutter pub add quickblox_sdk

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Quickblox_SDK는 모바일 애플리케이션 내에서 실시간 통신 기능을 가능하게 하는 Flutter 패키지입니다. 채팅, 비디오 통화, 사용자 관리 및 푸시 알림을 포함합니다. 안드로이드와 iOS를 위한 것으로, 간단한 pub add 명령어를 통해 Flutter 프로젝트에 원활하게 통합됩니다. SDK는 앱 내에서 상호작용적이고 실시간 통신 경험을 구축하기 위한 강력한 인프라를 제공합니다. 개발자는 백엔드 인프라를 관리하지 않고도 보안성과 확장성이 뛰어난 메시징 및 통화 기능을 구현할 수 있도록 포괄적인 API를 활용할 수 있습니다. 소스 코드는 GitHub에서 공개되어 있어 투명성과 커스터마이징이 가능합니다.

사용 사례

  • 앱 내 메시지
  • 비디오 회의
  • 사용자 존재 추적
  • 푸시 알림 전달
  • 실시간 채팅 통합
  • 다중 사용자 협업

주요 기능

  • 엔드 투 엔드 암호화 채팅
  • 고품질 비디오 통화
  • 크로스 플랫폼 지원 (Android 및 iOS)
  • 사용자 인증 및 관리
  • 푸시 알림 시스템
  • 확장 가능한 백엔드 인프라구조

적합한 대상

  • 메시징 앱
  • 원격의료 플랫폼
  • 원격 협업 도구
  • 실시간 고객 지원 시스템
  • 소셜 네트워킹 앱
  • 가상 강의실

고려 사항

  • Quickblox 계정 설정이 필요합니다
  • API 키 구성이 필요합니다
  • 사용자 지정 워크플로우를 위해 추가적인 백엔드 로직이 필요할 수 있습니다
  • 안정적인 인터넷 연결에 의존
  • 새 사용자를 위한 학습 곡선
  • 성숙한 대안에 비해 문서화가 제한적

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Discord server

Quickblox Flutter SDK

Quick Start

This guide demonstarates how to connect Quickblox Flutter SDK to your project and start development.

Documentation: https://docs.quickblox.com/docs/flutter-quick-start

pub.dev package: https://pub.dev/packages/quickblox_sdk

Create a new app in the Admin Panel

Quickblox application includes everything that brings messaging right into your application - chat, video calling, users, push notifications, etc. To create a QuickBlox application, follow the steps below:

  1. Register a new account. Type in your email and password to sign in. You can also sign in with your Google or Github accounts.
  2. Create the app clicking New app button.
  3. Configure the app. Type in the information about your organization into corresponding fields and click Add button.
  4. Go to the screen with credentials. Locate Credentials groupbox and copy your Application ID, Authorization Key, and Authorization Secret. These data are needed to run your application on QuickBlox server.
Install Flutter SDK into your app

To create a new Flutter chat messaging app with QuickBlox SDK from scratch follow these steps:

  1. Install Flutter for your platform
  2. Run flutter create myapp to create a new project
  3. Add QuickBlox SDK into your project's dependencies into dependencies section in *pubspec.yaml* file in your root project dir.

dependencies: quickblox_sdk: 0.19.0

Send your first message
Initialize QuickBlox SDK

Initialize the framework with your application credentials. Pass appId, authKey, authSecret, accountKey to the QB.settings.init method using the code snippet below. As a result, your application details are stored in the server database and can be subsequently identified on the server.

const String APP_ID = "XXXXX";
const String AUTH_KEY = "XXXXXXXXXXXX";
const String AUTH_SECRET = "XXXXXXXXXXXX";
const String ACCOUNT_KEY = "XXXXXXXXXXXX";
const String API_ENDPOINT = ""; //optional
const String CHAT_ENDPOINT = ""; //optional

try {
      await QB.settings.init(APP_ID, AUTH_KEY, AUTH_SECRET, ACCOUNT_KEY,
          apiEndpoint: API_ENDPOINT, chatEndpoint: CHAT_ENDPOINT);
    } on PlatformException catch (e) {
        // Some error occured, look at the exception message for more details 
    }
Authorize user

In order to use the abilities of QuickBlox SDK, you need to authorize your app on the server, log in to your account and create a session. To get it all done call QB.auth.login method and pass login and password parameters to it using the code snippet below.

try {
      QBLoginResult result = await QB.auth.login(login, password);
      QBUser qbUser = result.qbUser;
      QBSession qbSession = result.qbSession;
    } on PlatformException catch (e) {
         // Some error occured, look at the exception message for more details     
    }

Note! You must initialize SDK before calling any methods through the SDK except for the method initializing your QuickBlox instance. If you attempt to call a method without connecting, the error is returned.

Connect to chat

To connect to chat server, use the code snippet below:

try {
      await QB.chat.connect(userId, userPassword);
     } on PlatformException catch (e) {
          // Some error occured, look at the exception message for more details     
     }
Create dialog

QuickBlox provides three types of dialogs: 1-1 dialog, group dialog, and public dialog.

Let’s create 1-1 dialog. Call QB.chat.createDialog method and pass QBChatDialogTypes.CHAT parameter as a dialog type to it. QBChatDialogTypes.CHAT parameter allows specifying that two occupants are going to participate in the dialog.

try {
      QBDialog createdDialog = await QB.chat.createDialog(occupantsIds, dialogName, dialogType: dialogType);
      } on PlatformException catch (e) {
           // Some error occured, look at the exception message for more details     
      }
Subscribe to receive messages

QuickBlox provides chat event handler allowing to notify client apps of events that happen on the chat. Thus, when a dialog has been created, a user can subscribe to receive notifications about new incoming messages. To subscribe to message events call QB.chat.subscribeChatEvent method and pass QBChatEvents.RECEIVED_NEW_MESSAGE as an event parameter to it using the following code snippet.

event - provides some values:

  • QBChatEvents.RECEIVED_NEW_MESSAGE - subscribe to new messages event
  • QBChatEvents.RECEIVED_SYSTEM_MESSAGE - subsccribe to system messages event
  • QBChatEvents.MESSAGE_DELIVERED - subscribe to message delivered event
  • QBChatEvents.MESSAGE_READ - subscribe to message read event

StreamSubscription? _someSubscription;

...

@override
void dispose() {
  if(_someSubscription != null) {
    _someSubscription!.cancel();
    _someSubscription = null;
  }
}

...

String event = QBChatEvents.RECEIVED_NEW_MESSAGE;

try {
  _someSubscription = await QB.chat.subscribeChatEvent(event, (data) {
        Map<dynamic, dynamic> map = Map<dynamic, dynamic>.from(data);
    Map<dynamic, dynamic> payload = Map<dynamic, dynamic>.from(map["payload"]);
    String? messageId = payload["id"];
  }
});
} on PlatformException catch (e) {
  // Some error occurred, look at the exception message for more details
}
Send message

When a dialog is created, a user can send a message. To create and send your first message, call QB.chat.sendMessage method and specify the dialogId and body parameters to it. Pass saveToHistory parameter if you want this message to be saved in chat history that is stored forever.

try {
      await QB.chat.sendMessage(dialogId, body: messageBody, saveToHistory: true);
      } on PlatformException catch (e) {
          // Some error occured, look at the exception message for more details     
      }

LICENSE

For license information, please visit: https://quickblox.com/terms-of-use/

카테고리

소스 저장소

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

아직 데이터가 없습니다.