All Projects → taskrabbit → React Native Zendesk Chat

taskrabbit / React Native Zendesk Chat

Licence: mit
React Native Wrapper around Zendesk Chat v2

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to React Native Zendesk Chat

Vue Beautiful Chat
A simple and beautiful Vue chat component backend agnostic, fully customisable and extendable.
Stars: ✭ 979 (+1065.48%)
Mutual labels:  support, chat
Cabal Client
interface for writing peer-to-peer distributed chat clients
Stars: ✭ 81 (-3.57%)
Mutual labels:  chat
Cleverbot
iOS Messaging Application using Cleverbot and ReactorKit
Stars: ✭ 74 (-11.9%)
Mutual labels:  chat
Conversational Ui
Conversational interface web app example
Stars: ✭ 78 (-7.14%)
Mutual labels:  chat
Django Helpdesk
A Django application to manage tickets for an internal helpdesk. Formerly known as Jutda Helpdesk.
Stars: ✭ 1,198 (+1326.19%)
Mutual labels:  support
Back Channeling
A thread floating typed chat system.
Stars: ✭ 79 (-5.95%)
Mutual labels:  chat
Janus Server
JanusVR Presence Server
Stars: ✭ 73 (-13.1%)
Mutual labels:  chat
Uni Huanxin Im
💬 uniapp集成环信小程序sdk,实现多端实时通讯
Stars: ✭ 84 (+0%)
Mutual labels:  chat
Rocket.chat.ansible
Deploy Rocket.Chat with Ansible!
Stars: ✭ 80 (-4.76%)
Mutual labels:  chat
Applozic Web Plugin
Javascript (jQuery) Real Time Chat & Messaging plugin
Stars: ✭ 76 (-9.52%)
Mutual labels:  chat
Revolt
Better desktop integration for Riot.im (not only) for GNOME
Stars: ✭ 76 (-9.52%)
Mutual labels:  chat
Botframework Webchat
A highly-customizable web-based client for Azure Bot Services.
Stars: ✭ 1,198 (+1326.19%)
Mutual labels:  chat
Talkyard
A community discussion platform: Brings together the main features from StackOverflow, Slack, Discourse, Reddit, and Disqus blog comments.
Stars: ✭ 1,219 (+1351.19%)
Mutual labels:  chat
Qmchatviewcontroller Ios
An elegant ready to go chat view controller for iOS applications
Stars: ✭ 75 (-10.71%)
Mutual labels:  chat
Videocall App Flutter
Simple Video Calling App Made in Flutter Supporting Upto 4 peoples to have Video Call Together.
Stars: ✭ 82 (-2.38%)
Mutual labels:  chat
Kouchat Android
KouChat for Android
Stars: ✭ 73 (-13.1%)
Mutual labels:  chat
Laravel 5 Messenger
A Simple Laravel 5, 6, 7 & 8 Messenger with Pusher Capabilities
Stars: ✭ 75 (-10.71%)
Mutual labels:  chat
Superseriousstats
superseriousstats is a fast and efficient program to create statistics out of various types of chat logs
Stars: ✭ 78 (-7.14%)
Mutual labels:  chat
React Chat
⚛️ Chat application for DogeCodes React course
Stars: ✭ 84 (+0%)
Mutual labels:  chat
Djangochat
A simple chat room using Django Channels.
Stars: ✭ 83 (-1.19%)
Mutual labels:  chat

react-native-zendesk-chat

Simple module that supports displaying Zendesk Chat within a React Native Application.

This library assumes you're familiar with Zendesk's Official Documentation: iOS and Android.

VERSIONS

  • For Zendesk Chat v2 use version >= 0.4.0 (this requires RN 0.59 or later!)
  • For RN version >= 0.59 use version >= 0.3.0 (Zendesk Chat v1)
  • For RN version < 0.59 use version <= 0.2.2 (Zendesk Chat v1)

Known Issues

Getting Started

With npm:

npm install react-native-zendesk-chat --save

or with yarn:

yarn add react-native-zendesk-chat

QuickStart & Usage

  1. Setup Native Dependencies
    iOS If you're on react-native >= 0.60 and you have Cocoapods setup, then you just need to:
