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
(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.
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 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
}
)
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.
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. 🎉
The MIT License (MIT) 2020. Please have a look at the LICENSE.md for more details.