Customize an invitation
The code on this page works with either the default UI or the custom UI.
Customize the invitation method
To introduce a new invitation method - besides the default methods like email and SMS, which we provided - customize your own invitation method by doing the following.
Define an Activity with an intent-filter in your AndroidManifest.xml.
<activity android:name="us.zoom.sdkexample.MyInviteActivity"
android:label="@string/invite_acitivity_name"
android:icon="@drawable/ic_launcher" >
<intent-filter>
<action android:name="us.zoom.sdkexample.intent.action.MeetingInvite"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
The action name <action android:name="(here)" /> should be your
application package name. For example, the demo application package
name is: us.zoom.sdkexample concatenates with intent.action.MeetingInvite.
Tips The activity will be listed at the top of the invite methods list.
Next, edit your own invitation contents.
Intent intent = getIntent();
Uri uri = intent.getData();
if(uri != null)
txtUrl.setText("URL:" + uri.toString());
String subject = intent.getStringExtra(AndroidAppUtil.EXTRA_SUBJECT);
if(subject != null)
txtSubject.setText("Subject: " + subject);
long meetingId = intent.getLongExtra(AndroidAppUtil.EXTRA_MEETING_ID, 0);
if(meetingId > 0)
txtMeetingId.setText("Meeting ID: " + meetingId);
String meetingPassword = intent.getStringExtra(AndroidAppUtil.EXTRA_MEETING_PSW);
if(meetingPassword != null)
txtPassword.setText("Password: " + meetingPassword);
String meetingRawPassword = intent.getStringExtra(AndroidAppUtil.EXTRA_MEETING_RAW_PSW);
if(meetingRawPassword != null)
txtRawPassword.setText("Raw Password: " + meetingRawPassword);
String text = intent.getStringExtra(AndroidAppUtil.EXTRA_TEXT);
if(text != null)
edtText.setText(text);
To disable all other invitation methods besides the one you create, add the following to res/values/config.xml.
<!-- Define this bool value in config.xml to remove all default invite options and remain only your totally customized invite activity. -->
<bool name="zm_config_invite_by_only_action_meeting_invite">true</bool>
Customize the invitation content
To customize the invitation email subject and content, SMS content, and URL invitation text, follow these steps.
-
Create your invitation generator class, then implement this interface.
import com.zipow.videobox.util.InviteContentGenerator; public class MyInviteContentGenerator implements InviteContentGenerator { ... }Then, add the following into your
res/values/config.xmlfile.<string name="zm_config_invite_content_generator">us.zoom.sdkexample.MyInviteContentGenerator</string> -
To change your Email Topic, override the
genEmailTopicfunction.@Override public String genEmailTopic(Context context, long meetingId, String meetingUrl, String myName, String password, String rawPassword) { ... } -
To change your Email Content, override the
genEmailContentfunction.@Override public String genEmailContent(Context context, long meetingId, String meetingUrl, String myName, String password, String rawPassword) { ... } -
To change your SMS Content, override the
genSmsContentfunction.@Override public String genSmsContent(Context context, long meetingId, String meetingUrl, String myName, String password, String rawPassword) { ... } -
To change your Copy URL Content, override the
genCopyUrlTextfunction.@Override public String genSmsContent(Context context, long meetingId, String meetingUrl, String myName, String password, String rawPassword) { ... }
Null or empty value
If the return value is null or empty the Zoom default invitation template will be used.
The parameters in the functions:
| Parameter | Definition |
|---|---|
| context | Application context |
| meetingId | Meeting Number |
| meetingUrl | Meeting Url |
| myName | Display name |
| password | Meeting password |