-
Notifications
You must be signed in to change notification settings - Fork 17
Setup & Authentication
We are always working to enhance our existing UIKit. As a result, the minimum compatibility may vary for our previous version releases. Below is the compatibility list for our latest release. For a complete compatibility history of any given UIKit version, you may refer to our changelogs.
- Amity-Social-Cloud-SDK - 5.8.0
- Glide - 4.12.0
- OKHTTP3 - 4.9.0
- Retrofit2 - 2.50
- Android Paging Data Library - 3.0.1
- Room - 2.3.0
- RxJava2 - 2.3.10
- Gson - 2.8.10
- Kotlin-std-lib - 1.5.10
- Kotlin-coroutines - 1.5.0
- Exo Player - 2.12.1
Before using the SDK, you need to initialize the SDK with your API key. Please find your account API key in Amity Social Cloud Console.
After logging in Console:
- Click Settings to expand the menu.
- Select Security.
- In the Security page, you can find the API key in the Keys section.
class SimpleApp : Application() {
override fun onCreate() {
super.onCreate()
AmityCoreClient.setup(
apiKey = "apiKey",
httpEndpoint = AmityRegionalEndpoint.EU, // optional param, defaulted as SG region
socketEndpoint = AmityRegionalEndpoint.EU // optional param, defaulted as SG region
)
}
}
You can specify endpoints manually via optional parameters. API endpoints for each data center are different so you need to adjust the endpoint accordingly.
We currently support multi-data center capabilities for the following regions:
Region | Endpoint | Endpoint URL |
---|---|---|
Europe | AmityRegionalEndpoint.EU | api.eu.amity.co |
Singapore | AmityRegionalEndpoint.SG | api.sg.amity.co |
United States | AmityRegionalEndpoint.US | api.us.amity.co |
You must first register the current device with a userId
. A device registered with a userId
will be permanently tied to that userId
until you deliberately unregister the device, or until the device has been inactive for more than 90 days. A device registered with a specific userId
will receive all messages belonging to that user.
public class HomeActivity extends AppCompatActivity {
@Override
public void onCreate() {
super.onCreate();
AmityCoreClient.registerDevice("userId")
.displayName("name")
.authToken("token") // optional
.build()
.submit()
.subscribe()
}
}
Guidelines
- Customizing Amity UIKit Open Source
- Contributing to Amity UIKit Open Source
- Submitting fixes and feature requests
Getting Started
UIKit Components