A plug and play modular toolkit for integrating the Chat feature on top of Firebase!
Gappein is a new Chat SDK in town!
A plug and play modular toolkit for integrating the Chat feature on top of Firebase!
(Back to top) To get started you need to first create a Firebase project for your app and add the
google-service.jsonfile in your project.
Add the dependencies to the
build.gradle
implementation "com.gappein.sdk:gappein-sdk:1.0.0-beta3"
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
Userby 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 } )
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
Useris the recipient user of the device.
This SDK is in alpha release, we would love to hear your feedback. If you face any issues please let us know here
Find the Demo App here
Your contributions are always welcome! Please have a look at the contribution guidelines first. :tada:
The MIT License (MIT) 2020. Please have a look at the LICENSE.md for more details.