Skip to content

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

License

Notifications You must be signed in to change notification settings

palcodes/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!

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-beta1"

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-beta1"

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 100.0%