$ yarn install # and see if there are any errors
$ (cd ios; pod install) # and see if there are any errors
 # -- you may need to do `pod install --repo-update`

If you're on older react-native versions, please see the Advanced Setup section below

Android If you're on react-native >= 0.60, Android should autodetect this dependency. If you're on 0.59, you may need to call react-native link

  1. Call the JS Initializer:
import ZendeskChat from "react-native-zendesk-chat";

// Once in your application:
ZendeskChat.init("YOUR_ZENDESK_ACCOUNT_KEY");

// Optionally specify the appId provided by Zendesk
ZendeskChat.init("YOUR_ZENDESK_ACCOUNT_KEY", "APP_ID_PROVIDED_BY_ZENDESK");
  1. Show the Chat UI
// On button press, when you want to show chat:
ZendeskChat.startChat({
	name: user.full_name,
	email: user.email,
	phone: user.mobile_phone,
	tags: ["tag1", "tag2"],
	department: "Your department",
	// The behaviorFlags are optional, and each default to 'true' if omitted
	behaviorFlags: {
		showAgentAvailability: true,
		showChatTranscriptPrompt: true,
		showPreChatForm: true,
		showOfflineForm: true,
	},
	// The preChatFormOptions are optional & each defaults to "optional" if omitted
	preChatFormOptions: {
		name: !user.full_name ? "required" : "optional",
		email: "optional",
		phone: "optional",
		department: "required",
	},
	localizedDismissButtonTitle: "Dismiss",
});

Styling

Changing the UI Styling is mostly achieved through native techniques.

On Android, this is the official documentation -- and an example might be adding these 3 lines to your app theme

While on iOS, the options are more minimal -- check the official doc page

Migrating

From react-native-zendesk-chat <= 0.3.0

To migrate from previous versions of the library, you should probably remove all integration steps you applied, and start over from the Quick Start.

The JS API calls are very similar, with mostly additive changes.

Advanced Setup

Advanced users, or users running on older versions of react-native may want to initialize things in native.

iOS: Manually Setting up with Cocoapods

If you're on iOS < 0.60, you may need to manually install the cocoapod:

Add a reference to your Podfile:

pod 'RNZendeskChat', :git => 'https://github.com/taskrabbit/react-native-zendesk-chat.git'

then run pod install: (cd ios; pod install)

or manually:

In Xcode, drag and drop node_modules/react-native-zendesk-chat/RNZendeskChat.m and node_modules/react-native-zendesk-chat/RNZendeskChat.h into your project.

iOS: Configure ZDCChat in AppDelegate.m:

#import <ZDCChat/ZDCChat.h>

// ...

// Inside the appropriate appDidFinishLaunching method
[ZDCChat initializeWithAccountKey:@"YOUR_ZENDESK_ACCOUNT_KEY"];

// And access other interesting APIs

Android: Manual Setup & Configuration

If you're on react-native < 0.60, you should be able to call react-native link.

If this doesn't work, then you may need to do a complete manual install as follows:

  1. Open up android/app/main/java/[...]/MainApplication.java
  • Add import com.taskrabbit.zendesk.*; to the imports at the top of the file
  • Add new RNZendeskChatPackage(this) to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
include ':react-native-zendesk-chat'
project(':react-native-zendesk-chat').projectDir = new File(rootProject.projectDir,	'../node_modules/react-native-zendesk-chat/android')
  1. Insert the following lines inside the dependencies block in android/app/build.gradle:

For RN >= 0.60:

dependencies {
	//
  api group: 'com.zendesk', name: 'chat', version: '2.2.0'
  api group: 'com.zendesk', name: 'messaging', version: '4.3.1'

also in project build.gradle

Add gradle maven { url 'https://zendesk.jfrog.io/zendesk/repo' }

For RN < 0.60:

compile project(':react-native-zendesk-chat')
  1. Configure Chat in android/app/main/java/[...]/MainActivity.java
// Note: there is a JS method to do this -- prefer doing that! -- This is for advanced users only.

// Call this once in your Activity's bootup lifecycle
Chat.INSTANCE.init(mReactContext, key);

Contributing

  • Pull Requests are encouraged!
  • Be respectful!
  • The trunk branch of this repo is called main

License

React Native Zendesk Chat is MIT licensed, as found in the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].