Meeting Reminder (Android & iOS)
After you successfully schedule a meeting, the TUIRoomKit component will push a pre-meeting reminder message to attendees 10 minutes before the meeting commences. This document will guide you to integrate the TIMPush push plug-in to enable the pre-meeting reminder feature.
Feature Introduction
Before integrating the offline push functionality, please ensure that you have completed manufacturer configuration according to the official documentation to ensure the normal operation of TUIRoomKit's offline push functionality.
Effect of integrating TIMPush push plug-in into TUIRoomKit (taking the display effect on Xiaomi phone Redmi Note 8 Pro as an example):
When the application is in the backend or offline | When the screen is locked |
![]() | ![]() |
Feature Integration
1. Please refer to the quick access documentation of push plug-in TIMPush and complete all steps except step 6 (the TUIRoomKit component has already performed offline message push for meeting reminders internally, so step 6 does not need separate configuration).
2. (Optional) If you want to enter the room immediately after clicking the notification, you can refer to the following code. It is recommended to place the registration of callback timing in the onCreate() function of the Application App:
TUICore.registerEvent(TUIConstants.TIMPush.EVENT_NOTIFY, TUIConstants.TIMPush.EVENT_NOTIFY_NOTIFICATION, new ITUINotification() {@Overridepublic void onNotifyEvent(String key, String subKey, Map<String, Object> param) {if (TUIConstants.TIMPush.EVENT_NOTIFY.equals(key) && TUIConstants.TIMPush.EVENT_NOTIFY_NOTIFICATION.equals(subKey)) {if (param != null) {String extString = (String) param.get(TUIConstants.TIMPush.NOTIFICATION_EXT_KEY);try {// You can click on the notification to navigate to the appropriate interface according to your business. The following is an example of navigating to a room.JSONObject roomObject = new JSONObject(extString);String roomId = roomObject.getString("RoomId");if (!TextUtils.isEmpty(roomId)) {loginAndEnterRoom(roomId);}} catch (Exception e) {}}}}});private void loginAndEnterRoom(String roomId) {int sdkAppId = "your appId";String userId = "your UserId"String userSig = GenerateTestUserSig.genTestUserSig(userId);// Log inTUILogin.login(this.getApplicationContext(), sdkAppId, userId, userSig, new TUICallback() {@Overridepublic void onSuccess() {// Enter a room after successful log-inConferenceDefine.JoinConferenceParams params = new ConferenceDefine.JoinConferenceParams(roomId);Intent intent = new Intent(getApplicationContext(), ConferenceMainActivity.class);intent.putExtra(KEY_JOIN_CONFERENCE_PARAMS, params);intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);getApplicationContext().startActivity(intent);}@Overridepublic void onError(int errorCode, String errorMessage) {}});}
Note:
If you want to click to push and enter a room, you must complete login before entering a room.
1. Integrate TIMPush component
pod 'TIMPush', '8.1.6108'
2. Configure push parameters
After completing manufacturer configuration, you can obtain the certificate ID in the Chat console. You need to implement the
offlinePushCertificateID
protocol method in AppDelegate and return the certificate ID.import TIMPushextension AppDelegate: TIMPushDelegate {func offlinePushCertificateID() -> Int32 {return kAPNSBusiId}}
#import "TIMPush/TIMPushManager.h"@interface AppDelegate () <TIMPushDelegate>- (int)offlinePushCertificateID {return kAPNSBusiId;}
3. Click offline push and then custom redirection (optional)
By default, clicking a notification will navigate to the app. You can refer to the following code to implement entering the meeting immediately after clicking a notification. You can also check the SceneDelegate and AppDelegate files in github.
If it is a cold startup, you need to parse the notification message in SceneDelegate to obtain the roomId of the meeting to enter.
import UIKitclass SceneDelegate: UIResponder, UIWindowSceneDelegate {var window: UIWindow?func scene(_ scene: UIScene,willConnectTo session: UISceneSession,options connectionOptions: UIScene.ConnectionOptions) {guard let windowScene = (scene as? UIWindowScene) else { return }window = UIWindow(windowScene: windowScene)let loginVC = TRTCLoginViewController() //Your own login pageloginVC.roomId = processOfflinePush(connectionOptions: connectionOptions)let nav = UINavigationController(rootViewController: loginVC)window?.rootViewController = navwindow?.makeKeyAndVisible()}private func processOfflinePush(connectionOptions: UIScene.ConnectionOptions) -> String? {guard let pushNotification = connectionOptions.notificationResponse?.notification.request.content.userInfo else { return nil }guard let extString = pushNotification["ext"] as? String else { return nil }guard let dict = extString.convertToDic() else { return nil }return dict["RoomId"] as? String}
#import "SceneDelegate.h"#import <UserNotifications/UserNotifications.h>#import "TUIRoomKit/TUIRoomKit-Swift.h"#import "TIMDefine.h"@interface SceneDelegate ()@property (nonatomic, strong) NSString *roomId;@end@implementation SceneDelegate- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {[self processOfflinePush:connectionOptions];}- (void)processOfflinePush: (UISceneConnectionOptions *)connectionOptions {NSDictionary *pushNotification = connectionOptions.notificationResponse.notification.request.content.userInfo;NSString *notice = pushNotification[@"ext"];NSDictionary *dic = [self dictionaryFromString:notice];NSString *roomId = dic[@"RoomId"];// Transmit the roomId to your own login page YourLoginViewController}@end
Complete the log in of TUICore on your login page and assess whether to redirect to the Conference main page.
import TUICoreimport TUIRoomKit//YourLoginViewController is your own login pageclass YourLoginViewController: UIViewController {var roomId: String?override func viewDidLoad() {super.viewDidLoad()TUILogin.login(Int32(SDKAppID), userID: "yourUserName", userSig: "yourUserSig") { [weak self] inguard let self = self else { return }self.navigationController?.pushViewController(YourSelfViewController(), animated: false)//YourSelfViewController is the interface that should be displayed after normal login.guard let roomId = self.roomId else { return }//Determine whether to enter the foreground through offline notification by roomId, and then determine whether to redirect to the Conference main pageself.showConferenceMainViewController(roomId: roomId)self.roomId = nil} fail: { (code, errorDes) inprint("code:\(code), errorDes:\(String(describing: errorDes))")}}func showConferenceMainViewController(roomId: String) {let conferenceViewController = ConferenceMainViewController()let params = JoinConferenceParams(roomId: roomId)conferenceViewController.setJoinConferenceParams(params: params)navigationController?.pushViewController(conferenceViewController, animated: true)}}
#import "YourLoginViewController.h"#import "TUIRoomKit/TUIRoomKit-Swift.h"#import "TUILogin.h"@interface YourLoginViewController ()@property (nonatomic, strong) NSString *roomId;@end@implementation YourLoginViewController- (void)viewDidLoad {[super viewDidLoad];[TUILogin login:yourSDKAPPID userID:@"youruserID" userSig:@"yourUserSig" succ:^{//First display your own interface//If roomId has a value, it means it comes from offline push. You can call showConferenceMainViewController and then redirect to the Conference main page.} fail:^(int code, NSString * _Nullable msg) {}];// Do any additional setup after loading the view.}- (void)showConferenceMainViewController: (NSString *)roomId {ConferenceMainViewController * vc = [[ConferenceMainViewController alloc]init];JoinConferenceParams * params = [[JoinConferenceParams alloc]initWithRoomId:roomId isOpenMicrophone:true isOpenCamera:false isOpenSpeaker:true];[vc setJoinConferenceParamsWithParams:params];[self.navigationController pushViewController:vc animated:true];}
If entering from the backend to the foreground, need to implement the
onRemoteNotificationReceived
method in the AppDelegate file.import TUIRoomKitimport TIMPush@mainclass AppDelegate: UIResponder, UIApplicationDelegate, TIMPushDelegate {var roomId: String?func onRemoteNotificationReceived(_ notice: String?) -> Bool {guard let notice = notice else { return false }guard let dict = convertToDic(string: notice) else { return false }guard let roomId = dict["RoomId"] as? String else { return false }if V2TIMManager.sharedInstance().getLoginStatus() == .STATUS_LOGINED {//If woken up in the background and login has been completed, directly enter the meeting.showConferenceMainViewController(roomId: roomId)}return true}}
#import "AppDelegate.h"#import "TIMPush/TIMPushManager.h"#import "TUIRoomKit/TUIRoomKit-Swift.h"#import "TIMDefine.h"@interface AppDelegate ()<TIMPushDelegate>@property (nonatomic, strong) NSString *roomId;@end@implementation AppDelegate- (BOOL)onRemoteNotificationReceived:(NSString *)notice {NSDictionary * dic = [self dictionaryFromString:notice];NSString * roomId = dic[@"RoomId"];if (!roomId) {return false;}if ([V2TIMManager sharedInstance].getLoginStatus == V2TIM_STATUS_LOGINED ) {//If woken up in the background and login has been completed, directly enter the meeting.[self showConferenceMainViewController:roomId];}return true;}@end
Common Issues
1. If you encounter problems during the integration process, ensure to first check Plugin Push - Common Issues to troubleshoot.
2. Condition description: Some vendors require listing on the app market to use the push service normally. For details, see the following table:
Manufacturer Channel | Whether to List | Account Description |
Xiaomi | Yes | Need to register an enterprise developer account. |
VIVO | Yes | Need to register an enterprise developer account. |
OPPO | No | Need to register an enterprise developer account. |
Honor | No | Need to register an enterprise developer account. |
Huawei | No | An individual developer account is all you need. |
Meizu | No | An individual developer account is all you need. |
Feature Customization
If you want to customize the pre-meeting reminder time, you can achieve this by modifying the source code. For different platforms, see:
You can set the pre-meeting reminder time (in seconds) by changing the value of the
REMINDER_TIME
member variable in Android/tuiroomkit/src/main/java/com/tencent/cloud/tuikit/roomkit/view/page/widget/ScheduleConference/view/ScheduleConferenceView.java.You can set the pre-meeting reminder time (in seconds) by modifying the value of the reminderSecondsBeforeStart member variable in iOS/TUIRoomKit/Source/ScheduleConferenceViewController.swift.
Note:
If the pre-meeting reminder time is larger than the scheduled meeting time, the pre-meeting reminder notification will not be pushed.
Critical Code
Settings for the pre-meeting reminder time. For different platforms, see:
public abstract void scheduleConference(ConferenceInfo conferenceInfo, TUIRoomDefine.ActionCallback callback);
You can set the pre-meeting reminder time (in seconds) by modifying the reminderSecondsBeforeStart field of conferenceInfo. For details, see scheduleConference. Sample code is as follows:
TUIConferenceListManager manager = (TUIConferenceListManager) TUIRoomEngine.sharedInstance().getExtension(CONFERENCE_LIST_MANAGER);TUIConferenceListManager.ConferenceInfo conferenceInfo = new TUIConferenceListManager.ConferenceInfo();conferenceInfo.basicRoomInfo.roomId = "Your roomId";conferenceInfo.reminderSecondsBeforeStart = 600; // Replace 600 with your pre-meeting reminder timemanager.scheduleConference(conferenceInfo, new TUIRoomDefine.ActionCallback() {@Overridepublic void onSuccess() {// Successful callback for scheduling a meeting}@Overridepublic void onError(TUICommonDefine.Error error, String message) {// Callback for scheduled meeting failure}});
- (void)scheduleConference:(TUIConferenceInfo *)conferenceInfo onSuccess:(TUISuccessBlock)onSuccess onError:(TUIErrorBlock)onError NS_SWIFT_NAME(scheduleConference(_:onSuccess:onError:));
You can set the pre-meeting reminder time (in seconds) by modifying the reminderSecondsBeforeStart field of conferenceInfo. For details, see scheduleConference. Sample code is as follows:
import RTCRoomEnginefunc scheduleConference() {let manager = TUIRoomEngine.sharedInstance().getExtension(extensionType: .conferenceListManager) as? TUIConferenceListManagerlet conferenceInfo = TUIConferenceInfo()conferenceInfo.basicRoomInfo.roomId = "111111" // Replace "111111" with your custom room numberconferenceInfo.reminderSecondsBeforeStart = 600 // Replace 600 with your custom pre-meeting reminder timemanager?.scheduleConference(conferenceInfo, onSuccess: {print("ScheduleConference success")}, onError: { code, message inprint("ScheduleConference error, code:\(code), message:\(message)")})}
#import "RTCRoomEngine/TUIRoomEngine.h"#import "RTCRoomEngine/TUIConferenceListManager.h"- (void)scheduleConference {TUIConferenceListManager * manager = [[TUIRoomEngine sharedInstance] getExtension: TUIExtensionTypeConferenceListManager];TUIConferenceInfo * conferenceInfo = [[TUIConferenceInfo alloc] init];conferenceInfo.basicRoomInfo.roomId = @"111111"; // Replace @"111111" with your custom room numberconferenceInfo.reminderSecondsBeforeStart = 600; // Replace 600 with your custom pre-meeting reminder time[manager scheduleConference:conferenceInfo onSuccess:^{NSLog(@"ScheduleConference success");} onError:^(TUIError code, NSString * _Nonnull message) {NSLog(@"ScheduleConference failed, code:%ld, message:%@", (long)code, message);}];}
Note:
If you have any requirements or feedback during the integration and use process, you can contact: info_rtc@tencent.com.