Quickblox_SDK는 모바일 애플리케이션 내에서 실시간 통신 기능을 가능하게 하는 Flutter 패키지입니다. 채팅, 비디오 통화, 사용자 관리 및 푸시 알림을 포함합니다. 안드로이드와 iOS를 위한 것으로, 간단한 pub add 명령어를 통해 Flutter 프로젝트에 원활하게 통합됩니다. SDK는 앱 내에서 상호작용적이고 실시간 통신 경험을 구축하기 위한 강력한 인프라를 제공합니다. 개발자는 백엔드 인프라를 관리하지 않고도 보안성과 확장성이 뛰어난 메시징 및 통화 기능을 구현할 수 있도록 포괄적인 API를 활용할 수 있습니다. 소스 코드는 GitHub에서 공개되어 있어 투명성과 커스터마이징이 가능합니다.
사용 사례
앱 내 메시지
비디오 회의
사용자 존재 추적
푸시 알림 전달
실시간 채팅 통합
다중 사용자 협업
주요 기능
엔드 투 엔드 암호화 채팅
고품질 비디오 통화
크로스 플랫폼 지원 (Android 및 iOS)
사용자 인증 및 관리
푸시 알림 시스템
확장 가능한 백엔드 인프라구조
적합한 대상
메시징 앱
원격의료 플랫폼
원격 협업 도구
실시간 고객 지원 시스템
소셜 네트워킹 앱
가상 강의실
고려 사항
Quickblox 계정 설정이 필요합니다
API 키 구성이 필요합니다
사용자 지정 워크플로우를 위해 추가적인 백엔드 로직이 필요할 수 있습니다
안정적인 인터넷 연결에 의존
새 사용자를 위한 학습 곡선
성숙한 대안에 비해 문서화가 제한적
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Quickblox Flutter SDK
Quick Start
This guide demonstarates how to connect Quickblox Flutter SDK to your project and start development.
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:
Register a new account. Type in your email and password to sign in. You can also sign in with your Google or Github accounts.
Create the app clicking New app button.
Configure the app. Type in the information about your organization into corresponding fields and click Add button.
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:
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.
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;
} onPlatformExceptioncatch (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);
} onPlatformExceptioncatch (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);
} onPlatformExceptioncatch (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
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);
} onPlatformExceptioncatch (e) {
// Some error occured, look at the exception message for more details
}
LICENSE
For license information, please visit: https://quickblox.com/terms-of-use/