With Amity UIKit 2.3, we have introduced a new way to Authentication process. Just follow the guide below.
Your app may require the following permissions to work properly;
Camera access
Microphone access
Photo library usage access
Before submitting your application to the store, please make sure the following permissions are already granted. Here are the steps to ask for permission.
Locate the info.plist
file and add:
NSCameraUsageDescription
NSMicrophoneUsageDescription
NSPhotoLibraryUsageDescription
AmityUIKit
requires an API key. You need a valid API key to begin using the UIKit. 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.
If you have trouble finding this, you can post in our community forum at community.amity.co so our support team can assist you.
AmityUIKitManager.setup should only be called once when app starts running. Calling the method repeatedly will create connection problems.
By default, AmityClient will connect to AmityRegion.SG
. You can specify endpoints manually via AmityEndpoint
struct. 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:
To use any SDK feature, you must first register the current device with a userId
. A device registered with an userId
will be permanently tied to that userId
until you explicitly 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.
Additionally, an optional displayName
can be provided if you wish to have this user identified in push notifications.
Registering your app for push notifications will require a device token as a parameter.
Amity's UIKit does not manage:
User-facing requests for push notifications and authorizations
The creation and refreshing of push notification tokens
It's up to your app to take those steps and pass the device token.
In the event that your user logs out, you should explicitly unregister the user from the SDK as well, to prevent the current device from receiving any unnecessary or restricted data.
Unregistering a device is a synchronous operation. Once theunregisterDevice
method is called, the SDK disconnects from the server and wipes out user session.
Region
Endpoint
Europe
AmityRegion.EU
Singapore
AmityRegion.SG
United States
AmityRegion.US
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.14.0
Glide - 4.12.0
OKHTTP3 - 4.9.0
Retrofit2 - 2.50
Android Paging Data Library - 3.0.1
Room - 2.4.0-alpha04
RxJava2 - 2.3.10
Gson - 2.8.10
Kotlin-std-lib - 1.5.10
Kotlin-coroutines - 1.5.0
Exo Player - 2.12.1
HiveMQ mqtt client - 1.2.2
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.
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:
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.
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