Our community group functionality within the AmityUIKit will allow you to explore social features and how they will look in your app
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
There are many components that you can use and integrate into your existing application.
Amity UIKit provides already built UI elements on single page. You can change the appearance such as color and typography, in the global settings. However, the UIKit does not allow you to replace these small components with other views. In addition, you cannot modify the view hierarchy inside the page.
This component shows the global feed.
You can use either of these two methods:
make
- the posts will be ranked in chronological order.
Below is the sample code.
makeCustomPostRanking
- the posts will be ranked according to a score-sorting mechanism. Refer to Custom Post Ranking for more information about this feature.
You can retrieve your global feed sorted by ranking score with this code.
This component consists of My community and Global feed components.
This component consists of Recommend community, Top trending community, and Categories components.
Feature
Description
My Community list
User can scroll horizontally to see a list of up to eight communities that the user has joined sorted in alphabetical order.
Navigation to Community profile page
When a user selects an community item, the user is navigated to Community Profile page
Navigation to My community page
When a user selects the arrow, the user is navigated to My community page
Feature
Description
Recommended
Community list
User can scroll horizontally to see up to four recommended communities.
Navigation to Community profile
When a user selects a community item, the user is navigated to Community Profile page
Feature
Description
Global feed
Scroll vertically to see a list of posts from the global feed.
Feature
Description
Top trending
Community list
User can see up to five top trending communities.
Navigation to Community profile
When a user selects a community item, the user is navigated to Community Profile page
Feature
Description
My community list
User can scroll vertically to see a list of communities that the user has joined sorted in alphabetical order.
Community search
User can search for community by name
Community creation
User can click on + button , to open Community Creation page
Feature
Description
Community creation
User can create a community by filling the required fields and tapping the Create community button
Feature | Description |
Community profile update | User can update the information such as avatar, community name, description, categories, etc for this community. Profile will be updated upon tapping Save. |
Feature
Description
Community list by category
User can see a list of all communities that belong to a category sorted in alphabetical order.
Navigation to Community Profile page
When a user selects a community item, the user is navigated to Community Profile page
Feature
Description
Category list
User can see up to eight categories sorted in alphabetical order.
Navigation to Category detail page
When a user clicks on a category item, the user is navigated to Category detail page.
Navigation to Category list
When a user selects the arrow, the user is navigated to Category list page.
Feature
Description
Category list
User can see a list of all categories sorted in alphabetical order.
Navigation to Category detail page
When a user selects a category item, the user is navigated to Category detail page
Feature
Description
Leave community
Leave the community by tapping Leave community. If you are the last remaining moderator in the community you need to transfer your moderator role to other members before you can leave the community.
Transfer moderator role
Promote a community member to a moderator
Edit community profile page(moderator user)
Access the Community Profile Edit Page
Close community(moderator user)
Close the community by tapping Close community
Community member page
Access the Community member page
Community Notification setting
View notification setting status and access the Community Push notification setting page
Feature | Description |
Toggle on/off notification community level setting | User can choose to toggle on / off the notification setting for this specific community |
Hide disable notification setting. | User will not see the push notifications that have been turned off |
Error state handle | When use tries to change the status of the community push notification setting but not success due to get error from Backend , we will show pop up and return the toggle state to the previous state |
Feature | Description |
Toggle on/off notification community level setting | Users can choose to toggle on/off the notification setting for this specific community |
Hide disable notification setting. | Users will not receive push notifications that have been turned off |
Error state handle | When users tries to change the status of the community push notification setting and get an error from our back-end due to a failed attempt |
No internet connection state | If users do not have a stable internet connection, the system will show the error |
Feature | Description |
toggle on/off notification community level setting | Users can choose to toggle on/off the notification setting for this specific community |
Hide disable notification setting. | Users will not see push notifications that have been turned off |
error state handle | When users try to change the status of the community push notification setting and get an error from our back-end due to a failed attempt |
This page provides a form for post creation.
The user can select images from 2 sources.
You can create a poll post and other users can interact with that poll post by selecting from the poll options.
To create a live stream post and for a detailed discussion on the live stream features, refer to Livestream Post documentation.
Refer to our Live Stream documentation to enable live stream functionalities.
File: All file types are supported
Image: JPG, JPEG, and PNG
Video: 3GP, AVI, FLV, MP4 and MPEG-2
The maximum file, image, or video size that you can upload is 1 GB.
Uploaded images or videos whose format is not supported (e.g. HEIC, HEVC) will be automatically converted to PNG for images and MP4 for videos.
Create a view controller
Parameter
AmityCommunityModel is a wrapper class of AmityCommunity which is a live object from AmitySDK
Attachment options
By default AmityPostCreatorViewController
allows all attachments when creating a post. You can optionally choose attachment options when creating the post.
All available attachment options are image
, video
, and file
. These can be found in AmityPostAttachmentType
.
Host your events virtually and see community interaction as it happens
AmityUIKit
provides the livestream recording feature that allows you to record livestreams and broadcast simultaneously in real-time. You can also play historical streams when the livestream ends.
This section describes the livestream feature in detail. Refer to our documentation to enable livestream functionalities.
A livestream post can be viewed in the following feeds:
Community feed
User feed
Global feed
Content feed
You will be able to see the livestream post and interact with it as soon as the livestreamer starts streaming.
To create a livestream post, follow these steps:
Create a livestream post by selecting Livestream from the pop-up and selecting a location where you want to post the stream.
Provide a title and description for your livestream. The Go live button will not enable if you don't provide a title and description.
Add a cover thumbnail from your media gallery for the livestream post and preview the cover image. This step however is optional. You may also update and delete the cover thumbnail.
Note: A default cover will be used if no cover thumbnail is selected.
Tap Go live to start streaming.
There will be a time indicator on the upper left. It will indicate how long it has been since the livestream started.
The livestream post will then show in the feed.
Tap Finish to end livestreaming. It will then show Ending livestream once the livestream has ended.
Note: You have the option to edit or delete the livestream post from the feed.
Other viewers can watch your livestreaming while you are simultaneously recording it. They will see a LIVE indicator on the video.
Tapping the play button in the livestream post will play the video in a full screen mode.
After ending your livestreaming, the playback video may not be available instantly for viewers to see while it is still in the process of producing the playback video. The viewers will see a message that the playback will be available for watching shortly.
When the playback video is already available for viewing, a RECORDED indicator is shown on the video post.
The livestream may be in idle state. This happens when you delete the livestream in console or or other issues that will not enable the livestreaming to start. The viewer will see a message that the stream is currently unavailable.
A livestream post will have the same privacy and access controls as with the other posts. This means that users without the permission, such as those who are not members of the community, won’t be able to view the livestreaming/playback video in a private community. If the community is public, non-members can view the post as read only so they won't be able to interact with it.
If it's your first time creating a livestream, your device will prompt to allow access to your device's camera and microphone.
You need to allow access to be able to start a livestream. The pop-up below will not show once you allow access to your camera and microphone.
This page shows content of a post including reactions and comments.
Reply feature is coming soon.
Create a view controller
The Link Preview feature in posts is designed to enrich user experience by providing a visual and informative preview of external links. This feature enhances content sharing, making it more interactive and engaging. This feature significantly improves the user's posting experience. It allows for a preliminary check of the link's accuracy and relevance, adding visual appeal to the post with an informative preview.
When a user includes a link in a post, the feature automatically extracts and displays key information: the title, main image, and a short description, creating an informative preview of the linked content. If the link is unavailable, it will show a empty placeholder or error view instead.
Users can edit the link preview even after the post is created. This flexibility ensures that the information remains up-to-date and accurate, enhancing the overall quality of the post.
The preview feature is designed to only display images, titles, and descriptions after a post is created. This ensures clarity and relevance in the shared content.
Feature | Description |
---|---|
Post creation
Create post by adding content such as text, images, videos, and files. Refer to Supported types for more details.
Mention in post
Mention users in post by typing @ to activate mention suggestion and selecting their names in the suggestion list. Up to 30 users can be mentioned per post.
An alert will be shown if character count is greater than 50000 or mentions count is greater than 30.
Parameter
Description
postTarget
enums to determine where is the target feed
consist of myFeed
and community(AmityCommunityModel)
Feature | Description |
Post content | View content of the post including reactions and comments. |
Edit post |
Delete post | Tap ... and select Delete post. Tap Delete in the confirmation message to confirm post deletion. Otherwise, tap Cancel. |
Report post | Tap ... and tap Report or Undo Report to report or undo report respectively. |
Create a comment by adding text to the compose bar and tapping Post |
Edit comment |
Delete comment | Tap ... below the comment and tap Delete comment. Tap Delete in the confirmation message to confirm deletion. Otherwise, press Cancel. |
This page shows the profile of a community including its own feed.
Create a view controller
Navigate to
Will navigate to
Feature | Description |
---|---|
Comment creation
Add comments to post
Mention in comments
Mention users in comments by typing @ to activate mention suggestion and selecting their names in the suggestion list. Up to 30 users can be mentioned per post.
An alert will be shown if character count is greater than 50000 or mentions count is greater than 30.
Parameter
Data type
Description
comment
AmityCommentModel
Comment model
communityId
String
Target community identifier
Feature
Description
Text editing
User can edit text content
Image removal
User can remove images
File removal
User can remove files
Parameter
Description
postId
identifier of the particular post
Feature
Description
Comment editing
Edit comment content and tap Save to submit changes.
Mention in comment
Mention users in comments by typing @ to activate mention suggestion and selecting their names in the suggestion list. Up to 30 users can be mentioned per post.
An alert will be shown if character count is greater than 50000 or mentions count is greater than 30.
Parameter
Data type
Description
comment
AmityCommentModel
Comment model
communityId
String
Target community identifier
Feature
Description
Becoming a member
User can tap Join button to join a community
Post creation
User can tap the floating action button to open Post creation page
Community profile update
Creator can tap Edit profile button to open Community profile edit page
Feature
Description
Community feed
User can scroll vertically to see a list of posts from a community feed
Feature
Description
Navigation to user profile page
User can view profile page by tapping on member list item
Report user
User can report members present in community
Parameter
Description
community
AmityCommunityModel
Feature | Description |
User Profile | User can view display name and description |
Post creation |
User profile update |
This User profile page can support the Follow feature and User Privacy feature
There are two views for the user profile page.
This view allows the user to see his own user profile detail and his own user feed, there are two state user can see.
Default state : Allows user to see his own following user counter and Follower user counter.
Request pending state : Allows user to see his own following user counter, Follower user counter, and also the follow request he received.
You can get this view by using this code:
This view allows the user to see other user's profile detail and their user feed. There are two states user can see
In the other user view , UIKIT has two main views that support the Follow user connection and the User privacy view.
Default state : Allows user to see the connection between the current user and the target user profile.
You can get this view by using this code:
This component shows a user feed of a specific user.
User can tap the floating action button to open to create a post on user's own page
User can tap Edit profile to open to update user's own profile
Feature
Description
User feed
User can scroll vertically to see a list of posts from a user feed
Feature
Description
Gallery
Scroll vertically to see images and videos from posts in a community feed
Media Filter
Filters according to media type (Photos and Videos). Tap the corresponding tabs to see the filtered posts.
Feature
Description
Follower counter
Shows the total count of followers. It will redirect to Following / Follower user list page when clicked.
Following counter
Shows the total count of users that you're following. It will redirect to Following / Follower user list page when clicked.
Pending follow request section
If you have pending follow requests from other users, you will see the pending request section. It will redirect to Follow request page when clicked.
Edit user profile
It will redirect to User profile edit page when clicked.
Feature
Description
Follow button
When clicked, the system will make a connection with the User.
If the Connection method = with request, system will change to cancel pending state.
Cancel request button
When clicked, follow request will be canceled
Follower counter
Shows the total count of followers. It will redirect to Following / Follower user list page when clicked
Following counter
Shows the total count of users that you're following. It will redirect to to Following / Follower user list page when clicked.
Pending follow request section
If you have pending follow requests from other users, you will see the pending request section. It will redirect to Follow request page when clicked.
Edit user profile
It will redirect to User profile page when clicked.
User feed (Private view)
If a connection was not established, the user profile and the Private setting is Private.
Feature | Description |
User feed | User can scroll vertically to see a list of posts from a user feed |
Private feed | User cannot see the feed content if user is not connected and the Privacy setting is Private |
UIKIT allows the default behaviour to be overridden by custom logic.
There are two main state based on the user connection.
In version 2.2, we do not have the User notification setting in the menu.
You can try this code:
In this page, user can see all the follow request he has received. He can either accept or decline the request as well.
The user sorting will be based on what the server provides.
The follow request will not automatically update. User needs to accept or decline first and if the follow request is not available, system will remove the request from list and prompt that the request is unavailable.
You can use the component with this code:
AmityUIKit allows some parts of the component to be customized:
Feature
Description
Report / unreport
User can report or unreport user in this user setting page
Unfollow
User can unfollow other user
Feature
Description
Accept Follow request
If user accepts the follow request , system will create a relationship with the request sender and the request item will be removed from the list.
Decline Follow request
If user declines the follow request, system will invalidate the follow request
Feature
Description
Member Selection
User can select a list of users
Feature | Description |
Current user profile | If current user will access other user's following and Follower user list, he will see his own profile on top of the list |
Report / undo report user | User can send report or undo report in this page via the action menu UIKIT included in this page |
Remove user from follower list | If current user will access his own follower list, he can remove followers via the three dots button and action menu |
Redirect user to user profile page. | If user taps on the user item list, he will be redirected to user profile page of that user |
This setting allows you to control where a post can be shared to based on the post origin.
My feed - The post can be shared to my feed. This option will enable "Share to my timeline" menu when user clicks share button.
Public community - The post can be shared to any public community. This option will enable "Share to group" menu when user clicks share button.
Private community - The post can be shared to any private community. This option will enable "Share to group" menu when user clicks share button.
External - The post can be shared externally. This option will enable "More options" menu when user clicks share button.
Origin - The post can be shared within the community feed that it was created. If the post was created in either public or private community, this option will enable "Share to group" menu when user clicks share button.
My feed post - Posts that were created on my feed. By default, possible sharing targets are My feed, Public community, and Private community.
User feed post - Posts that were created on any other users' feed. By default, possible sharing targets are My feed, Public community, and Private community.
Public community feed post - Posts that were created on any public community. By default, possible sharing targets are My feed, Public community, and Private community.
Private community feed post - Posts that were created on any private community. By default, possible sharing target is Origin.
You can select a set of targets for each post origin.
Based on Post sharing settings, there are up to three post sharing events that can be emitted by UIKit.
Share to my timeline - an event emitted when a user clicks on "Share to my timeline" button.
Share to group - an event emitted when a user clicks on "Share to group" button.
Share externally - an event emitted when a user clicks "More options" button.
You can choose to intercept one or all of the events and apply your custom behavior.
Feature
Description
Edit profile
When clicked, user will be redirect to User profile edit page
Feature
Description
User profile update
User can update the information such as avatar, display name, and description. Profile will be updated upon tapping Save.
Feature | Description |
Post creation on user's own feed |
Post creation on community feed |
There are many pages and actions on AmityUIKit. Pages can be nested inside others and it would be hard for overriding events on the nested pages. In order to solve this problem, we provide EkoEventHandler
which is a behavior controller for actions that happen in UIKit.
From v1.8 onwards, UIKit provides the capability for you to manage roles & permissions via the integration with SDK
UIKit provides default renderers for the core data types: text
, image
, and file
. It also provides a way to render your own UI for your custom post.
A single post UI is composed of 1 or more UITableViewCell. This allows reusability of cell components such as header or footer which can be shared by different kinds of posts.
This is an example of simple text post which contains 3 tableview cell. Top cell represents the header, middle cell contains text content and bottom cell is footer cell.
There are 3 steps involved in creating custom post renderer.
Step 1: Create your UI using UITableView cells.
Step 2: Compose a post UI component. For this create a component which conforms to AmityPostComposable
protocol.
You can also use our default header cell AmityPostHeaderTableViewCell
& default footer cell AmityPostFooterTableViewCell
in your custom post component.
Step 3: Register your custom cell & implement datasource.
When a user selects My Timeline, UIKit will open with the user's own feed as the target.
When a user selects a community, UIKit will open with the selected community.
Event | Parameter | Condition |
communityDidTap | communityId | community avatar or community display name is tapped |
userDidTap | userId | user avatar or user display name is tapped |
editUserDidTap | userId | edit user button is tapped |
postDidtap | postId | post or comment on social feed is tapped |
editPostDidTap | postId | edit post button is tapped |
channelDidTap | channelId | user channel list or user chat button is tapped |
communityChannelDidTap | channelId | n/a |
Permissions | Description |
Add user | Moderator user can add new member to the community. |
Remove user | Moderator user can remove member from the community. |
Assign Moderator role to other users | Moderator user can assign Moderator role to another member in the same community |
Remove Moderator role from a Moderator user | Moderator user can remove Moderator role from another Moderator in the same community |
Edit community | Moderator user can rename community, change community type as he see fit |
Close community | Moderator user can close the community |
Moderator badge | the "Moderator" badge shown on the post indicates it was created by a moderator user |
When a user clicks on the user profile avatar at the post creator area, UIKit will open User profile page
However, you can intercept the event and define your own logic following the example below.
To customize message cell layouts, please follow these instructions:
Create a subclass of UITableViewCell
and conform it to AmityMessageCellProtocol
To bind message data to UI, implement display(message:)
. You can also implement height(for message:boundingWidth:)
to specify the cell height. We've included some examples below for static-height calculation and dynamic-height calculation as reference
Subclass AmityEventHandler,
and override its default functions channelDidTap(from:channelId:)
and conform to AmityMessageListDataSource
.
4. Assign a class instance through a set function of AmityUIKitManager
Static-Height Cell Layout
You can use static-height cell layout types for static content, where the cell height is fixed and will not be scaled regardless of the data being received.
Below is an example of how you can configure a static-height cell layout. In this example, we're assuming that the image message is a class named StaticHeightMessageCell
.
Dynamic-Height Cell Layout
You can use dynamic-height cell layout when you require your cell height to expand dynamically according to the data (e.g. label expands upon strings).
Dynamic-height cell layouts require more complexity in height calculation. Let's look at a text message as an example, where the height of the cell needs to expand dynamically to display the full content.