jivosdk_plugin

Creator: coderz1093

Last updated:

Add to Cart

Description:

jivosdk plugin

Jivo Mobile SDK #
The Jivo Mobile SDK allows you to embed a chat into your Flutter mobile applications to receive customer requests. The integration takes just a few minutes, as the chat interface with the message feed is already implemented - you only need to add a few lines of code to your project.
Current version features #

Сhat between a client and agents
Bidirectional files transfer
Chats history
Message status indicators (sent, delivered, read)
PUSH notifications

Changelog #
Check out the changelog on pub.dev to see the latest changes in the package.
Demo App #
This repository includes a fully functional example app.
Add dependency #
Add this dependency to your package's pubspec.yaml file.
dependencies:
stream_chat_flutter: 0.9.1
copied to clipboard
Then you should run flutter packages get
Quick start #
import 'package:jivosdk_plugin/bridge.dart';

// Configure for authorized user
Jivo.session.setContactInfo(name: "Homer", email: "h.simpson@springfield.com", phone: "Simpson", brief: "Family guy");
Jivo.session.setup(channelId: "YOUR_CHANNEL_ID", userToken: "USER_JWT_TOKEN");

// ... or, configure for anonymous user
Jivo.session.setup(channelId: "YOUR_CHANNEL_ID", userToken: "");

// Present a chat
Jivo.display.present();
copied to clipboard
Configuration #
Platform: iOS #
Please add following lines into the beginning of the ios/Podfile before initial run:
source 'https://github.com/cocoapods/specs'
source 'https://github.com/jivochat/cocoapods-repo'
copied to clipboard
Please make sure to call some corresponding JivoSDK methods
in your AppDelegate class for handling APNS, in the same way as in following example:
import UserNotifications
import Flutter
import JivoSDK


@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
UNUserNotificationCenter.current().delegate = self
GeneratedPluginRegistrant.register(with: self)
Jivo.notifications.handleLaunch(options: launchOptions)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}

override func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
Jivo.notifications.setPushToken(data: deviceToken)
}

override func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
Jivo.notifications.setPushToken(data: nil)
}

override func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
if let result = Jivo.notifications.didReceiveRemoteNotification(userInfo: userInfo) {
completionHandler(result)
}
else {
completionHandler(.noData)
}
}

func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
if let options = Jivo.notifications.willPresent(notification: notification, preferableOptions: .banner) {
completionHandler(options)
}
else {
completionHandler([])
}
}

override func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
Jivo.notifications.didReceive(response: response)
completionHandler()
}
}
copied to clipboard
Platform: Android #
Add the Google services plugin as a dependency in your root-level (project-level) Gradle file (<project>/build.gradle) :
buildscript {
...
repositories {
google()
mavenCentral()
maven { url 'https://www.jitpack.io' }
}
dependencies {
...
classpath 'com.google.gms:google-services:4.3.14'
}
}

allprojects {
repositories {
...
google()
mavenCentral()
maven { url 'https://www.jitpack.io' }
}
}
copied to clipboard
Add the dependencies and enable dataBinding in your module (app-level) Gradle file (usually <project>/<app-module>/build.gradle) :
plugins {
...
id "dev.flutter.flutter-gradle-plugin"
id 'com.google.gms.google-services'
}

android {
...
buildFeatures {
dataBinding = true
}
...
}

dependencies {
...
api platform('com.google.firebase:firebase-bom:32.7.2')
api 'com.google.firebase:firebase-messaging'
}
copied to clipboard
Download and add the Firebase Android configuration file (google-services.json) to your app:

Click Download google-services.json to obtain your Firebase Android config file.
Move the config file into the module (app-level) root directory of your app.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.