Skip to content
This repository has been archived by the owner on Oct 5, 2022. It is now read-only.

gappein/gappein-chat-sdk

Repository files navigation

Gappein

Download Chat Download UI

Gappein is a new Chat SDK in town!

A plug and play modular toolkit for integrating the Chat feature on top of Firebase!

To check for detail documentation Click here

Table of contents

Get Started

(Back to top) To get started you need to first create a Firebase project for your app and add the google-service.json file in your project.

Installation

(Back to top)

Add the dependencies to the build.gradle

implementation "com.gappein.sdk:gappein-sdk:1.0.0-beta3"

Initialization

(Back to top)

Initialize the Gappein SDK with one line.

Gappein.initialize(context)

If you want to Gif integration Initialize the Gappein SDK with one line. Get the API Key from Giphy and use it like,

Gappein.initialize(context,"API_KEY")

Set the User by passing information about the currently logged in user

Gappein.getInstance().setUser(
         User(
                token = "user_token",
                profileImageUrl = "link_to_image",
                name = "user_name" 
            ), token = "user_token", {
             //Handle onSuccess
            }, {
             //Handle onError
            }
        )

UI

(Back to top)

You can either build your own UI or use our UI SDK to create a beautiful chat experience. To use our UI SDK add the following to your app's build.gradle -

implementation "com.gappein.sdk:gappein-ui:1.0.0-beta3"

To open the Channel List Fragment add the following code -

private fun addChannelListFragment() {
        val fm = supportFragmentManager
        val ft = fm.beginTransaction()
        ft.add(R.id.container,ChannelListFragment.newInstance())
        ft.commit()
    }

To open the Chat between two users, use the following code -

startActivity(MessageListActivity.buildIntent(this,"channel_id",User))

where User is the recipient user of the device.

Developer Notes

(Back to top)

This SDK is in alpha release, we would love to hear your feedback. If you face any issues please let us know here

Sample App

(Back to top)

Find the Demo App here

Contributing

(Back to top)

Your contributions are always welcome! Please have a look at the contribution guidelines first. 🎉

License

(Back to top)

The MIT License (MIT) 2020. Please have a look at the LICENSE.md for more details.