Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Show all

Help Center/ Meeting/ Client SDK Reference/ Android SDK/ API Reference/ UI Customization/ Customizing a Screen for Adding Participants to a Meeting

Customizing a Screen for Adding Participants to a Meeting

Updated on 2024-12-27 GMT+08:00

When you touch the Invite button in the upper right corner of the participant list, the doAddAttendees callback method is triggered. You can customize the method, select contacts to be added to the meeting, and return the selected contact list via onSuccess of the callback.

Application Scenarios

Your application has integrated a corporate directory and you need to customize the function of adding contacts to a meeting.

Precautions

1. sdkConfig takes effect only when this configuration is passed during SDK initialization.

API for customizing the function of adding contacts to a meeting:

sdkConfig.setAddAttendeesHandle(new CustomAddAttendeesHandle());

The following figure shows the effect.

Sample code of customizing the method of adding participants

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Inject the screen for adding participants. The screen of selecting participants is displayed in the method.
public class CustomAddAttendeesHandle implements IAddAttendeesHandle {
     private HwmCallback<List<AttendeeModel>> callback;    
     /**
      * Activity called by the curActivity.
      * selectedAccount: indicates the selected account.
      * isScheled: specifies whether to schedule a meeting.
      * callback: After the participant is added, the list of selected participants is returned.
      **/
     @Override    
     public void doAddAttendees(Activity curActivity, List<AttendeeModel> selectedAccount, String selectParam, boolean isScheled, HwmCallback<List<AttendeeModel>> hwmCallback) {
          callback = hwmCallback;        
          // You can pass the selected participant list to facilitate operations on the custom screen.
          Intent intent = new Intent(Utils.getApp(), AddPeopleByAppidAuthActivity.class);                     
          activity.startActivityForResult(intent,5000);    
      }
     @Override    
     public void dealContactSelect(Intent intent) {    
     }
     @Override    
     public void onActivityResult(int requestCode, int resultCode, Intent data) {
          if (requestCode == 5000){
              if(null != callback){
                  // Callback returned if the selected participant joins the meeting.
                  callback.onSuccess(DemoUtil.selectModels);            
              }        
          }    
     }
}

Sample code of processing the custom screen of adding participants to a meeting. AddPeopleByAppidAuthActivity is a custom screen example.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
public class AddPeopleByAppidAuthActivity extends Activity {
    private List<AttendeeModel> members;
    @SuppressLint("CheckResult")
    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.customize_add_people_by_appid_auth);
        TextView thirdAccountIdTextView = findViewById(R.id.third_account_id);
        TextView sipNumberTextView = findViewById(R.id.sip_number);
        TextView userPhoneTextView = findViewById(R.id.user_phone);
        TextView userNameTextView = findViewById(R.id.user_name);
        findViewById(R.id.add_people).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                String thirdAccountId = thirdAccountIdTextView.getText().toString();
                String sipNumber = sipNumberTextView.getText().toString();
                String phoneNumber = userPhoneTextView.getText().toString();
            // The display name is optional. If it is left empty, the display name in the corporate directory is used.
                String name = userNameTextView.getText().toString();
                members = new ArrayList<>();
            // Select one of the three methods. The ID of the third-party address book is valid only for app ID login.
                if (!TextUtils.isEmpty(thirdAccountId)) {
                    AttendeeModel attendeeModel = AttendeeModel.buildAttendeeByThirdUserId(thirdAccountId, name);
                    members.add(attendeeModel);
                } else if (!TextUtils.isEmpty(sipNumber)) {
                // Select one of the three methods. The SIP number is the account identifier of the meeting corporate directory.
                    AttendeeModel attendeeModel = AttendeeModel.buildAttendeeBySipNumber(sipNumber,name);
                    members.add(attendeeModel);
                } else if (!TextUtils.isEmpty(phoneNumber)) {
                // Select one of the three methods. If a mobile number is specified, the outgoing call permission is required.
                    AttendeeModel attendeeModel = AttendeeModel.buildAttendeeByPhone(phoneNumber, name);
                    members.add(attendeeModel);
                } else {
                DemoUtil.showToast("Select one of the three methods for joining a meeting.");
                    return;
                }
                DemoUtil.selectModels = members;
                Intent intent = new Intent();
                setResult(1,intent);
                finish();
            }
        });
    }
}

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback