Package ai.nexconn.chatui.utils.route
Class RouteUtils
-
- All Implemented Interfaces:
public class RouteUtils
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumRouteUtils.ChatUIActivityType
-
Field Summary
Fields Modifier and Type Field Description public final static StringCHANNEL_TYPEpublic final static StringTARGET_IDpublic final static StringCHANNEL_IDpublic final static StringCHANNEL_IDENTIFIERpublic final static StringCREATE_CHATROOMpublic final static StringTITLEpublic final static StringINDEX_MESSAGE_TIMEpublic final static StringCUSTOM_SERVICE_INFOpublic final static StringFORWARD_TYPEpublic final static StringMESSAGE_IDSpublic final static StringMESSAGE_IDpublic final static StringMESSAGEpublic final static StringDISABLE_SYSTEM_EMOJI
-
Constructor Summary
Constructors Constructor Description RouteUtils()
-
Method Summary
Modifier and Type Method Description static voidrouteToChannelListActivity(Context context, String title)static voidrouteToChannelActivity(Context context, ChannelType type, String targetId)static voidrouteToChannelActivity(Context context, ChannelType type, String targetId, boolean disableSystemEmoji)static voidrouteToChannelActivity(Context context, ChannelType type, String targetId, Bundle bundle)Launches the channel (conversation) activity. static voidrouteToChannelActivity(Context context, ChannelType type, String targetId, boolean disableSystemEmoji, Bundle bundle)Launches the channel (conversation) activity. static voidrouteToChannelActivity(Context context, ChannelIdentifier channelIdentifier)Launches the channel (conversation) activity. static voidrouteToChannelActivity(Context context, ChannelIdentifier channelIdentifier, Bundle bundle)Launches the channel (conversation) activity. static voidrouteToChannelActivity(Context context, ChannelIdentifier channelIdentifier, boolean disableSystemEmoji, Bundle bundle)Launches the channel (conversation) activity. static voidrouteToSubChannelListActivity(Context context, ChannelType type, String title)Launches the sub-channel list (grouped conversations) activity. static voidrouteToMentionMemberSelectActivity(Context context, String targetId, ChannelType type)Launches the @ mention member selection activity. static voidrouteToWebActivity(Context context, String url)static voidrouteToWebActivity(Context context, String url, String title)Launches the web view activity. static voidrouteToFilePreviewActivity(Context context, Message message, FileMessage content, int progress)static voidrouteToForwardSelectChannelActivity(Fragment fragment, ForwardType type, ArrayList<Integer> messageIds)Launches the channel selection activity for message forwarding. static voidrouteToCombineMessageDetailActivity(Context context, Message message)Launches the combined forward message detail preview activity. static voidrouteToCombinePicturePagerActivity(Context context, Message message)Launches the image viewer page for combined forward messages. static voidrouteToWebFilePreviewActivity(Context context, String fileUrl, String fileName, String fileSize)Launches the online file preview activity. static voidregisterActivity(RouteUtils.ChatUIActivityType activityType, Class<out Activity> activity)static Class<out Activity>getActivity(RouteUtils.ChatUIActivityType type)-
-
Method Detail
-
routeToChannelListActivity
static void routeToChannelListActivity(Context context, String title)
-
routeToChannelActivity
static void routeToChannelActivity(Context context, ChannelType type, String targetId)
-
routeToChannelActivity
static void routeToChannelActivity(Context context, ChannelType type, String targetId, boolean disableSystemEmoji)
-
routeToChannelActivity
static void routeToChannelActivity(Context context, ChannelType type, String targetId, Bundle bundle)
Launches the channel (conversation) activity.
- Parameters:
context- contexttype- channel typetargetId- target IDbundle- extra bundle data to carry in the intent
-
routeToChannelActivity
static void routeToChannelActivity(Context context, ChannelType type, String targetId, boolean disableSystemEmoji, Bundle bundle)
Launches the channel (conversation) activity.
- Parameters:
context- contexttype- channel typetargetId- target IDdisableSystemEmoji- whether to hide built-in emojibundle- extra bundle data to carry in the intent
-
routeToChannelActivity
static void routeToChannelActivity(Context context, ChannelIdentifier channelIdentifier)
Launches the channel (conversation) activity.
- Parameters:
context- contextchannelIdentifier- channel identifier
-
routeToChannelActivity
static void routeToChannelActivity(Context context, ChannelIdentifier channelIdentifier, Bundle bundle)
Launches the channel (conversation) activity.
- Parameters:
context- contextchannelIdentifier- channel identifierbundle- extra bundle data to carry in the intent
-
routeToChannelActivity
static void routeToChannelActivity(Context context, ChannelIdentifier channelIdentifier, boolean disableSystemEmoji, Bundle bundle)
Launches the channel (conversation) activity.
- Parameters:
context- contextchannelIdentifier- channel identifierdisableSystemEmoji- whether to hide built-in emojibundle- extra bundle data to carry in the intent
-
routeToSubChannelListActivity
static void routeToSubChannelListActivity(Context context, ChannelType type, String title)
Launches the sub-channel list (grouped conversations) activity.
- Parameters:
context- contexttype- grouped channel typetitle- title
-
routeToMentionMemberSelectActivity
static void routeToMentionMemberSelectActivity(Context context, String targetId, ChannelType type)
Launches the @ mention member selection activity.
- Parameters:
context- contexttargetId- target IDtype- channel type
-
routeToWebActivity
static void routeToWebActivity(Context context, String url)
-
routeToWebActivity
static void routeToWebActivity(Context context, String url, String title)
Launches the web view activity.
- Parameters:
context- contexturl- remote URLtitle- title
-
routeToFilePreviewActivity
static void routeToFilePreviewActivity(Context context, Message message, FileMessage content, int progress)
-
routeToForwardSelectChannelActivity
static void routeToForwardSelectChannelActivity(Fragment fragment, ForwardType type, ArrayList<Integer> messageIds)
Launches the channel selection activity for message forwarding.
- Parameters:
fragment- current fragmenttype- forward type.messageIds- list of message IDs to forward
-
routeToCombineMessageDetailActivity
static void routeToCombineMessageDetailActivity(Context context, Message message)
Launches the combined forward message detail preview activity.
- Parameters:
context- context (uses NCChatUI context if null)message- combined forward message
-
routeToCombinePicturePagerActivity
static void routeToCombinePicturePagerActivity(Context context, Message message)
Launches the image viewer page for combined forward messages.
- Parameters:
context- contextmessage- the original message carried during combined forwarding
-
routeToWebFilePreviewActivity
static void routeToWebFilePreviewActivity(Context context, String fileUrl, String fileName, String fileSize)
Launches the online file preview activity.
- Parameters:
context- contextfileUrl- remote file URLfileName- file namefileSize- file size
-
registerActivity
static void registerActivity(RouteUtils.ChatUIActivityType activityType, Class<out Activity> activity)
-
getActivity
static Class<out Activity> getActivity(RouteUtils.ChatUIActivityType type)
-
-
-
-